Lesson plan

Water: level, flow, leaks and pumps lesson plan

Floats, ultrasonic levels, flow sensors, leak probes and 12 V pumps on relays, with dry-run guards and a sump controller to finish.

4 chapters, 7 lessons, about 6 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • Float switches and an ultrasonic gauge, and what each can tell you.
  • Count the flow, and find the water that got away.
  • Switch a 12 V pump safely, and stop it running dry.
  • A sump controller that knows when to stop.

Materials for the whole unit

  • Arduino Uno R3
  • Buzzer
  • DC jack and adapter
  • Float switch, ZP4510 x 2
  • Mini water pump
  • Relay module
  • Ultrasonic ranger
  • Water flow sensor, YF-S201
  • Water level sensor

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 1 h 50 min

How much water

Float switches and an ultrasonic gauge, and what each can tell you.

LessonTimeWhat students do
Float switchesTwo floats give the simplest honest tank level: empty, part, full, and one state that means something is broken.55 min
  1. An empty tank
  2. The water reaches the low float
  3. Full
  4. Closed reads LOW
  5. A state that cannot happen
  6. Signal only, low voltage
  7. Turn the high float over
Ultrasonic tank levelAn HC-SR04 in the lid times an echo off the water, and the sketch turns it into millimeters and liters, with the air temperature in the sum.55 min
  1. A sensor in the lid
  2. Distance from time
  3. Nearly empty
  4. Too close to see
  5. A hot day
  6. Tell it the temperature
  7. Real tanks

Materials

  • Arduino Uno R3
  • Float switch, ZP4510 x 2
  • Ultrasonic ranger

Check for understanding

Each student finishes "Ultrasonic tank level" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Real tanks".

Chapter 2. About 1 h 30 min

Water on the move

Count the flow, and find the water that got away.

LessonTimeWhat students do
YF-S201 flowA turbine and a hall sensor give 7.5 pulses a second per liter a minute, 450 a liter. Count them with an interrupt.45 min
  1. No flow, no pulses
  2. Open the tap
  3. Pulses on pin 2
  4. Liters, and a late valve
  5. How good is it?
  6. A smaller batch
Leak probesBare traces on the floor find water. Power them only to read, so they do not plate themselves away.45 min
  1. A dry floor
  2. Powered only to read
  3. Water on the floor
  4. Sound it
  5. Where it goes
  6. Remember the leak

Materials

  • Arduino Uno R3
  • Buzzer
  • Water flow sensor, YF-S201
  • Water level sensor

Check for understanding

Each student finishes "Leak probes" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Remember the leak".

Chapter 3. About 1 h 50 min

Pumps

Switch a 12 V pump safely, and stop it running dry.

LessonTimeWhat students do
Pumps on relaysA pin cannot run a pump. A relay module switches a 12 V DC pump on its own supply, and the sketch protects it from rapid cycling.55 min
  1. The pump circuit
  2. Run it
  3. The relay pulls in
  4. Water moves
  5. Stop it
  6. Low voltage, and why
  7. Let it rest
Dry-run protectionA pump that runs with no water wrecks its seals in minutes. Watch the flow, and stop it when there is none.55 min
  1. Start and expect water
  2. No water
  3. With water
  4. The tank runs dry
  5. Try again
  6. Other guards
  7. A slow priming pump

Materials

  • Arduino Uno R3
  • DC jack and adapter
  • Mini water pump
  • Relay module
  • Water flow sensor, YF-S201

Check for understanding

Each student finishes "Dry-run protection" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A slow priming pump".

Chapter 4. About 1 h

Boss

A sump controller that knows when to stop.

LessonTimeWhat students do
Boss: a sump controllerTwo floats, a pump on a relay, a flow check, a maximum run time and a high-water alarm: a sump controller on 12 V, built the way a good one thinks.60 min
  1. The sump
  2. The water rises
  3. The relay pulls in
  4. Pumped down
  5. The intake is blocked
  6. The pump cannot keep up
  7. A maximum run time
  8. What it is, and what it is not

Materials

  • Arduino Uno R3
  • Buzzer
  • DC jack and adapter
  • Float switch, ZP4510 x 2
  • Mini water pump
  • Relay module
  • Water flow sensor, YF-S201

Check for understanding

Each student finishes "Boss: a sump controller" on their own, without opening the hints. The simulator checks 8 of its 8 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "What it is, and what it is not".

Your class

Teach this unit as a class

Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.