Soil moisture measurement device

Visual control of soil moisture w/ Raspberry Pi Pico

Similar projects worth following
This is a simple 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 representing the soil moisture, the Raspberry Pi Pico µC converts the sensor signal into a 16-bit (actually a 12-bit) digital value that then is mapped to a 00-99 range by an algorithm.

Excluding the µC and the probe itself, the material costs can be as low as 2€ (I bought a whole bag of 7-Segment-Displays on discount for around 3€, for example). With a custom made PCB, a capacitive sensor and the Pico 10-12€.

A first batch of PCBs was provided by the courtesy of

1. Prototypes

Current status as of August 2022

With capacitive type sensor.

Status as of April 2021

With resistive type sensor.

2. Further details about the project

Either one of these sensor types can be used when flashing the code from my github repository (with sensor output connected to ADC0/GP26, Pin 31):

  • Capacitive type sensor HW-390
  • Resistive type sensor ME110

The algorithm is capable of recognizing the connected sensor type during an initialization procedure.

Further HW/SW improvements may be:

  • new PCB design and getting rid of all the (green/white) wiring (that just maintains some flexibility with the prototype and is used for fault-injection test)


  • getting rid of 5 resistors and 1 CD4511BE IC by implementing a multiplexing logic (this measure reduces costs not significantly if there are just two display blocks)


  • Implementing IoT and wireless capabilities (not top priority, may increase the costs significantly)


  • power supply via solar cells
  • running several sensors simultaneously with one single PCB (e.g. switching every few seconds between the sensor values on the 7-Segment-Display)

Note 1: Driving the segments directly is probably not good an idea since one individual 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). My sources tell me something about 50mA, what is clearly not enough to drive a lot of segments at once (if you have all 14 segments activated - for "8 8" - there would be less than 5 mA available for each). 

Note 2: The CD4511BE driver has a V_BE voltage drop (see data sheet), and so has the multiplexing transistor. That leads to a diminished voltage budget for the LEDs and the resistors, respectively, what must be taken into account when calculating the resistor values.


Circuit diagram for improved prototype. R1-R7 between 47-100 Ohm. R8/R9 1kOhm.

JPEG Image - 110.64 kB - 07/31/2022 at 06:34



BJT for the multiplexing logic (here for SC56-11EWA, red). Many different BJTs possible, use what is at hand (e.g. BC337 or Darlington BC517).

Adobe Portable Document Format - 259.49 kB - 10/05/2021 at 12:24



Single Digit Numeric Display with common cathode.

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



Data sheet resistive type sensor.

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



CMOS BCD-to-7-Segment Latch Decoder Drivers. Note: VDD (Pin 16) = VBUS (5V). For common cathode 7-Segment-Display.

Adobe Portable Document Format - 1.18 MB - 03/30/2021 at 09:54


View all 6 files

  • 1 × Raspberry Pi Pico µC
  • 1 × Moisture Sensor Iduino ME110 (resistive) Probe
  • 7 × Resistor 47 Ohm Value should be increased for red 7-Segment-Displays (100 Ohm or even more). Never seen any problems with 47 Ohm resistors though
  • 1 × CD4511BE Logic ICs / Decoders, Encoders, Multiplexers, Demultiplexers
  • 1 × DIY Board or PCB plus cables, connectors etc.

View all 9 components

View all 3 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

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