Lesson plan

Measuring energy at home lesson plan

How an energy monitor works: current and voltage sensing, the PZEM-004T, real power from samples, kWh and cost, and alerts, ending in a whole-house monitor. Mains stays numbers on sliders.

7 chapters, 7 lessons, about 6 hours, no board. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • A shunt and a Hall sensor, and why a CT goes in a panel.
  • A ZMPT101B, RMS, a sag and a calibration.
  • A complete meter over Modbus, and power factor.
  • EmonLib: the mean of volts times amps.
  • Energy counted, priced at your rate and projected over a day.
  • Raise once, clear once: power and line voltage.
  • A main and a branch, your rate and your limits.

Materials for the whole unit

  • AC energy meter, PZEM-004T v3.0
  • AC voltage sensor, ZMPT101B
  • Arduino Uno R3
  • Bench power supply
  • Character LCD with I2C backpack
  • Current sensor, ACS712
  • ESP32 DevKit V1
  • Multimeter x 2
  • Resistor x 2
  • Signal generator
  • Slide switch

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 55 min

Current sensing

A shunt and a Hall sensor, and why a CT goes in a panel.

LessonTimeWhat students do
Current sensing: a shunt and a Hall sensorA 12 V load through a 0.1 ohm shunt and an ACS712: the sensor's 2.5 V zero, 185 mV an amp, the shunt's 0.1 V an amp, a predicted reading, the 20 A board's smaller step, and why a current transformer is what goes in a panel.55 min
  1. Run it: the zero
  2. 1 A: 185 mV
  3. The shunt
  4. Predict: 2 A
  5. A bigger sensor, a smaller step

Materials

  • Bench power supply
  • Current sensor, ACS712
  • Multimeter x 2
  • Resistor x 2
  • Slide switch

Check for understanding

Each student finishes "Current sensing: a shunt and a Hall sensor" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A bigger sensor, a smaller step".

Chapter 2. About 40 min

Voltage sensing

A ZMPT101B, RMS, a sag and a calibration.

LessonTimeWhat students do
Voltage sensing: a transformer and RMSA ZMPT101B steps the mains down to a small wave on A0: the sketch finds the middle, takes the RMS and scales it, at 230 V and 120 V, through a sag, and with a trimmer that needs calibrating.40 min
  1. Run it: 230 V
  2. 120 V, 60 Hz
  3. A sag
  4. Calibrate

Materials

  • AC voltage sensor, ZMPT101B
  • Arduino Uno R3

Check for understanding

Each student finishes "Voltage sensing: a transformer and RMS" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

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

Chapter 3. About 55 min

PZEM-004T

A complete meter over Modbus, and power factor.

LessonTimeWhat students do
PZEM-004T: a meter in a boxAn ESP32 reads a PZEM-004T over Modbus: volts, amps, power, energy, frequency and power factor, a 120 V load, what a poor power factor does to the watts, and the energy counter climbing.55 min
  1. Run it: find the meter
  2. Volts and amps
  3. Power
  4. Predict: a motor
  5. The energy counter

Materials

  • AC energy meter, PZEM-004T v3.0
  • ESP32 DevKit V1

Check for understanding

Each student finishes "PZEM-004T: a meter in a box" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

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

Chapter 4. About 40 min

Real power from samples

EmonLib: the mean of volts times amps.

LessonTimeWhat students do
Real power from samplesOpenEnergyMonitor's EmonLib samples a ZMPT101B and an ACS712 in turn: RMS volts and amps, real power as the mean of volts times amps, the power factor it implies, unplugging the appliance, and watt-hours adding up.40 min
  1. Run it: volts, amps, watts
  2. Real power is the mean of v times i
  3. Unplug it
  4. Watt-hours add up

Materials

  • AC voltage sensor, ZMPT101B
  • Arduino Uno R3
  • Character LCD with I2C backpack
  • Current sensor, ACS712
  • Resistor
  • Signal generator
  • Slide switch

Check for understanding

Each student finishes "Real power from samples" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Watt-hours add up".

Chapter 5. About 55 min

kWh and cost

Energy counted, priced at your rate and projected over a day.

LessonTimeWhat students do
kWh and costA whole-house monitor: the PZEM-004T's kWh, what it has cost at your rate in cents, a day's projection at the present draw, and the arithmetic every bill is built on.55 min
  1. Run it: the house
  2. Energy and cost
  3. A day at this rate
  4. Your rate
  5. Predict: a 1500 W heater all day

Materials

  • AC energy meter, PZEM-004T v3.0
  • AC voltage sensor, ZMPT101B
  • Arduino Uno R3
  • Current sensor, ACS712
  • Resistor
  • Signal generator
  • Slide switch

Check for understanding

Each student finishes "kWh and cost" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Predict: a 1500 W heater all day".

Chapter 6. About 55 min

Alerts

Raise once, clear once: power and line voltage.

LessonTimeWhat students do
Alerts: telling someoneThe monitor raises an alert once when the house passes a power limit, clears it once when it drops back, catches a low and a high line voltage, and takes your own thresholds.55 min
  1. Over the limit
  2. And it clears
  3. Low line voltage
  4. High line voltage
  5. Your limit

Materials

  • AC energy meter, PZEM-004T v3.0
  • AC voltage sensor, ZMPT101B
  • Arduino Uno R3
  • Current sensor, ACS712
  • Resistor
  • Signal generator
  • Slide switch

Check for understanding

Each student finishes "Alerts: telling someone" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

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

Chapter 7. About 1 h 5 min

Boss build

A main and a branch, your rate and your limits.

LessonTimeWhat students do
Boss: a whole-house monitorWire the branch's current sensor, then run a monitor with a meter on the main and one on a branch: the house in watts and cents, the branch's share, your rate, your limit and a voltage alert.65 min
  1. Wire the branch sensor
  2. Run it: the house and the branch
  3. Your rate
  4. The limit alert
  5. Your limit
  6. A sag on the line

Materials

  • AC energy meter, PZEM-004T v3.0
  • AC voltage sensor, ZMPT101B
  • Arduino Uno R3
  • Current sensor, ACS712
  • Resistor
  • Signal generator
  • Slide switch

Check for understanding

Each student finishes "Boss: a whole-house monitor" 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: "A sag on the line".

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.