10/11

Project 10 · of 11

GNSS vehicle tracking

SAÉ 5.01 · BUT3 · Embedded systems / IoT · group of 3–4 In progress
LoRaWANThe Things NetworkPycom FiPy / LoPyMicroPythonGNSSMQTTNode-REDRaspberry PiDeep sleepSMS 2G/3G
The project in progress

SAÉ 5.01, “Designing, building and presenting a technical solution”, in the cybersecurity track, focuses on embedded systems. The brief: track a vehicle by GNSS and send its position over The Things Network's LoRaWAN network, then display it on a map served by a web server.

The hardware comes from the Pycom ecosystem: a Pytrack board with a FiPy or LoPy module fitted in the vehicle (the end device), an Expansion or Pysense board with a second module acting as a LoRaWAN gateway, LoRa antennas, and a Raspberry Pi hosting the server with Node-RED for mapping. The module code is developed with Pymakr in VS Code.

The system has to be designed like a real battery-powered embedded device: by default the module stays in low-power mode (deep sleep) and only wakes up, turns on GNSS and connects to the LoRaWAN network when the accelerometer detects that the vehicle is moving. The user is then alerted by SMS and can put the module back to sleep from the web page. The final goal is to replace The Things Network with a self-hosted LoRaWAN network server (LNS).

The project is carried out in a group of 3 or 4 students, over about 50 hours (36 of them unsupervised). Each step is only validated if we can explain what was done, especially the content of the scripts.

Goal

Design a low-power GNSS tracker that sends a vehicle's position over LoRaWAN, shows it on a web map, alerts the user by SMS and can be controlled remotely — first through The Things Network, then through a self-hosted LoRaWAN network server.

Validation steps
  • Send coordinates over MQTT from the module (via Wi-Fi) and show the vehicle's position on a web map.
  • Create an application and a gateway on The Things Network, and follow the messages going through.
  • Format the received data as JSON on the TTN side (uplink payload formatter).
  • Retrieve positions through TTN's MQTT broker and display them on the map with Node-RED.
  • Optimise the LoRa frame: latitude and longitude encoded on 3 bytes each, while respecting the allowed airtime (duty cycle).
  • Wake the module with the accelerometer and keep it in deep sleep the rest of the time.
  • Stop tracking from the web page with a downlink message and return to low-power mode.
  • Alert the user by SMS with a 2G/3G dongle, allow sleep mode by SMS and push notifications to a smartphone.
  • Study the free LoRaWAN network server solutions, deploy one with MQTT and run the whole project without TTN.
Challenges
  • Balancing real-time tracking with battery life (deep sleep and interrupt handling).
  • Respecting LoRaWAN radio constraints: small frames and limited airtime.
  • Getting the whole chain to talk in both directions: module, gateway, network server, MQTT broker, Node-RED and web page.
  • Replacing a hosted service (TTN) with a self-hosted infrastructure we control.
Expected deliverables
  • Working tracker (embedded module + gateway) and a Node-RED mapping web server.
  • Demonstration of the different steps, with an explanation of the scripts.
  • A 2-page comparison of free LoRaWAN network servers and deployment of the chosen solution.

Interactive demo · from the vehicle to the web map

Start driving to follow a position end to end, then stop tracking from the map. Target architecture of the SAÉ, project in progress.

The interactive demo needs JavaScript.