This code comes with this prototype board and must be implemented in an Arduino MKR FOX 1200 : https://oshwlab.com/Thejulfi/final_iot_ouivalo
/!\ : The following documentation mainly concerns the C code (stored in OUIVALO_IoT/Sigfox_comm/
).
This project is an energy-efficient RFID smart lock for composter bins. The lock is driven by a motor, and the "open" and "closed" states are recognized thanks to two end switches.
Energy-efficient means that the whole system should run on batteries for at least two month.
The Arduino MKR FOX 1200 and the DHT22 send data to a Sigfox backend.
The operating routine work as follow :
- Someone wakes up the system,
- An RFID badge is detected,
- Latch opening and data transmission through Sigfox,
- The system goes to sleep,
- Compost's Bin closing,
- Latch closing and the system goes back to sleep.
The goal of such a system is to modernize a composter bins fleet, and gathering data such as temperature, humidity, UID and hour of opening, and so on.
- Clone the repository in your platformio folder :
path_to_platformio/PlatformIO/Projects/
- Open Platformio and the project folder
- Congrats, you have now access to the source of the project in
OUIVALO_IoT/Sigfox_comm/src/
- Copy what's inside
OUIVALO_IoT/Sigfox_comm/src/
inYour_arduinoIDE_project/
- Congrats, now you just need to open your project with Arduino IDE
The loop of this system works according to operating modes. There is 5 operating mode listed bellow :
- INIT : turning on all sensors,
- ON_MOTOR : turing motors to close or open the latch (according to the ROUTINE_FLAG),
- ROUTINE : attempt to detect an RFID card and message construction,
- SEND_MSG : When the system send a message to the Sigfox backend,
- SLEEPING : When the entire system goes into sleep mode.
Features that are implemented for data feedback and future arrivals.
- : Temperature and humidity sensor
- : Battery level sensor
- : UID
- : Executing time sensor
- : fill level sensor