Skip to content
AkerminMeasure. Monitor. Improve. Compare Products
Learning Center

How to Make a Soil Moisture Sensor Without Arduino

You want a simple way to know when a plant or bed needs water, without programming a microcontroller. A handful of parts, or even just a multimeter, will do the job if you understand what the probes are actually sensing.

The simplest version uses two metal probes pushed into the soil a fixed distance apart, one NPN transistor, two resistors, an LED and a 9 volt battery: wet soil conducts enough current into the transistor’s base to light the LED, dry soil does not. A ready-made probe with a comparator board does the same job with an adjustable threshold and a digital output that can drive an LED or buzzer directly. Whichever you build, calibrate it in your own soil, wet and dry, because fertiliser salts change the reading as much as water does, and use stainless steel or graphite probes to slow corrosion.

What a homemade probe really measures

Dry soil is a poor conductor. Water fills the spaces between particles and carries dissolved salts, which turn it into a weak electrolyte, so the electrical resistance between two probes falls as the soil gets wetter. A resistive sensor measures that resistance and treats it as a stand-in for moisture.

That is a useful shortcut with two catches. First, resistance depends on the salts as well as on the water, so a freshly fertilised pot reads wetter than it is, and rainwater-washed sand reads drier. Second, direct current passing through wet soil causes electrolysis, which corrodes the positive probe and slowly changes the reading. Commercial building moisture meters face the same physics in wood and plaster; our explainer on why moisture meter readings vary by material covers the same effect.

Capacitive sensors avoid the corrosion by measuring how much the soil changes the capacitance of a coated plate, which tracks water content more than salt content. They need an oscillator circuit, so they are a step up in complexity. The difference mirrors the pin versus pinless choice in professional meters.

Three ways to build one, compared

Design Parts Output Best for
Transistor and LED Two probes, NPN transistor, two resistors, LED, 9 V battery, push button LED lights when soil is moist Learning, a single pot, spot checks
Probe with comparator module Common two-prong probe, comparator board with trimmer, LED or buzzer, 3 to 5 V supply On or off at a threshold you set A dry-soil alarm or switching a small relay module
Multimeter and fixed probes Two stainless rods fixed in a block, digital multimeter Resistance number Comparing beds and logging trends by hand

Building the transistor version, step by step

  1. Make the probes. Use two stainless steel rods, long screws or graphite pencil leads, about 10 cm long. Fix them parallel and about 2 to 3 cm apart in a small block of wood or plastic, so the spacing never changes. Changing the spacing changes the reading, so readings only compare if it stays fixed.
  2. Connect the positive side. Battery positive goes to one probe and, separately, through a 470 ohm resistor to the LED’s long lead (anode). The LED’s short lead (cathode) goes to the transistor’s collector.
  3. Connect the sensing side. The other probe goes through a 10 kilohm resistor to the transistor’s base. That resistor protects the transistor if the probes touch.
  4. Add a threshold resistor. Fit a resistor of around 100 kilohms, or better a 100 kilohm trimmer, from base to emitter. It bleeds away small currents so the LED stays off until the soil is properly moist, and lets you adjust the trigger point.
  5. Ground the emitter. Transistor emitter goes to battery negative, through a push button if you want to save the battery and reduce probe corrosion.
  6. Test. Touch the probes together: the LED lights fully. Push the probes into a cup of dry soil, then add water slowly; the LED should come on as the soil reaches the moisture you want.

Why it works, in numbers: with 9 V and soil of about 50 kilohms between the probes, base current is roughly (9 minus 0.7) / (50,000 + 10,000), about 0.14 mA. A small transistor with a gain of around 100 could pass up to 14 mA, enough for a bright LED, which the 470 ohm resistor limits to about 15 mA. In dry soil at around 1 megohm, base current drops to about 8 microamps, and much of that flows through the threshold resistor instead, so the LED stays dark or barely glows.

If you would rather have the LED light when the soil is dry, add a second transistor to invert the signal, or use the comparator approach below.

The comparator module and the multimeter method

The two-prong probes sold for hobby electronics usually come with a small comparator board. It compares the probe voltage with a reference set by a trimmer and switches a digital output pin. That output can drive an LED and resistor, a small active buzzer, or the input of a relay module, with no microcontroller involved. Power it from 3 to 5 volts, push the probe into soil at the moisture level where you want the alarm, and turn the trimmer until the output just changes state.

The multimeter method needs no circuit at all. Set a digital multimeter to its resistance range, connect it to your fixed-spacing probe block, insert it to the same depth each time and read the number after a few seconds. The absolute value means little, but in the same soil a falling resistance means wetter soil and a rising one means drier. Write down readings right after a thorough watering and again when the plants first look thirsty, and you have your own scale.

Reverse the meter leads between readings, or take a reading and remove the probes promptly, because the small test current can polarise the soil around the probes and make the number creep.

Calibrating it and knowing when it is lying

Do a two-point check in the soil you will actually measure:

  • Fill a pot with that soil, water it until it drains freely, wait an hour, and note the reading or set the threshold. That is roughly field capacity, the wettest the soil stays.
  • Let it dry until the plant is just starting to wilt or the top few centimetres are dry, and note that reading too.
  • Your watering point sits between them, usually closer to the dry end for plants that dislike wet roots.

Repeat the check after you change fertiliser or potting mix. Signs the sensor needs attention:

  • readings drift steadily wetter or drier with no change in watering: probe corrosion or salt build-up, so clean or replace the probes;
  • one probe is dark, pitted or crusted: electrolysis, so switch to stainless or graphite and only power the circuit when reading;
  • readings jump when you move the cable: a loose joint.

A homemade sensor tells you wetter or drier, not percent water by volume. If you need true moisture figures, for building materials or professional inspection, a calibrated meter is the tool; our guide on how to choose a moisture meter explains the types. A wood or drywall meter is not calibrated for soil, so its percentage scale does not apply in a garden bed.

Build it this afternoon

Start with the transistor circuit on a breadboard, a push button in the emitter lead and a stainless probe block with fixed spacing, then set the threshold trimmer in a pot of your own soil right after a full watering. Check it again a week later against how the plant looks, and adjust the trimmer once, not every day.

Frequently Asked Questions

Can I use galvanised nails as probes?

They work for a short time, but the zinc coating corrodes quickly with current flowing and the reading drifts. Stainless steel or graphite lasts much longer, and powering the circuit only while you press a button slows corrosion further.

Why does my sensor say wet right after fertilising?

Dissolved fertiliser salts make the soil water more conductive, so resistance falls even though the water content has not changed. Recheck the threshold after feeding, or use a capacitive sensor, which is less affected by salts.

Can this circuit switch a water pump directly?

Not directly. The transistor and LED circuit is too weak, but the comparator board output can trigger a low-voltage relay module. Keep any mains-powered pump wiring inside a proper enclosure and have an electrician handle mains connections.

Does probe depth matter?

Yes. Surface soil dries first, so a short probe may say dry while the root zone is moist. Insert the probes to the depth where most roots are, and use the same depth every time.

Is a capacitive sensor worth the extra effort?

For a sensor left in the soil permanently, usually yes, because it does not corrode and is less influenced by salts. For quick spot checks, a resistive probe with a push button is simpler and good enough.