3. Motivations & Solutions
Air pollution is one of the most serious environmental risks
faced by most of the countries in the world, due to the
rapid urbanization and motorization in urban areas.
The monitoring of the most interested areas is of
fundamental importance with appropriate tools capable of
assessing the critical levels.
Our solution is a simple and inexpensive tool able to satisfy
the basic needs of a good monitoring for external and
internal environments.
4. Hardware & software
• P-nucleo-IKA02A1
• Steval-MKI141V2
• B-L072Z-LRWAN1
LoRa®
• Nucleo-F401RE
• Mbed studio
• uTensor
• The things network
• InfluxDB
• Tableau
7. B-L072Z-LRWAN1 LoRa®
We used the B-L072Z-LRWAN1 to receive
the CO data from the Nucleo board.
The board is also connected with the
humidity and temperature sensor.
In this way we collect all the data about CO,
temperature and humidity, that we will
send thought The Things Network.
10. TTN - Creation of the application
• To use TTN we have to add an application in
the console
• We just have to specify ad ID, add a description
and specify the handler (for EU the handler
is: “ttn-handler-eu”)
11. TTN - Addition of the device
• Then we have to register the device that will send
the data through the LoRa antenna
• EUIs codes will be automatically generated
12. TTN – JSON file
To allow LoRa to detect the correct application and identify the device that is sending the data, we
have to modify some parameters in the file “mbed_app.json”
Here we have to insert the EUIs values
generated by TTN
13. TTN – Sending data
To send the data from LoRa to The Things Network we have to create a sending function in our code
This data will be sent on TTN,
then parsed and collected in
the data section
Then an http integration will
be used to send the data to
InfluxDB
14. InfluxDB
• Simple, high performing write and query HTTP APIs
through a language similar to SQL
• Written entirely in Go, with no external dependencies
• Support many programming languages
15. InfluxDB
TIMESTAMP CO HUMIDITY TEMPERATURE BENZENE
2019/04/02
15:40:00
2.6 42.5 14.6 3.2
POST
• https:// marty-
c9aef689.influxcloud.net:8086
• write?db= sensor_surveys
• precision= m
• u= root &p= iot
• - “survey, co=2.6, humidity=42.5,
temperature=13.6, benzene=3.1”
Not directly compatible with the Mbed framework, uses the A2,A3 and A5 analog pins to compute readings and has some digital pin conflicts since when we use any other analog pin the sensor stops responding.
Readings made with the I2C protocol, has an available Mbed library, provides a good grade of accuracy
Does not have analog pins (incompatible with CO sensor), has a smaller storage size 128 KB (incompatible with uTensor)
Does not work with high level APIs (keras), large binary size, requires special compilation flags which can collide with some frameworks (PlatformIO), has only some basic prediction features available (no gradient descent), the graphs need to have all the trained nodes removed before exporting, has a CLI tool which works only on .pb files and crates the needed source files