Soil moisture sensor project

C
Arduino
Algorithms

The project was done using Arduino ESP32 and a resistive soil moisture sensor. The goal of this was to find out how often the spiderwort plant needs to be watered. There is a file with a code I created to find out the percentage of moisture in the potting soil. The wiring for the project is GND to GND, VCC to 3.3V, and S to analog pin, which for me was pin 13. I declared pin 13 as an INPUT pin in the code setup after creating the global variable called soilPin. I used the map function to return values in percentage, so the value of the dry soil is 0, while the highest value of the wet soil is 2700 in volts. The graph below shows the results of the measurements that I was doing for 24 hour period. In conclusion, the spiderwort plant should be watered once per 2-3 days, especially on sunny days. The soil dries out not that fast, it takes some time.

0 Lifts 

Artifacts

Name Description
Code The file with the code I created for taking the data from the sensor.   Download
Video The video with an explanation of the goal of my project, the wiring of ESP 32 and soil moisture sensor, the code I created for measuring the data, and the conclusion.   Link