With the help of Prof. Claudio Palazzi, this work has been published on IEEE's 2nd International Workshop on Social (Media) Sensing (SMS 2020) under the name "Air Quality Control through Bike Sharing Fleets":
ArduECO is an IoT device developed using a NodeMCU board programmed with Arduino's C/C++ capable of tracking the amount of CO (Carbon Monoxide) in the air with a MQ-7 sensor, along GPS position and send it in the cloud to AWS's IoT Core and an SD Card to keep the data until it is sent in the cloud. These are stored in a simple SQL database and displayed on a website using Google Maps JavaScript API's.
This project has been created for the Wireless Networks course held by Prof. Claudio Palazzi, in the Master's in Computer Science at Università degli Studi di Padova.
The goal of this project was to develop a PoC of an easy way to keep track in real time of air quality using devices that can be easily installed on shared green methods of transportation such as bikes and electric scooters from companies like Mobike.
Further information about the project can be found in the essay that presents the project.
The circuit have been designed using Fritzing.
For interfacing with the peripherals attached to the board, this project uses these libraries:
AWS's IoT Core allows to use an MQTT server allowing devices to connect using a lightweitght protocol with minimized data packets, low network usage and low power usage.
Each device would have its own certificate in order to connect to the cloud, to do this I have followed the steps described in this tutorial.
The MQTT server is then connected to an AWS Lambda function, written in Python, which sends the information to a PHP page which inserts it in the database. This is not an ideal setup but it was necessary since Altervista, the host I have used for the website, does not allow external connections to its databases. The Lambda function can be found in web/lambda.py.
Using the Google Maps JavaScript API's I have created a simple map with markers that sign where GPS positions have been registered along with CO readings from the MQ Sensor.
For this project I have used SQL instead of others because it represents only a PoC. A more suitable DB system would be Redis, thinking about this project can scale horizontaly with a greater number of devices.
The file with the database schema can be found in the web/database.sql file.
Some improvements like creating a better algorithm for uploading data, using better hardware and using multiple air sensors can be found in the essay related with the project.