DIY Hydroelectric Dam

DIY Hydroelectric Dam: A Fun Robotics & Renewable Energy Project for Kids
🤖 Robotics & Renewable Energy · Ages 11+

Build Your Own Hydroelectric Dam!

Water falls, a turbine spins, and real electricity is born — while a smart servo-controlled gate watches the reservoir and manages the water supply all on its own.

⏱️ A weekend project 🧩 Intermediate 💧 Real electricity generated 👨‍👩‍👧 Adult help needed for wiring

🧰 What You'll Need

Most parts are common hobby-electronics components, plus a few household items for the dam structure.

🔷

Arduino Uno (1x)

Reads the sensors and controls the gate.

🌀

Small DC motor (1x)

Spun by falling water, it works in reverse as a generator.

🪁

Mini turbine wheel

A small pinwheel or paddle wheel attached to the motor shaft.

🦾

SG90 servo motor (1x)

Controls the dam's sluice gate to manage water flow.

📡

Ultrasonic distance sensor (HC-SR04)

Measures how much water is left in the reservoir.

📟

16x2 I2C LCD display

Your live dashboard for water level and voltage generated.

💡

Small LED

Lights up directly from the generator — real electricity in action!

🔩

Resistors & a diode

Build a voltage divider and protect the Arduino's input pin.

🧴

Plastic bottle reservoir & waterproof tray

Holds the water supply and catches run-off safely.

⚙️ How Does It Work?

The same basic idea behind giant power-station dams, shrunk down to tabletop size.

1. Water falls

Water drops from the reservoir through the open gate.

2. Turbine spins

Falling water turns the mini turbine and generator.

VOLTAGE 1.8V

3. Power is shown

The dashboard displays the electricity being generated.

A DC motor normally uses electricity to spin. Run it backwards — by spinning its shaft instead — and it does the opposite: it generates a small electrical voltage. That's exactly what happens when falling water spins the turbine wheel attached to the motor.

An ultrasonic sensor constantly measures the distance down to the water's surface in the reservoir, so the Arduino always knows the current water level. Using that reading, it adjusts the servo-controlled gate — opening it wider when there's plenty of water, and closing it to conserve water when supplies run low.

Meanwhile, the LCD dashboard shows the water level, the voltage being generated, and the gate's current position, all updating live.

🔌 The Circuit Diagram

The generator's own power lights an LED directly, while the Arduino separately monitors its voltage through a divider.

Arduino Uno USB reads sensor + voltage Ultrasonic Sensor Trig → 9, Echo → 8 Gate Servo signal → pin 10 Voltage Divider generator → resistors → A0 diode protects the input DC Motor "Generator" spun by the turbine wheel also lights a demo LED 16x2 LCD I2C — A4 / A5 Demo LED wired straight to generator
Arduino PinConnects ToNotes
Pin 9 / Pin 8Ultrasonic sensor Trig / EchoMeasures water level
Pin 10Gate servo — signalOpens and closes the sluice gate
A0Voltage divider (from generator)Safely scales down the generator's voltage
A4 / A5LCD SDA / SCLLive water level & voltage dashboard
Generator (+) / (–)Demo LED (+ resistor)Separate circuit — lit directly by generated power
Diode (in series)Between generator and dividerProtects the Arduino's analog input

🛠️ Let's Build It — Step by Step

Build the reservoir

Cut a spout near the bottom of a plastic bottle and mount it up high on a stand, above the rest of the model.

Attach the sluice gate

Fit a small flap or valve over the spout, connected to the servo so it can swing open and closed.

Build the turbine

Attach a small pinwheel or paddle wheel to the DC motor's shaft, positioned where falling water will spin it.

Mount the generator

Fix the motor securely below the gate so the turbine sits directly in the path of the falling water, above a waterproof catch tray.

Wire the voltage divider

Connect the generator's output through the resistor divider and diode into the Arduino's analog pin, and wire a separate demo LED straight to the generator.

Add the sensor and display

Mount the ultrasonic sensor above the reservoir facing down at the water, and wire up the LCD dashboard.

Upload the code

Flash the sketch from the next section using the Arduino IDE, after installing the required libraries.

Fill, test, and watch it work

Fill the reservoir, power on the system, and watch the gate open, the turbine spin, and the LED light up as the dashboard updates live.

💻 Time to Code!

This sketch measures the water level, reads the generator's voltage, manages the gate, and updates the dashboard.

Install the LiquidCrystal I2C and Servo libraries from the Library Manager, then upload this sketch to your Arduino Uno.

// DIY Hydroelectric Dam
// Measures water level, reads generated voltage, and manages the gate

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Servo.h>

#define TRIG_PIN 9
#define ECHO_PIN 8
#define GATE_SERVO_PIN 10
#define VOLTAGE_PIN A0

LiquidCrystal_I2C lcd(0x27, 16, 2);
Servo gateServo;

const float reservoirHeight = 20.0;  // cm from sensor down to the empty bottom
const float dividerRatio = 2.0;       // (R1+R2)/R2 — match your resistor values

void setup() {
  pinMode(TRIG_PIN, OUTPUT);
  pinMode(ECHO_PIN, INPUT);

  gateServo.attach(GATE_SERVO_PIN);
  gateServo.write(0);  // gate starts closed

  lcd.init();
  lcd.backlight();
}

float readDistance() {
  digitalWrite(TRIG_PIN, LOW);
  delayMicroseconds(2);
  digitalWrite(TRIG_PIN, HIGH);
  delayMicroseconds(10);
  digitalWrite(TRIG_PIN, LOW);

  long duration = pulseIn(ECHO_PIN, HIGH, 30000);
  float distance = duration * 0.0343 / 2.0;  // speed of sound in cm/microsecond
  return distance;
}

void loop() {
  float distance = readDistance();
  float waterLevel = reservoirHeight - distance;
  if (waterLevel < 0) waterLevel = 0;

  int rawReading = analogRead(VOLTAGE_PIN);
  float measuredVoltage = (rawReading / 1023.0) * 5.0;
  float generatorVoltage = measuredVoltage * dividerRatio;

  int gateAngle;
  if (waterLevel > 15)       gateAngle = 90;  // plenty of water — open wide
  else if (waterLevel > 5)  gateAngle = 45;  // medium level — open halfway
  else                           gateAngle = 0;   // running low — close to save water

  gateServo.write(gateAngle);

  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Lvl:"); lcd.print(waterLevel, 1); lcd.print("cm ");
  lcd.print("V:"); lcd.print(generatorVoltage, 2);

  lcd.setCursor(0, 1);
  if (waterLevel < 2) {
    lcd.print("Refill reservoir!");
  } else {
    lcd.print("Gate: "); lcd.print(gateAngle); lcd.print(" deg");
  }

  delay(500);
}
Tip: Measure your voltage divider's actual resistors and recalculate dividerRatio for an accurate voltage reading.
Tip: Measure your reservoir with the sensor empty and full to set an accurate reservoirHeight value.
Challenge: Add a second LED that only lights up when the generator produces over a chosen voltage, like a "power online" indicator.

🛡️ Safety First

⚠️

This project mixes water and electronics, so take extra care with waterproofing.

  • Keep the Arduino, sensor, and servo body completely dry — only the turbine and generator section should ever get wet.
  • Build over a waterproof catch tray to collect every drop of run-off water.
  • Use only safe, low-voltage DC power — never connect this project to household mains electricity.
  • Ask an adult to help with wiring the voltage divider and diode correctly.
  • Unplug the power and empty the reservoir before changing any wiring.

✨ Fun Hydropower Facts

A little energy science to share while your dam generates its first watts.

🌊

Hydropower is one of the oldest renewable energy sources, dating back to ancient water wheels.

⚡

Hydroelectric dams generate electricity the same basic way your model does — just at a massive scale.

🌍

Hydropower produces a large share of the world's renewable electricity today.

🐟

Modern dams often include fish ladders, so wildlife can still travel past them safely.

❓ Frequently Asked Questions

How does a mini hydroelectric dam generate electricity?

Water falling from the reservoir spins a small turbine attached to a DC motor. Spinning the motor's shaft generates a small voltage — the same basic principle real hydroelectric stations use.

What does the servo-controlled gate do?

An ultrasonic sensor measures the reservoir's water level, and the Arduino opens the gate wider when there's plenty of water, or closes it to conserve water when supplies run low.

Is it safe to mix water and electronics in this project?

Yes, as long as the Arduino, sensor, and servo housing stay completely dry, water is contained to the turbine section over a waterproof tray, and everything runs on safe, low-voltage DC power.

What parts do I need to build a DIY hydroelectric dam?

An Arduino Uno, a small DC motor as a generator, a mini turbine wheel, a servo for the gate, an ultrasonic sensor, an LCD display, a raised reservoir, and a waterproof catch tray.

💧
Made with ♥ for young makers who love clean energy. Share the voltage your dam generates with #HydroPowerLab!

Comments

Product Cards
Buddy Bot eBook
⭐ New 2026 Release
Build Your
Own Robot!
3D design, wiring &
Arduino coding.
★★★★★ Young inventors love it!
🖨️
3D Print
All parts
⚡
Wire it
Circuit guide
💻
Code it
Arduino IDE
🤖
Watch it
Walk & react
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Website Offer
₹499 ₹300
🌍 International: $5 USD
One-time · Instant digital delivery
🔒 Secured by Razorpay · Your data is safe
📄 Download Free Sample Copy
🔒 Secured by Razorpay · Your data is safe
🍓
Raspberry Pi Pico Mastery
21 Projects
⚡ Launch Price — 80% OFF
Learn Pico
Build 21 Projects!
MicroPython · Wokwi
IoT · Certificate
★★★★★ Perfect for beginners!
🖥️
Wokwi
No hardware
🐍
MicroPy
From zero
🔨
21 Projects
IoT + sensors
📄
Certificate
Verified cert
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Launch Offer
₹999 ₹200 80% OFF
🌍 International: $5 USD
One-time · Lifetime access · No subscription
🔒 Secured by Razorpay · UPI · Cards · NetBanking
🎉

You're in!

Payment successful! Your Buddy Bot eBook is ready. Time to build!

📖 Access Your eBook Now
🎉

Enrolled!

Payment successful! Lifetime access to all 21 Pico Projects is yours!

🍓 Go to My Course