Close
0%
0%

Wireless Soil Moisture Sensor

PCB design for a capacitive soil moisture sensor. It uses LoRa to send information wirelessly to a server.

Similar projects worth following
WaterTime A Wireless Soil Moisture Monitor

This project is a wireless soil moisture monitor for gardening. It is a battery-operated unit that can be left in the soil and transmits an indication of the moister in the soil. In addition, a light sensor reading, a temperature reading, and the battery charge information is transmitted. An optional soil temperature sensor can be added to the circuit board for data logging.
The data is sent to a server using a standard Lora transceiver. This range should be several kilometers but was not tested. The unit just sends raw measured data, and the server should interpret the data as necessary.

WaterTime

A Wireless Soil Moisture Monitor

This project is a wireless soil moisture monitor for gardening. It is a battery-operated unit that can be left in the soil and transmits an indication of the moister in the soil. In addition, a light sensor reading, a temperature reading, and the battery charge information is transmitted. An optional soil temperature sensor can be added to the circuit board for data logging.

The data is sent to a server using a standard Lora transceiver. This range should be several kilometers but was not tested. The unit just sends raw measured data, and the server should interpret the data as necessary.

The Hardware

Shown below is a picture of one unit before it is fully assembled.  It is comprised of a circuit board that is 50 mm wide.  The pointed end of the circuit board protrudes from the enclosure and is inserted in the ground.  The upper portion, where the electronic circuitry resides, is inside the enclosure along with a LiPo battery. There is a hole in the top of the enclosure into which a photoresistor is glued.   The TO92 package in the center of the lower section is the optional soil temperature sensor.

Figure 1. Unit before final assembly.  The box at the bottom has the light sensor glued into the top.  The box has a slot cut into the bottom through which the lower part of the circuit board will go.  The cover at the top of the picture has a velcro strap that holds the battery.

Soil Moisture Measurement

WaterTime used the capacitance method of measuring soil moisture.  The lower part of the circuit board has two large copper-filled areas that act as capacitive plates to the spoil.  They are not directly connected.  When the soil is moist, the capacitance measured between the copper-filled areas is high.  As the soil moisture decreases, the capacitance reduces.

In the schematic, you will see an oscillator built out of two op amps that is used to measure the capacitance.  The left op amp is an integrator, and the right op amp is a comparator with hysteresis.  When the integrator is integrating up and crosses the upper threshold, comparator output flips which causes the integrator to integrate down.  When the lower threshold on the comparator crosses the comparator’s lower threshold, the output goes low, causing the integrator to integrate up again.

The rate of integration and thus the frequency of oscillation is controlled by R6 and the sensor capacitor, which are the copper-filled areas mentioned earlier.  When the soil is moist, and the  capacitance is high, the oscillator will run at a lower frequency.  The frequency will increases as the soil becomes drier.  I typically see about a 2 to 1 frequency difference between wet and too dry.  The actually frerencies will depend on the depth that the devices is inserted into the soil.

The output of the comparator is connected to a GPIO input on the Tiny2040 microcontroller.  That GPIO is configured as an input to the PWM counter.  The frequency is measured by resetting the counter and then enabling it to count for 1 second.  The resulting count is the frequency.

Two things to note about the copper areas that make up the sense capacitor.

  1. The length of the sensor area in the supplied board layout is longer than it needs to be.  On some of the sensors, I cut several inches off the bottom to have it fit properly in some plant pots.
  2. The green solder mask on the circuit board is not durable enough to withstand forcing the circuit board into the ground without expoing some of the copper.  Any exposed copper will corrode quickly.  So before final assembly, I applied two coats of marine varnish to the copper areas, including the soil temperature sensor.

Light Sensor

The light sensor is a photoresistor that is in a resistor voltage divider with a potentiometer and a fixed resistor.  The voltage at...

Read more »

WaterTime.csv

Parts List

text/csv - 1.88 kB - 07/03/2022 at 17:47

Download

WaterTime.pdf

PDF plot of schematic

application/pdf - 34.72 kB - 07/03/2022 at 17:24

Preview
Download

WaterTime.kicad_sch

Schematic in Kicad 6.0

- 85.34 kB - 07/03/2022 at 17:23

Download

WaterTime-gerbers.zip

Gerber files. These are the file sent to JLCPCB to create the PCB.

x-zip-compressed - 33.32 kB - 07/03/2022 at 17:22

Download

WaterTime.kicad_pcb

PCB design in KiCad 6

- 121.87 kB - 07/03/2022 at 17:11

Download

View all 6 files

  • 1 × RYLR896 LoRa Transceiver
  • 1 × Pimoroni Tiny2040 16 pin version of the Raspberry Pi Pico

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates