Summary of Reverse Engineer a Cheap Wireless Soil Moisture Sensor
This post explores soil moisture sensors, comparing galvanic meters and resistive probes, and describes decoding signals from a cheap ~$10 wireless soil moisture sensor for use with Arduino or Raspberry Pi. It explains how galvanic sensors generate voltage via dissimilar metal electrodes and how resistive sensors measure soil conductivity via exposed probes, noting reliability concerns and automation approaches.
Parts used in the Cheap Wireless Soil Moisture Sensor Project:
- Cheap wireless soil moisture sensor (approx $10, Amazon)
- Soil probe with dissimilar metal electrodes (galvanic type)
- Resistive soil moisture probe (two exposed electrodes)
- Arduino (or compatible microcontroller)
- Raspberry Pi
- Analog input circuitry / voltage divider
- Wiring and connectors
- Power source for microcontroller (battery or USB)
At the Maker Faire this year I got lots of questions about soil moisture sensors, which I knew little about. So I started seriously researching the subject. I found a few different soil sensors, learned about their principles, and also learned about how to make my own. In this blog post, I will talk about a cheap wireless soil moisture sensor I found on Amazon.com for about $10, and how to use an Arduino or Raspberry Pi to decode the signal from the sensor, so you can use it directly in your own garden projects.
What is this?
A soil moisture sensor (or meter) measures the water content in soil. With it, you can easily tell when the soil needs more water or when it’s over-watered. The simplest soil sensor doesn’t even need battery. For example, this Rapitest Soil Meter, which I bought a few years ago, consists of simply a probe and a volt meter panel. The way it works is by using the Galvanic cell principle — essentially how a lemon battery or potato battery works. The probe is made of two electrodes of different metals. In the left picture below, the tip (dark silver color) is made of one type of metal (likely zinc), and the rest of the probe is made of another type of metal (likely copper, steel, or aluminum). When the probe is inserted into soil, it generates a small amount of voltage (typically a few hundred milli-volts to a couple of volts). The more water in the soil, the higher the generated voltage. This meter is pretty easy to use manually; but to automate the reading you need a microcontroller to read the value.
Resistive Soil Moisture Sensor
Another type of simple soil sensor is a resistive sensor (picture on the right above). It’s made of two exposed electrodes, and uses the fact that the more water the soil contains, the lower the resistance between the two electrodes. The resistance can be measured using a simple voltage dividier and an analog pin. While it’s very simple to construct, resistive sensors are not extremely reliable, because the exposed electrodes can degrade and get oxidized over time.
More detail: Reverse Engineer a Cheap Wireless Soil Moisture Sensor
- What does a soil moisture sensor measure?
It measures the water content in soil, indicating when to water or when soil is over-watered. - How does a galvanic soil meter work?
It uses two different metal electrodes to form a galvanic cell that generates a small voltage proportional to soil moisture. - Can a galvanic sensor be read by a microcontroller?
Yes; a microcontroller can read the generated voltage to automate moisture readings. - How does a resistive soil moisture sensor work?
It measures the resistance between two exposed electrodes, which decreases as soil moisture increases. - Can I use a simple voltage divider with a resistive sensor?
Yes; a voltage divider and an analog pin can be used to measure the resistance as a voltage. - Are resistive sensors reliable long-term?
No; exposed electrodes can degrade and oxidize over time, reducing reliability. - Do some soil moisture sensors require batteries?
No; the simplest galvanic meters can generate their own small voltage and may not need a battery for manual use. - Can the cheap wireless sensor be integrated with Arduino or Raspberry Pi?
Yes; the article describes decoding the sensor signal for use with Arduino or Raspberry Pi in garden projects.