NMF Atlantis is an embedded system that aims to warn users of an incoming flood so they can prepare and get safe before it happens. It is a student project realised at Polytech Sorbonne.
Why this project?Floods are an increasing threat because of the rise of the sea level. They are occuring more frequently and their damage are tremendous. The point of this project is to warn people soon enough so they are prepared when the flood arises. This way, lives will be saved and some damage might get avoided.
How does it work?The core of our system is the microcontroller that is running the program and that is connected to all the sensors, the battery and the Sigfox module. Using a Low-Power Wide-Area Network (Sigfox's LPWAN) and a rechargeable power supply were the specifications ventured by our teachers. Therefore, we focused on reducing the power consumption. In order to do that and yet having a reliable product, the program is carrying on measurements every 15 minutes and send the results every hour (default settings).
With the support of our teachers, we managed to achieve our goal and create an automous device able to warn users of a potential flood as well as giving them details about temperature and humidity.
Main features:
- Level measurement,
- Temperature measurement,
- Humidity measurement,
- LPWAN data sending,
- Fully autonomous.
Code
We wanted the code to be easily adaptable to a local situation. Therefore, five variables rule the program operation. Those five variables are:
// Depending on the waterway
float sensor_limit = 4.0*100.0;
float danger_limit = 50.0;
int danger_time = 15;
int default_time = 30;
int sending_interval = 3600; //every hour (1h = 3600 s).
The first limit (sensor_limit
) indicates the reach of the rangefinder used. The second limit is the danger_limit
and as to be set according the threat of the waterway you are willing to monitor. The danger_time
and default_time
are the intervals between two measurements in case of danger or by default. Finally, the sending_interval
indicates the time between two messages. You will find the whole code in the Attachments or by clicking on the following link.
Electronic
The STM32 Nucleo-L432KC development board has to be linked with the sensors following the schematic below. The Power Supply has its own circuit (that can be found below as well). The main purpose of this circuit is to recharge the Li-Ion battery thanks to a solar panel and a charge manager, the MCP73831. The second purpose is to retrieve the battery level and send it to one of the microcontroller pins.
Feel free to plan the pins the way it suits you. However, do not forget to modify the code so the microcontroller take it into account.
To make the wiring more reliable, we designed Printed Circuit Board for both the microcontroller and its sensors and the power supply. The KiCad files are available in the attachments.
Data Processing
Data is sent through a 10-bit bus:
- 4 bits for the distance,
- 2 bits for the temperature,
- 2 bits for the humidity,
- 2 bits for the battery level.
Then, callbacks have to be configure on the Sigfox backend platform:
The data received is not representative of the reality yet. Two synthetic variables are needed :
- Vbat =
(vreduced*3.3*2/100)/3.7*100
the battery voltage, - Temperature =
temperature-40
the real temperature.
Next step is to configure your Ubidots dashboard to make it look the way you want. You will also be able to configure on what level an alert is sent to your mail box or phone.
About the name: NMF stands for No More Flood and Atlantis is an obvious reference to the mythicalsubmerged city.
Comments
Please log in or sign up to comment.