Lesson plan

Low power products lesson plan

Make a battery last years: where an Uno’s current goes, sleep modes and wake sources, a power budget on a bare chip, measuring with a meter and an INA219, battery life checked against a draining cell, and a coin cell node.

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

  • A meter in series, and what an Uno draws asleep and awake.
  • Microamps, a power budget, and the tools that measure it.
  • Predict a battery’s life, then watch it drain.
  • A coin cell sensor node that sleeps for years.

Materials for the whole unit

  • Arduino Uno R3
  • ATmega328P, 16 MHz crystal
  • ATmega328P, 8 MHz internal clock
  • Battery: AA, coin cell, LiPo
  • Current monitor, INA219
  • Full-size breadboard
  • Half breadboard
  • LED
  • Multimeter
  • Potentiometer
  • Pushbutton
  • Resistor

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 2 h 35 min

Where the current goes

A meter in series, and what an Uno draws asleep and awake.

LessonTimeWhat students do
Where the current goesAn Uno on a 9 V battery with a meter in series on VIN: 44.9 mA running, what the board takes and what the chip takes, what an LED costs, and what delay() saves.45 min
  1. Run it: a meter in series
  2. Most of it is not the chip
  3. The LED
  4. Stop spinning
  5. The honest truth about an Uno
Sleep modesRunning, idle and power-down on the same Uno, read on the meter: what each sleep mode switches off, what wakes it, and why millis() stands still in power-down.55 min
  1. Run it: three ways to spend two seconds
  2. Running
  3. Idle
  4. Power-down
  5. Time stands still
  6. The modes in between
Wake sourcesSleep in power-down until something worth waking for: the watchdog on a timer, or a pin change from a button. Which interrupt woke it, and the race you must close before sleeping.55 min
  1. Run it: asleep until needed
  2. Asleep, the meter
  3. The watchdog wakes it
  4. A pin change wakes it
  5. Wake more often
  6. Close the race

Materials

  • Arduino Uno R3
  • Battery: AA, coin cell, LiPo
  • Half breadboard
  • Multimeter
  • Pushbutton

Check for understanding

Each student finishes "Wake sources" 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: "Close the race".

Chapter 2. About 1 h 40 min

The bare chip

Microamps, a power budget, and the tools that measure it.

LessonTimeWhat students do
A power budgetA bare ATmega328P on three AA cells wakes once a second, works and sleeps: microamps asleep on the meter, why the meter cannot catch a short wake, and a budget that turns a duty cycle into days.55 min
  1. Run it: no board at all
  2. Microamps
  3. What the meter misses
  4. Measure the wake
  5. Work less
  6. Your budget table
Measuring with the INA219An INA219 in the node’s supply, read by an Uno over I2C: it catches the 10.4 mA wake the meter averages away, cannot see 7 uA of sleep, and the meter in series covers that.45 min
  1. Run it: a power analyzer you built
  2. It catches the wake
  3. Peak, floor, average
  4. What the INA219 cannot see
  5. Pick the tool

Materials

  • Arduino Uno R3
  • ATmega328P, 16 MHz crystal
  • Battery: AA, coin cell, LiPo
  • Current monitor, INA219
  • Full-size breadboard
  • LED
  • Multimeter
  • Resistor

Check for understanding

Each student finishes "Measuring with the INA219" 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: "Pick the tool".

Chapter 3. About 45 min

Batteries

Predict a battery’s life, then watch it drain.

LessonTimeWhat students do
Battery life mathPredict how long a battery lasts, then watch it drain: an Uno counts the charge through an INA219, checks the prediction, and finds out why the battery outlives the simple sum.45 min
  1. Run it: a tiny battery
  2. The prediction
  3. Watch it sag
  4. Half gone, late
  5. Real batteries

Materials

  • Arduino Uno R3
  • ATmega328P, 16 MHz crystal
  • Battery: AA, coin cell, LiPo
  • Current monitor, INA219
  • Full-size breadboard
  • LED
  • Resistor

Check for understanding

Each student finishes "Battery life math" 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: "Real batteries".

Chapter 4. About 55 min

Boss project

A coin cell sensor node that sleeps for years.

LessonTimeWhat students do
Boss: a coin cell sensor nodeAn 8 MHz ATmega328P on one CR2032 wakes on the watchdog, powers its sensor from a pin, reads it, reports and sleeps, and works out from its own wake time how many days the cell will last.55 min
  1. Run it: a node on a coin
  2. The sensor costs more than the chip
  3. Its own budget
  4. Raise the alarm
  5. Sleep longer
  6. Ship it

Materials

  • ATmega328P, 8 MHz internal clock
  • Battery: AA, coin cell, LiPo
  • Full-size breadboard
  • LED
  • Multimeter
  • Potentiometer
  • Resistor

Check for understanding

Each student finishes "Boss: a coin cell sensor node" 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: "Ship it".

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.