Project Diary


Singapore Polytechnic Internship
Tags: Javascript ExpressJS ReactJS MUI Google-Maps-Platform ffmpeg IP-live-stream node-red

Description

This project was done during my internship in Singapore Polytechnic. I was tasked to do a condition monitoring and vehicle tracking dashboard for a fleet of autonomous vehicle in Singapore Polytechnic.


Background

Previously, there was a node red dashboard that tracks the vehicle sensors like speed, humidity, and temperature. However, this dashboard was only visible locally on that particular vehicle. This was a problem as there were plans to increase the fleet size. With the increase in fleet size, there was a need for remote monitoring of multiple vehicles at once.


Key features that was requested were, live camera feed, live sensor reading, location tracking, sensor logging (saving to database) and graphs for the logged sensor data.


System Architecture
system architecture
Details

I utilized MQTT to transmit sensor data to a Javascript server. At the server, the data underwent preprocessing such as duplicate data check, before being sent to a MySQL database to be stored. I opted for MySQL as I was already well-versed in its usage. At the end of my internship, my database was pushed to Huawei cloud.


For the live camera view, an IP camera was installed on the vehicle. The IP camera was connected to a router equipped with a sim card onboard the vehicle. Then a javascript server was used to access the IP camera, convert it to HLS using ffmpeg, and then played on the website.


To create the user interface for the website, I chose ReactJS and MUI framework. They are the most popular frameworks which was a quality highly valued by my supervisors.


As for the data visualisations of the sensor data, I utilized react-chartjs-2 to generate graphical representations of the logged sensor data.


For real-time sensor data, I set up a polling mechanism where the server was queried every 5 seconds instead of directly connecting the dashboard to the MQTT server to maintain server-client parity. Node-red was used to manage both the sensors and the MQTT protocol on the vehicle. It was not mentioned in the video but users could set colours to their threshold for a better visualisation. For example, users could set a green colour to data that is within the threshold while having red for data that is out of the threshold.


No github repository will be given as I was not given permission to open the code to the public.


Contact me at timo9132@gmail.com