Close
0%
0%

Soil moisture measurement device

Control (visual and IoT) of soil moisture or air humidity w/ Raspberry Pi Pico

Similar projects worth following
This is a simple, durable and cheap soil moisture measurement device showing a double-digit value on two 7-Segment-Displays.

A probe (either resistive or capacitive type) delivers an analog value (i. e. voltage) representing the soil moisture, a Raspberry Pi Pico converts the sensor signal into a 16-bit (actually a 12-bit) digital value. This value is then mapped to a 00-99 range (i. e. 0% - 99% soil moisture) by means of a MicroPython algorithm.

Other sorts of sensors (e.g. HIH 4020, relative humidity) could be connected in lieu of a moisture sensor (with slightly modified SW).

I've also designed an IoT version of the device (not using Pico W, but Pico+ESP8266), without any display at all.

1. Prototypes

1.1 IoT design w/ capacitive probe

1.2 Visual control w/ capacitive probe

1.3 Visual control w/ resistive probe (very first prototype)

2. Soil moisture sensors

Either one of the following sensor types can be used for the moisture measurement (sensor output here connected to ADC0/GP26):

  • Capacitive type sensor HW-390 (also referred to as v2.0)
  • Resistive type sensor ME110

An initialization routine identifies the connected sensor type (see MicroPython code in my github repo). 

The capacitive probe ought to be preferred because that is the durable sensor that won't corrode - the anode metal of the ME110 will have vanished after a few hours of sticking in the soil (see photo below).

Both sensors show temperature dependency to some degree (roughly Δ 1% per Δ 1°K).

3. Humidity sensor

Prototypes are also used for relative humidity readings with HIH 4020 sensor (7-Segment-Display as well as IoT version). Parts of the already created algorithm had to be enhanced and modified for this obviously (see links to my github repo).

A basic output in a web browser (as to the ambient light sensor, see project log):

Note: there are some robustness measures for the webserver in place, such as using the HW watchdog and using a port different from standard http port 80 (that is dealing with a lot of useless data and requests what may generate confusion in an algorithm).

4. 7-Segment-Displays

I am using three different variants of common cathode 7-Segment-Displays which have slightly different electrical characteristics (they're identical in regards to geometry):

  • SC56-11GWA: green
  • SC56-11EWA: red
  • SC56-11YWA: yellow (those I personally like the most)

This means more precisely that red LEDs have the lowest threshold voltage, green LEDS the highest (keeping in mind the statistical dispersion with individual LEDs).

Notes:

1. Though the ADC of the Pico has some problems (see RP2040 documentation), it is surely good enough for this kind of application.

2. Driving the segments (i. e. LEDs) of the 7-Segment-Displays directly is probably not good an idea since one individual Pico GPIO can deliver 12 mA at most, and it is unclear what the Pico's supply current upper limit is (on all its GPIOs combined). The documentation states something about 50mA, what is clearly not enough to drive a lot of segments at once. 

3. The CD4511BE driver has a V_BE voltage drop (see data sheet), and so have the multiplexing transistors. That leads to a diminished voltage budget for the segment LEDs and the resistors R1-R7, respectively, what must be taken into account when calculating the resistor values.

5. Micro SD-Card

A Micro SD-Card on the SPI bus can be used to store measurement data (see examples in my github repo).

SFH300.pdf

Datasheet phototransistor

Adobe Portable Document Format - 399.44 kB - 07/18/2023 at 04:23

Preview

Characterization of Low-Cost Capacitive Soil Moisture Sensors for IoT Networks.pdf

Background information about the capacitive type sensor (source: google search).

Adobe Portable Document Format - 3.77 MB - 05/29/2023 at 08:00

Preview

Schematic-moisture-measurement-V1-2.JPG

The schematic for the most recent prototype.

JPEG Image - 152.52 kB - 03/05/2023 at 06:57

Preview

SC56-11EWA(Ver.13).pdf

7-Segment-Display red, common cathode. Green: SC56-11GWA. Yellow: SC56-11YWA.

Adobe Portable Document Format - 184.35 kB - 08/11/2021 at 15:03

Preview

Iduino-me110-bodenfeuchtesensor.pdf

Datasheet resistive type sensor.

Adobe Portable Document Format - 390.11 kB - 05/16/2021 at 05:56

Preview

View all 6 files

  • 1 × Raspberry Pi Pico Microcontroller board
  • 1 × Moisture Sensor Iduino ME110 (resistive) Probe
  • 7 × Resistor 47 Ohm Value can be increased for red 7-Segment-Displays
  • 1 × CD4511BE Logic ICs / Decoders, Encoders, Multiplexers, Demultiplexers
  • 1 × DIY Board or custom-made PCB plus cables, connectors etc.

View all 9 components

View all 4 project logs

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