Introduction

The AUDI e-scooter is based on the Segway Ninebot MAX G30D II. Aim of this little project is to add a GPS tracker with immobilizer function into my new scooter. The GPS tracker should be used to deactivate the e-scooter via SMS or app when it’s not in use. For this purpose, a relay is installed that interrupts the power supply to the dashboard panel. The clever thing about our modification is that it leaves the existing wiring harness completely intact. This means that it can be dismantled without any trace of damage to the scooter. Especially in case of a warranty or insurance claim, an unmodified device is a necessary requirement.

Below are a few technical specs about the scooter:

  • Speed: max. 20km/h
  • Range: approx. 65km
  • Weight: 19.1kg
  • Payload: max. 100kg
  • Dimensions unfolded: 116.7 × 47.2 × 120.3cm
  • Dimensions folded: 116.7 × 47.2 × 53.4cm
  • Braking system: drum brake (front), electric brake (rear)
  • Battery: 551Wh lithium battery
  • Charge time: 100% in 6 hours
  • Motor: 350W
  • Climbing capacity: 20%
  • Wheels: 10 inch (25.4 cm) tubeless pneumatic tires
  • Item number: 89A050001B

BOM

Wiring Scheme

Wiring Scheme
AUDI MAX G30D II GPS Tracker Wiring Scheme

The GPS antenna illustrated is actually the engine ignition detection that responds to a voltage of +12V. However, the GPS tracker housing can be opened without difficulty and the glued GPS antenna can then be removed. Instead of the antenna, the orange cable is soldered on and the gps antenna is soldered to the other end of the cable. Now the antenna can be positioned freely in the e-scooter to improve the GPS signal.

Installation

  1. Remove the underbody from the scooter.
  2. Disconnect power supply at XT60 connector (you may break a warranty seal here).
  3. Install the Y-cable.
  4. Solder the JST BEC socket on the GPS tracker harness to red/black and insulate with heat shrink tubing.
  5. Insert the SIM card into the tracker and connect it to the Y-cable.
  6. Set up the tracker according to the instructions. (Set APN, set phone number etc.)
  7. Connect relay with Scotchlock connectors to + behind the fuse of the tracker.
  8. Clamp relay with Scotchlock connectors to black cable (GND) of tracker.
  9. Build adapter cable JST connector, so no damage to the original dashboard cable is necessary. Our relay is thus looped in with the custom connectors. The yellow, red and black wires can be connected 1:1, the green wire is connected to the opener of the relay.
  10. Pour the relay into the housing with casting resin (optional) and clamp all cables with foam when installed.
  11. Reassemble the scooter
Wiring without Dashboard Cut-Off
Wiring without Dashboard Cut-Off

Wiring without dashboard cut-off. Thanks to the chip crisis I am still waiting for the JST leads.

First Test of the Circuit
First Test of the Circuit

First successful test of the circuit. Note: The relay switches only above a voltage of 36V, unlike the GPS tracker, which can be operated between 9 and 60V.

Tracker is sleeping at 480mW
Tracker is sleeping at 480mW

Our circuit is sleeping at 480mW and peaks at 780mW. Before storing the e-scooter for the winter, the tracker should therefore be disconnected from the battery to prevent deep discharge.

Relay/GPS Tracker Wiring
Relay/GPS Tracker Wiring

After a few weeks of waiting the missing JST leads arrived! This will be our final wiring.

Controller Board
Controller Board

To access the connectors on the controller board, we need to unscrew a massive steel housing.

Dashboard-Controller Connection
Dashboard-Controller Connection

The connector with the red dot leads to the dashboard.

Final Wiring
Final Wiring

First successful test of the modified circuit.

Final Assembly
Final Assembly

Final installation of the circuit, before mounting the underbody.

Traccar Configuration

Traccar is a free and open source GPS tracking server. It will replace the default SinoTrack servers in our project, because we don’t want to store our sensitive location data on chinese servers. Of course, this step is optional and can be skipped accordingly. In addition, a little technical know-how is necessary to operate your own server securely.

In my case, I use Podman for the deployment instead of Docker. For this purpose, I do not start the two containers via a docker-compose file, but have configured a pod that is started and controlled via systemd services. I favor Podman because I can run the containers completely without elevated privileges.

But first we have to get a default configuration.

docker run \
         --rm \
         --entrypoint cat \
         docker.io/traccar/traccar:latest \
         /opt/traccar/conf/traccar.xml > traccar.xml

This is what my untested Docker Compose looks like. I think someone who knows the ropes knows what to do.

traccar:
        image: docker.io/traccar/traccar:latest
        ports:
           - 5013:5013
           - 8082:8082
        depends_on:
           - mariadb
        volumes:
           - ${HOME}/traccar/traccar.xml:/opt/traccar/conf/traccar.xml:ro
           - ${HOME}/traccar/logs:/opt/traccar/logs:rw
           - ${HOME}/traccar/data:/opt/traccar/data:rw
    mariadb:
       image: docker.io/mariadb:latest
       environment:
           - MARIADB_DATABASE=traccar
           - MARIADB_USER=traccar
           - MARIADB_ROOT_PASSWORD=traccar
           - MARIADB_PASSWORD=traccar-password
       volumes:
          - ${HOME}/traccar/database:/var/lib/mysql:rw

By default Traccar Server uses a embedded H2 database. We want to setup MariaDB as database engine, therefore we need to replace following lines in traccar.xml configuration file:

<entry key='database.driver'>org.h2.Driver</entry>
<entry key='database.url'>jdbc:h2:/home/user/Documents/traccar/target/database</entry>
<entry key='database.user'>sa</entry>
<entry key='database.password'></entry>

In our case the configuration should look like this:

<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://localhost:3306/traccar?serverTimezone=UTC&amp;allowPublicKeyRetrieval=true&amp;useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
<entry key='database.user'>traccar</entry>
<entry key='database.password'>traccar-password</entry>

Now the compose can be executed. The default login via the webinterface on port 8082 is admin:admin.

WARNING: If you run your Traccar instance behind a reverse proxy like nginx, ingress, etc., make sure that websocket connections can be established. Otherwise the tracker will be shown as online, but its pin will not appear on the map. For nginx add this to your proxy location section:

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

Now we can proceed and configure the GPS tracker.

GPS Tracker Configuration

Two things are particularly important in the conifguration of the GPS tracker. The SIM card and the mobile phone provider must support GPRS. This should normally not be a problem. It will not work with LTE-only SIMs. Another important point is unlocking the SIM card without a pin. Of course, without buttons and mobile network, the GPS tracker cannot get the information what the pin code is. Therefore, the SIM card should be tested once in a normal cell phone and the pin request should be disabled.

If these requirements are met, the SIM card can be inserted and the tracker can be charged via a micro-usb cable. For configuration, it is recommended to place the device outside so that it has good signal reception. When both LEDs (blue and orange) are on continuously, the tracker has both cellular and GPS service. Now we can send the setup commands to the phone number of the tracker. This can be done with any SMS capable cell phone.

In my case, I use a SIM card from Netzclub. The APN must be researched depending on the provider and replaced accordingly.

The commands are structured as follows: [COMMAND][PASSWORD] [VALUE] In our case the default password is 0000

> 8030000 pinternet.interkom.de
< SET OK
> 7100000
< SET OK
> 8040000 traccar.example.com 5013
< SET OK
> SLEEP0000 5
< OK
> RESTART
< RESTART OK
> RCONF
< prints current configuration and ID...

Now login into your Traccar instance and add the tracker to your account. For this purpose, the tracker must be given a name and the ID printed on the housing must be stored. That’s all!

Now the position data should be transmitted for 5 minutes during a movement. This time span can be set, by the way, a look in the manual does not hurt here.

To interrupt the connection of the dashboard to the motor and thus make the e-scooter unusable for thieves for a short time. All that is required is to send an SMS to the tracker when the vehicle is parked.

Locking: 9400000

Unlocking: 9410000

Of course, a lock must still be used to prevent physical theft. But at least no one can change the e-scooters firmware or turn on and damage the motor.