Mission
Build this
Design a collector, teach its sensor with measured additions, and raise an arm as the vessel remembers the rain.
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 | Water-level sensor | Two corrosion-resistant probes sampled briefly through a resistor |
| ● 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
Build a small place where weather has to leave evidence
Rain is hard to hold in your mind. It begins, changes its rhythm, slips into soil, and is gone. A collector interrupts that escape. For a while, the sky has to leave something behind.
Your vessel will catch water, measure how full it has become, and raise an arm as the evidence accumulates. The electronics are only half the instrument. The mouth of the collector decides what every millilitre means.
“The narrow jar looked fuller. The wide funnel had actually caught more rain.”
The central idea
Rainfall is depth spread over an area
Weather reports describe rain in millimetres. Imagine the rain staying exactly where it lands: 1 mm of rain would make a layer of water 1 mm deep across every path, leaf, roof, and funnel.
on a 100 cm² opening
inside the vessel
A wider opening catches more water from the same shower. That makes small rainfall easier to notice, but it also fills the vessel sooner. A narrow opening lasts longer but turns light rain into a tiny, difficult level change.
Wide mouth
More water per millimetre. Better detail. Earlier overflow.
Narrow mouth
Less water per millimetre. Longer range. Harder small changes.
How do volume and rainfall depth connect?
One millilitre is one cubic centimetre. A 1 mm layer is 0.1 cm deep. Over an opening of 100 cm², that layer has a volume of 100 × 0.1 = 10 cm³, or 10 mL.
For a measured opening in square centimetres: rainfall in millimetres equals collected millilitres × 10 ÷ opening area. Use that only after you have measured the real opening and checked for leaks, splashes, and overflow.
The vessel is part of the code
Shape decides what “half full” means
In a straight-sided jar, equal additions of water produce equal rises. In a tapered bottle, the same addition may raise the level a lot near the bottom and only a little near the top.
Straight walls
Easy conversion. Every centimetre holds roughly the same volume.
Tapered walls
Compact and easy to find. Needs a measured lookup table rather than a guess.
Funnel plus tube
Large catch area and sensitive level change. Must survive wind and splashing.
Measure its opening. Mark an overflow line. Add known water in equal steps. Let the real vessel teach your code how its level behaves.
Wiring
Keep the weather near the sensor, not the computer
Test the level sensor with measured water at the bench. Keep the ESP32, joints, and servo dry and physically above any possible spill.
The power rule: The level sensor uses 3V3. The servo uses a separate 5 V supply. Join the grounds, unplug USB while rewiring, and keep every exposed electrical joint dry.
Bench referenceOpen the exact wiring map
| ESP32 pin | Part | Part marking | Carries |
|---|---|---|---|
GPIO 34 | Water-level sensor | S / signal | Analog voltage — borrowed sensor, preferred; ADC1 works with Wi-Fi |
3V3 | Water-level sensor | + / VCC | 3V3 power — keeps the output safe for the ESP32 |
GND | Water-level sensor | − / GND | Ground |
GPIO 33 | Fallback lower probe | sense junction | Analog voltage — probe meets a 10 kΩ resistor to GND |
GPIO 25 | Fallback upper probe | brief supply | Digital in/out — HIGH only while sampling to slow corrosion |
GPIO 18 | SG90 servo | signal (orange) | PWM to actuator — raises the visible level arm |
external 5 V | SG90 servo | power (red) | 5V power — separate from the ESP32 supply |
GND | SG90 servo | ground (brown) | Ground — join servo and ESP32 grounds |
Use an ADC1 pin such as GPIO 34. If you use bare fallback probes, power them only during sampling. Never place the ESP32 where an overflow can reach it.
- Analog voltage
- 3V3 power
- Ground
- Digital in/out
- PWM to actuator
- 5V power
Use the borrowed sensor or the fallback, not both. Test the full vessel over a tray before it goes outdoors.
Give the water a visible memory
The arm should show level without pretending to be a ruler
The servo can lift an arm as the vessel fills, then tip a flag when it reaches your empty-me line. Decide whether the movement follows every percent or uses a few readable stages.
The arm rests near the vessel.
The arm climbs as water accumulates.
The flag changes pose before overflow.
Your team decides:
- What level means “empty me” and why?
- Does a brief splash count as rain, or must the rise persist?
- After emptying, how does the device recognise a new rainfall event?
Your measured storm
Make rain indoors before trusting rain outdoors
- Measure the collector.
Record the opening area, vessel shape, empty mark, and safe full mark.
- Add equal known volumes.
Use the same small cup or syringe for every step. Record sensor value and water depth.
- Repeat empty to full.
If the second curve differs, look for water clinging to the sensor, vessel movement, or probe corrosion.
- Run a waiting test.
Leave a known level for several hours and look for evaporation or leakage before calling every loss “no rain.”
| Added volume | Water depth | Sensor reading | Published level |
|---|---|---|---|
| 0 mL | 0 mm | ___ | 0% |
| ___ mL | ___ mm | ___ | ___% |
| safe full | ___ mm | ___ | 100% |
When the weather cheats
Not every level change is rainfall
The reading changes when the vessel is touched
The sensor or probe moved relative to the water. Fix both the vessel and sensing depth before calibrating again.
The level falls on a dry day
Look for evaporation, a slow leak, or water on the sensor surface. Mark the loss rate before interpreting new events.
A splash creates an instant “full” state
Require several readings or a persistent rise before changing status.
The fallback probe drifts and darkens
Current is corroding the metal. Power it only for a brief sample and recalibrate rather than hiding the drift.
The board resets when the arm rises
The servo needs its own 5 V supply, and the grounds must remain joined.
Choose your weather story
What kind of collector will you become?
The vessel architects
Make the opening and shape the experiment. Trade sensitivity, capacity, wind stability, and overflow.
The careful calibrators
Make repeatability the experiment. Build the best conversion from known additions to level.
The event historians
Make time the experiment. Separate fresh rain, accumulated water, evaporation, and emptying into a readable story.
A calm way through the build
Collect four small wins
rc-01says hello.Prove the garden connection before adding water.
- The sensor orders three levels correctly.
Test empty, middle, and safe full over a tray.
- Known additions create a repeatable scale.
Run the full calibration twice.
- The arm remembers without causing resets.
Add separate servo power, then rehearse filling and emptying.
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.
Water level
garden/outdoor-1/rain-node/rc-01/water-levelUnit: percent
Collector state
garden/outdoor-1/rain-node/rc-01/statusUnit: enum
Listen beyond your own device.
garden/outdoor-1/frost-node/fs-01/temperatureTemperature helps you discuss evaporation or freezing, but it cannot prove either one by itself. Use it as context alongside the level history.
Finish line
Ready to introduce to the garden
rc-01 stays online and publishes water level and collector state.
The reject feed stays clear after the final code starts.
The device reads the Frost Sentinel temperature topic.
The arm follows real level without resets and signals before overflow.
The build log records catchment area, known additions, two calibration runs, waiting loss, and one weather limitation.
Water cannot reach live electronics, the collector is stable, and the device label can be scanned.
You are not merely putting a sensor in a jar. You are deciding how a piece of sky becomes a measurement someone else can trust.