← All articles

6 November 2026

Rain Sensor: How an Automatic Cover Knows It's Raining

Illustration of an automatic rain cover: a rain sensor detects water and pulls the cover out

A sunny midday, laundry hanging in the yard, and then — out of nowhere — dark clouds and a sudden downpour. By the time anyone runs outside, everything is soaked. It's a familiar scene in any home where a rainstorm can arrive in ten minutes.

But some homes never have soaked laundry: the cover over their yard slides out by itself the moment the first raindrop falls. Nobody presses a button, nobody runs to pull it. There's just a small board outside, a servo motor, and one simple rule. Behind that automatic cover is one of the best first robotics lessons for kids: machines can sense water — and then act on their own.

How does a rain sensor "taste" water?

A rain sensor looks like a small circuit board with metal traces zigzagging across its surface like a racetrack. When the board is dry, the two traces never touch — no current can flow, like two riverbanks with no bridge. When a raindrop lands on the board, the water connects the two traces. Water conducts electricity, even just a little, and current starts to flow.

The circuit measures that current and turns it into a number: a perfectly dry board reads 1023, a soaking board reads 0, and a light drizzle lands somewhere in between. The more water, the smaller the number. The sensor doesn't "see" rain — it measures how much water has bridged the gap between its metal traces.

Compare that with how we know it's raining: skin feels the chill, ears hear the patter on the roof, eyes see the drops fall. The rain sensor has only one sense — conductivity — but that one sense is precise enough for a machine to decide. It never gets distracted, never falls asleep, and it watches the sky all day and all night.

Here's a fun detail: the rain sensor works almost exactly like the soil moisture sensor used in automatic plant watering — a project we covered earlier. Both measure water by measuring resistance; one measures water on a board, the other measures water in soil. Learn one sensor, and you've understood a whole family of them.

The rain threshold — how much water is enough to pull the cover?

Once there's a number, the cover needs a rule: if the rain reading drops below the threshold, pull the cover out; otherwise, keep it folded. Engineers set the threshold at 500. A reading of 800 — the board nearly dry, just a few drops of dew — the cover stays folded. A reading of 300 — steady rain — the cover slides out. One little "if... then..." runs hundreds of times a minute, and the cover is always out at the right moment.

The threshold should sound familiar if your child read our post about lights that turn on when it gets dark: the light switches on when brightness falls below a threshold; the cover slides out when rain passes a threshold. Same idea, different sensor, different action. That's how robotics works — a loop of sensing, deciding, and acting, over and over.

Kids will naturally ask: what should the threshold be? Too high, and the cover pops out for morning dew — annoying. Too low, and it opens late, with the laundry already half wet. There's no single right answer; whoever builds the system has to test, watch, and tune it. That is exactly what engineers do: not get it perfect the first time, but test and adjust until it feels right.

From a number to a moving cover: how the servo pulls it

The sensor can only measure; it can't pull a cover. That job belongs to the servo motor — the kind of motor that turns to exactly the angle you command, as we saw when we compared servos with ordinary motors. The servo connects to the cover with a string or a lever arm: it turns 90 degrees, the string pulls the cover open; it turns back, the cover folds away.

The full chain looks like this: rain lands on the sensor board → the reading drops below the threshold → the circuit tells the servo to turn → the cover slides out over the yard. The rain stops, the board dries, the reading climbs back above the threshold → the servo turns back → the cover folds away and the yard is sunny again. A complete loop: sense, decide, act.

That's why this project is so great for kids new to robotics: it packs all three parts of a real robot into one small, cheap project you can build in your own yard. The sensor is the sense, the circuit and code are the brain, the servo is the hand. Kids see it immediately: a robot isn't something far away — it's just these three parts, connected.

Three games that help your child "feel" rain like a sensor

  1. The "water bridge" game: lay two metal wires side by side on a plastic board, connect them to a small LED and a battery. Drip water between the wires and watch: the LED glows brighter with every drop. Your child sees with their own eyes how water bridges electricity — the exact principle behind a real rain sensor.
  2. Chart a week of rain: every afternoon, your child notes whether it was sunny or rainy, heavy or light, and draws it as a chart. After a week, they'll guess which hour of the day rains most — and understand why an automatic cover has to work all day, not just when someone is home.
  3. The "person–cover" game: build a paper cover over a toy yard; one person plays the sensor (only allowed to watch the sky), another plays the servo (only allowed to follow orders). The sensor shouts "RAIN!" at the first drop, the servo pulls the cover out. Play a few rounds, then change the threshold: only shout once the rain is properly falling. Kids discover fast: deciding when it's "rainy enough" is much harder than pulling the cover.

How your child learns this on ManuStem

On stem.manusignal.com, your child connects a rain sensor to a circuit right in the browser — no kit to buy, no delivery to wait for. Simulated rain falls on screen, the rain reading rises and falls in real time, and a 3D cover slides out when the rain passes the threshold. If the wiring is wrong or the code doesn't run, the AI coach points out the mistake and suggests a fix in Vietnamese or English, like a teacher sitting beside them.

The course has 28 lessons — 8 in the Component Lab and 20 in the Competition Robot track — for kids aged 8 and up, taught in Vietnamese and English, with 4 free trial lessons. The rain sensor is just one of the components your child will get their hands on: after that come the ultrasonic sensor, the gas sensor, stepper motors, and even programming a competition robot in C++ on the ESP32 kit for ages 13 and up.

Nobody knows when the next sudden shower will arrive — but your home's cover can know. Let your child build the first cover that "hears" the rain.


Let your child build an automatic rain cover today — no kit needed, 4 free trial lessons at stem.manusignal.com.

Read the Vietnamese version:

Cảm biến mưa: mái che tự động mở ra như thế nào khi trời mưa