Head office, Rana Pratap Bagh, Delhi011 2721 1512+91 97116 99511

Science project idea

Flood early warning post with an ultrasonic level sensor and a three-stage siren

An ultrasonic sensor on a model bridge watches the water level in a model river. As the level rises past three marks the NodeMCU lights green, yellow and red LEDs, sounds a siren at the red mark and shows the level on a phone page so a village downstream could see it.

What it shows

An ultrasonic sensor on a model bridge watches the water level in a model river. As the level rises past three marks the NodeMCU lights green, yellow and red LEDs, sounds a siren at the red mark and shows the level on a phone page so a village downstream could see it.

The science

The sensor measures the air gap to the water surface, so a falling distance means a rising river. Three thresholds set from the tray depth define normal, watch and danger stages. Each stage changes the LEDs, and the danger stage also pulses the buzzer. The ESP8266 serves a page with the level in cm and the stage, refreshed every two seconds, showing how a remote warning board works. Readings are averaged because ripples on the water scatter the echo.

Materials

Cost: under Rs 500. Many items come from home or from waste; spare parts such as LEDs, motors and wire are in the store.

  • A NodeMCU ESP8266 and USB cable
  • An HC-SR04 ultrasonic sensor with a 1k:2k divider for the echo
  • Green, yellow and red LEDs with 220 Ω resistors
  • A buzzer
  • A long plastic tray as the river and a cardboard bridge
  • A jug of water
  • A 5 V power bank

Safety

For this project: Keep the board on the bridge well above the water and the water tray on a table that can get wet. USB power only.

Never use mains electricity: power models with cells, batteries or a low-voltage adapter. Sharp and hot tools, flames and lab chemicals need an adult or your teacher beside you. Keep magnets, button cells and small parts away from young children, and wash your hands after making.

All the safety rules

Step by step

9 steps. Do them in order, and test each part before you go on to the next. Write what you notice in a notebook as you go.

  1. Build the bridge across the tray and fix the sensor underneath it, facing straight down.

  2. Wire the sensor TRIG to D5, ECHO through the divider to D6, VCC to Vin, GND to GND.

  3. Wire the LEDs to D1, D2 and D3 through resistors and the buzzer to D7.

  4. Measure the distance to the empty tray bottom and write it into the sketch as the zero level.

  5. Compute water level as the zero distance minus the measured distance, averaged over five readings.

  6. Set a watch level and a danger level, for example 3 cm and 6 cm.

  7. Light green below watch, yellow between, and red with a pulsing buzzer above danger.

  8. Serve a page showing the level and stage; open it on a phone as the downstream village.

  9. Pour water slowly and watch the stages change; note the level at each change for the report.

What you should see

The LEDs step from green to yellow to red as the water rises and the siren sounds at the danger mark; the phone page tracks the level live.

Viva questions

A teacher or a judge will ask how it works. Try to answer each question before you open it, then compare.

1Why average several readings?

Ripples reflect the ultrasound at angles, giving the odd wrong reading; averaging smooths them.

2How do real river gauges send data?

By mobile network or satellite from remote stations to a control room.

3Why three stages instead of one alarm?

People need time to prepare; a watch stage gives warning before the danger stage.

4What limits the sensor range?

The echo weakens with distance; the HC-SR04 is reliable to about 3 or 4 metres.

Free ebook: Viva Questions for Science Projects

Take it further

Compute the rate of rise in cm per minute and warn earlier when the water is rising fast.

Change one thing, measure what happens, and add a table or chart of your readings: that is what turns a model into your own investigation.

Free ebooks for this project

Find out more about electronics and robotics

Free, well-known places to explore the subject further. Ask a grown-up before you sign up for anything or type your name anywhere.

WhatsApp us