Mission
Build this
Build a soil listener, teach it wet and dry reference points, and let its antenna droop as the local soil dries.
Borrowed parts are labelled below and have a fallback. The registered device ID is fixed; sensing and behaviour decisions remain yours.
Bill of materials
Parts
| Source | Part | Fallback |
|---|---|---|
| ○ fablab | Capacitive soil-moisture probe | Two jumper probes and a 10 kΩ resistor, powered only while sampling |
| ● kit | SG90 servo | — |
Disconnect USB before rewiring. Motors, the relay, and the servo need appropriate power and a shared ground. Never drive an actuator from the ESP32 3V3 pin.
Your invitation
A pot keeps most of its life underground
The surface can look dry while the roots are comfortable. It can look dark and damp while a pocket below has already emptied. Your probe is a tiny witness sent into a place your eyes cannot visit.
It will not speak for the whole plant automatically. It only knows the soil touching its blade. Your job is to learn what that local signal means, then decide how honestly it can speak for the pot.
“Am I measuring water, or am I measuring where I happened to put the probe?”
The central idea
The probe gives a voice. You teach it the language.
The first number you see may be 1,460 or 2,930. Neither number means “wet.” It is a raw response from one probe, in one soil, at one position.
To create a useful percentage, show the probe two situations you understand: soil you agree to call dry, and soil that has been watered and allowed to drain. Those become the ends of your scale.
Not “all water has vanished.” The repeatable dry condition your team documented.
Watered fully, then left to drain so the pot is wet without standing in water.
It does not claim that half the pot is water. It says where today’s reading sits between two reference conditions you can repeat.
How can the probe notice water without tasting it?
The preferred probe has coated conductors that interact electrically with the nearby soil. Water changes how much electrical charge that little region can store, and the probe turns the change into a voltage for the ESP32.
The two-wire fallback sends a small current through the soil instead. Salts affect it and the exposed metal slowly corrodes, so power it only for the brief moment you take a reading. The two probe types may move in opposite numerical directions as soil dries.
Choose your witness
Two routes into the soil
The coated blade
Lasts longer and is less disturbed by fertiliser salts. Mark its depth and never bury the electronics at the top.
The two brief wires
Simple and revealing, but it changes while you use it. Treat corrosion and drift as part of the result.
Fit one route, not both. Whichever you use, fix the position before calibration. Moving the probe later is like moving a weather station to another town and pretending nothing changed.
Wiring
Listen first, move the antenna later
Read the probe in Serial Monitor before you create percentages. Add the servo only after wet soil and drying soil produce a dependable direction of change.
The power rule: The probe uses 3V3. The servo uses a separate 5 V supply. Join the grounds and disconnect USB while rewiring.
Bench referenceOpen the exact wiring map
| ESP32 pin | Part | Part marking | Carries |
|---|---|---|---|
GPIO 34 | Capacitive probe | AOUT | Analog voltage — borrowed probe, preferred; ADC1 keeps working with Wi-Fi on |
3V3 | Capacitive probe | VCC | 3V3 power — 3.3 V keeps its output safe for the ESP32 |
GND | Capacitive probe | GND | Ground |
GPIO 33 | Fallback probe | sensing wire | Analog voltage — junction of the probe and a 10 kΩ resistor to GND |
GPIO 25 | Fallback probe | supply wire | Digital in/out — HIGH only while sampling, then LOW to slow corrosion |
GPIO 18 | SG90 servo | signal (orange) | PWM to actuator — moves the drooping antenna |
external 5 V | SG90 servo | power (red) | 5V power — its own supply, never 3V3 |
GND | SG90 servo | ground (brown) | Ground — join servo and ESP32 grounds |
Use an ADC1 input, GPIO 32 to 39, because ADC2 stops reading when Wi-Fi runs. If you use the bare-wire fallback, power it only during a sample.
- Analog voltage
- 3V3 power
- Ground
- Digital in/out
- PWM to actuator
- 5V power
Mark the probe depth and orientation on the pot. The calibration belongs to that exact placement.
Give thirst a posture
How should uncertainty droop?
A steadily falling percentage can lower the antenna. A just-watered pot can perk it up. But a single odd reading should not make the creature panic.
Near the team’s wet reference.
Between the references and still changing.
Near the dry reference for several readings.
Your team decides:
- Does the antenna show the percentage or the speed of drying?
- How many readings must agree before the pose changes?
- What pose means “I do not trust this reading”?
Your underground expedition
Move the question, not just the probe
- Fix two anchors.
Record your documented dry condition and your watered-then-drained condition.
- Choose one middle state.
Let the pot dry partway or add a measured amount of water. Predict where it should land before looking.
- Test three positions.
At the end of the run, repeat at the edge, centre, and a second depth. Do not average them into one tidy answer.
- Return to an anchor.
If the original reference moved, your scale has drifted. Report that movement instead of quietly recalibrating it away.
Write down what the number cannot show.
| Condition | Raw reading | Published % | Position and soil |
|---|---|---|---|
| dry reference | ___ | 0% | ___ |
| middle state | ___ | ___ | ___ |
| wet reference | ___ | 100% | ___ |
When it gets dramatic
The soil may be changing the experiment
The percentage jumps when the pot is nudged
An air gap opened or the blade reached different soil. Fix and mark the placement, then recalibrate.
Two equally watered pots disagree
Soil mix, compaction, pot size, and probe position all affect the signal. Calibrate each pot separately.
The reading freezes when Wi-Fi starts
The probe is on ADC2. Move it to an ADC1 pin such as GPIO 34.
The fallback wires darken and the scale wanders
Current is corroding them. Power the probe only while sampling and make the drift part of your evidence.
The antenna resets the whole device
The servo needs its own 5 V supply. Keep its ground connected to the ESP32 ground.
Choose your direction
What kind of soil listener will you become?
The careful calibrators
Weigh the pot at both anchors and connect your electrical scale to measured water mass.
The root cartographers
Map how one pot differs by depth and position. Make the probe’s tiny field of view the main question.
The drift watchers
Repeat one reference each day and study how soil, probe, and time slowly change the language.
A calm way through the build
Collect four small wins
th-01says hello.Join the garden before touching the soil.
- The raw number moves in a sensible direction.
Compare air, dry soil, and wet soil without converting anything.
- Two anchors create a scale.
Document the pot, soil, depth, dry reference, and wet reference.
- The antenna moves without disturbing the reading.
Add separate servo power, then begin the placement experiment.
The garden handshake
Share what you found
These names are the rigid part of the project. They let another team find your work without knowing what you called the variables in your code.
Soil moisture
garden/greenhouse-2/moisture-node/th-01/soil-moistureUnit: percent
Listen beyond your own device.
garden/greenhouse-1/light-node/sc-01/light-levelLight helps explain why the surface may dry faster on one day than another. Use it as context, not as proof that light alone caused the change.
Finish line
Ready to introduce to the garden
th-01 stays online and publishes its calibrated percentage every five minutes.
The reject feed stays clear after the final code starts.
The device reads the Sun Chaser light-level topic.
The antenna responds to real readings without resetting the board.
The build log records both anchors, probe placement, repeated positions, and one limit of the percentage.
The probe electronics stay dry, the wiring is protected, and the device label can be scanned.
You are not proving that a plant is thirsty. You are building an honest local witness and learning how far its testimony reaches.