DriveSafety aims to encourage safe driving of corporate vehicles. It consists of an on-vehicle unit and a Telegram notifier bot to alert the supervisor on driving status. The on-vehicle unit boots up and starts recording activity the moment the engine is turned on. Using a 3-axis accelerometer and powered by machine learning, it can detect hard brakes and mounting of kerbs. Upon engine shutdown, the on-vehicle unit will show a summary with the driving score and number of hard brakes/kerb mounts, and a summary message is sent to the supervisor. Upon a collision, a repeated message is sent to the supervisor. Additionally, the supervisor can send important messages to the driver’s on-vehicle unit through the Telegram bot.
The on-vehicle unit is powered by an ESP32 with an Edge Impulse model, which recognises hard brakes/kerbs/collisions based on actual training data collected from the prototype itself through the accelerometer at the front of the vehicle. Communication between the on-vehicle unit and cloud is over LoRa, which allows for wireless connectivity at greater ranges than WLAN, and significantly lower power than cellular (LTE/5G). A Node-RED server then receives the LoRa uplink messages from the LoRa network server in MQTT format, and then parses them. The backend for the Telegram bot is based on Python, which subscribes to MQTT messages from the Node-RED server. It also publishes messages sent from the supervisor back to the Node-RED server via MQTT. The Node-RED server then converts it to a downlink MQTT payload to be sent to the LoRa network server, which in turn sends the message to the on-vehicle unit over LoRa.
This project was a trying yet enriching test of many of the engineering skills and competencies I picked up over my three years in poly. Many hours were spent on building the individual components, as well as determining the best ways for data to flow between them. Gathering accurate training data was tough too, as one slight change (e.g. the placement of the accelerometer), meant potentially re-collecting data from scratch. In the end, I emerged as a stronger systems thinker, learning to appreciate how each component contributes to a system as a whole and how changes in even a single component can affect it.


