A Raspberry Pi Moisture Sensor to Monitor Your Plants

The sensor’s operating current is below 1 mA, so that it can be powered trough a GPIO pin.

Before use, the probe must be calibrated by recording sensor values when it is exposed to air or water. A 10 bit  ADC will map input voltage to integer values between 0 and 1023. Given that the sensor has a linear response, relative humidity (RH{c7f7cb1468c0d02af358b3ce02b96b7aadc0ce32ccb53258bc8958c0e25c05c4}) can be calculated with: formula

Due to its low power consumption, I connected the probe to a battery-driven TinyTX4  sensor board, which allows wireless transmission of sensor data to a MySQL database on my Raspberry Pi. Moisture levels can be followed by plotting RH vs. time using GNUplot.

Currently the probe is placed in a flowerpot with a diameter of approx. 45 cm. Peaks on the plot (after 2016-10-08) indicate addition of about 2 liters of water.  After watering, the signal increases as soon as the water has spread within the pot by capillary force.  With an average room temperature of 20 degrees Celsius, it takes about 7 to 8 days until the soil dried out  and the signal dropped to its initial value.

img_8218-1

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments