This shows you the differences between two versions of the page.
iothings:proiecte:2023:smartplantmonitoringsystem [2024/01/14 22:04] nicusor.drogeanu |
iothings:proiecte:2023:smartplantmonitoringsystem [2024/01/15 18:45] (current) nicusor.drogeanu |
||
---|---|---|---|
Line 2: | Line 2: | ||
Student: Nicusor-Mirel Drogeanu \\ | Student: Nicusor-Mirel Drogeanu \\ | ||
Master: ACES II \\ | Master: ACES II \\ | ||
- | Git repository: TODO \\ | + | Git repository: https://github.com/DrogeanuNicu/iot_project \\ |
- | Demo link: TODO \\ | + | Demo link: https://drive.google.com/file/d/1pQIGBkYDs_wFQoDo-eFxLSXitbUCK-s_/view?usp=sharing \\ |
- | Presentation: TODO \\ | + | Presentation: https://docs.google.com/presentation/d/1S5WGhz_DkgjawbWLUeJ0xflm8HtqspAb/edit?usp=drive_link |
====== Project Description ====== | ====== Project Description ====== | ||
Line 11: | Line 11: | ||
====== Hardware Description ====== | ====== Hardware Description ====== | ||
The hardware components needed for the project are: | The hardware components needed for the project are: | ||
- | * ESP32 board - The main microcontroller of the application, it is used to connect to WiFI in order to send MQTT messages. | + | * ESP32 board - The main micro-controller of the application, it is used to connect to WiFI in order to send MQTT messages. |
* DHT11 - The sensor used to collect the temperature and the air humidity. | * DHT11 - The sensor used to collect the temperature and the air humidity. | ||
- | * Soil moisture senzor - Used to get the moisture level of the soil. | + | * Soil moisture sensor - Used to get the moisture level of the soil. |
* LCD with I2C - Used to display the collected data. | * LCD with I2C - Used to display the collected data. | ||
* DC Motor - Used to control the fan. | * DC Motor - Used to control the fan. | ||
Line 19: | Line 19: | ||
* 12V DC power supply - Used to power the pump. | * 12V DC power supply - Used to power the pump. | ||
* 2 relays - To control the fan and the pump. | * 2 relays - To control the fan and the pump. | ||
- | * 10 K resistor - USed for the DHT11 sensor. | + | * 10 K resistor - Used for the DHT11 sensor. |
* Breadboard | * Breadboard | ||
* Wires | * Wires | ||
Line 32: | Line 32: | ||
{{:iothings:proiecte:2023:setup_drogeanu_iot_project2.jpeg?600|}} | {{:iothings:proiecte:2023:setup_drogeanu_iot_project2.jpeg?600|}} | ||
+ | |||
+ | {{:iothings:proiecte:2023:full_setup_iot_drogeanu.png?800|}} | ||
+ | |||
====== Software Description ====== | ====== Software Description ====== | ||
Line 50: | Line 53: | ||
+ | Backend software diagram: | ||
+ | |||
+ | {{:iothings:proiecte:2023:server_sw_diagram_iot_drogeanu.png?800|}} | ||
+ | |||
+ | A flask application runs on RPI5, it communicates with the MQTT broker, Mosquitto, and responds to the user's HTTP requests. | ||
+ | A virtual python environment was used for development, so porting the application is easy. | ||
+ | |||
+ | Frontend software diagram: | ||
+ | |||
+ | {{:iothings:proiecte:2023:frontend_sw_diagram_iot_drogeanu.png?400|}} | ||
+ | |||
+ | React was used for the frontend. The application does fetch for the limits already set and also a dataset to render on the graphical components like table and graph. Then an interval is set to fetch the data every second. | ||
+ | |||
+ | ====== Web interface ====== | ||
+ | |||
+ | {{:iothings:proiecte:2023:web_interface-iot-drogeanu.png?800|}} | ||
+ | |||
+ | The web interface presents a chart, a table, one fan status switch, one pump status switch and a download button. | ||
+ | The chart allows to enable or disable the characteristics to allow observations only on a certain characteristic | ||
+ | Each characteristic in the table has an upper and a lower limit option, which can be changed according to the plant's needs. | ||
+ | By pressing the "Download" button, the user will get all the collected data in a "csv" format. | ||
+ | |||
+ | ====== Conclusions ====== | ||
+ | |||
+ | In conclusion, ESP32 is a fantastic option for an IoT project because of the different connection options it has. | ||
+ | Using ESP-IDF compared to Arduino has proven to provide more support for handling tasks on ESP32, thus allowing efficient use of hardware resources. | ||
+ | Using a web framework like Flask for the backend was a good choice, considering the scalability of this application. | ||