ohmio

Circuits / Sensors

Soil moisture LED with a YL-69 module

The damper the soil, the lower the fork's resistance and AO; past the trimmer's Vref DO goes low and sinks the LED's current

Soil moisture LED with a YL-69 module, simulated on a breadboard

Tap a part to see its voltages and currents. It is a model, not a measurement.

What do you need?

The AliExpress links are affiliate links: if you buy through them ohmio.dev gets a commission, at no extra cost to you. Affiliate links

This page is a guide: the numbers come from a simulation, and real parts vary. Check your parts before you power the circuit. Safety and responsibility

How does a soil sensor light an LED when the soil is damp?

The YL-69 probe is two metal prongs pushed into the soil. Damp soil conducts better, so the resistance between the prongs falls and AO falls with it: 4.24 V in dry soil (20 % moisture in the model) and 2.22 V at 70 %. The module's comparator watches AO against the trimmer's reference. When AO drops below it, DO goes from 5.00 V to 0.50 V. The green LED connects from 5 V through R1 (470 Ω) to DO, so it lights only when DO is low, and 5.35 mA flows through it. With the trimmer in the middle, the switch happens between 61 % and 62 % moisture in the model; at 0.7 it happens between 31 % and 35 % moisture. Real soils behave differently, so adjust the trimmer with your own soil. The prongs corrode under a steady current, so power the module only while you measure.

Values from the Protoboard ISO simulation: a model, not a bench measurement.