Wireless Sensing

I haven’t posted about soil moisture sensors in ages, but I’ve completed a number of iterations and I thought it’d be fun to look over the evolution of the hardware. My goal has been to build a small, low power, inexpensive device, that I can place in indoor and outdoor plants to collect soil moisture, light, and temperature readings. I shared some early information on sensors more than a year ago and will have more to share, but this post will focus on the wireless sensor relay.

This device collects readings from one or more sensors at an interval (15 minutes), then broadcasts the readings to a receiver that uploads data to a store where I can crunch numbers, trigger alerts, and generate graphs.



Hobby-friendly PCB shops typically have a 2-week turn around. I’m new to this and wanted to prototype at my own pace, so I made my first boards on a CNC router. These are “channel isolation” boards, where an an outline is etched around the conductive channels on a copper clad board.


Ultimately, this enabled me to knock out a few boards in a weekend, but it required a lot of experimentation, tweaking, and router bits to get usable results. Producing a single board required a lot of effort to calibrate the CNC for two routing passes (for 2 sided boards) and drilling. A minor leveling or alignment issue would result in a useless board. Once I found a reasonable design, I moved over to a PCB shop, trading long turn-around times for less overall effort and more consistent results.


I experimented with a handful of different radios, but mostly focused on the TI CC2500 and Nordic NRF24L01. Both are available as ~12mm X 20mm modules with a trace antenna. The best price I found for the CC2500 at volume was about $2.00. The NRF24L01 was about twice that. The CC2500 was very inexpensive and has very low idle-time power consumption. But it required a lot of work to configure properly and handle errors. In my experience, it worked very poorly in the presence of noise from other CC2500s. The NRF24L01 worked out of the box, had better range, and was more resilient to interference. Ultimately, I tired of debugging the CC2500 and elected for the pricier NRF24L01.


“Final” Product

My latest iteration is a 1.45″ square board, with screw terminals for any combination of 3 temperature, light, and moisture sensors. It uses the Nordic NRF24L01 2.4ghz radio with trace antenna, which gives it enough range to work anywhere inside or immediately outside my house. It runs on an Atmel AtTiny24 microcontroller. The sensor readings are taken from the AtTiny’s on board ADC (Analog-to-Digital Converter). The whole unit is powered by a 3.3V battery. Sensing and reporting every 15 minutes, the battery should last 2-3 years.

Moisture Sensors

I grow plants. For a time, I’ve wanted a low-cost sensor that can live in my plants and broadcast information about temperature, light, water, and drainage that I can compare to ideal growing conditions. I’ve set out to build such a device. This post focuses exclusively on the moisture sensor component.

Commercial grade soil moisture sensors are available, but they are cost-prohibitive for placing in dozens of plants, rather large, and sometimes have very high power requirements for a small device. I’ll need to make this component myself.

I have a handful of designs in mind for the sensor. A couple of other hobbyist projects use a variation on the gypsum block sensor:

I’ve elected for a different design because plaster is quick to absorb moisture and slow to dry. As a result, gypsum block sensors may provide a less granular measure and can inaccurately represent the wetness of the surrounding soil (perhaps I should prove this assertion?).

The designs I’m considering generally share a common component: The sensor is a simple design involving a pair of concentric electrodes, sand as a neutral moisture medium, and a plaster disk to filter out salts or impurities that may cause errors in measurement. These parts are assembled inside a 1/2″ plastic tube cap.


This is a resistive sensor that works when an external device applies a voltage across the electrodes. The medium between the electrodes (in this case, sand) acts as a resistor. As the moisture in the medium varies, the voltage carried across the electrodes varies. This voltage can be measured to determine how wet the medium is.




At the start of the test, I arranged the sensors in a pot of sand, then fully saturated the sand with water. The test ran for about three days, sampling (excessively) once every 30 seconds. Below is a plot of the measure taken by the four devices at 15-minute granularity.


While the measurements from the four devices are relatively consistent, there’s room for improvement in both precision (note the poor measurement granularity and flapping) and consistency across devices (I seem to have one “wet” sensor and one “dry” sensor). A few adjustments should offer an improvement.