Monitoring plant health is very important for its fast growth. In this busy world, people usually forget to water their plants which leads to bad growth and health of their plants. For ensuring complete development of plants it is necessary to know the amount of moisture present in the soil. Soil moisture sensor senses the amount of moisture present in the soil.
Soil Moisture sensor
Soil moisture sensors (Wikipedia) measure the volumetric water content in the soil. The two probes of the moisture sensor are connected to LM293 comparator. This sensor uses the two probes to pass current through the soil, and then it reads that resistance to get the moisture level.
How does soil moisture sensor work?
The Soil Moisture Sensor uses capacitance to measure the water content of soil (by measuring the dielectric permittivity of the soil, which is a function of the water content). The output from the sensor is an analog voltage value between 0 to 5V, which is linearly proportional to the moisture percentage of the soil.
Moisture Percentage = (Analog voltage * 100) / 1023 %
Circuit Diagram for the soil moisture sensor
The circuit of the soil moisture sensor is explained below:
- + pin of the comparator is connected to the 5V pin of the evive board.
- – pin of the comparator is connected to GND pin of the evive board.
- Out of AO(Analog output) and DO(digital output) AO pin is connected to the analog pin(here in our code we have used A0 pin) of the evive board.
In this example, we will display the moisture value on evive TFT Display:
- Open PictoBlox.
- Select the board as evive:
- Connect the evive.
- Make two variable to store the Sensor Value and Moisture Percentage:
- Create the following script using when evive starts up block:
- Upload the code onto evive:
You can download the PictoBlox program from here: Displaying soil moisture value on evive TFT Display