← Teacher guides

Teacher guide: Power and motors

Make things move. Why a pin can't run a motor, motor drivers and the H-bridge, two supplies with one ground, and choosing a battery, then LiPo safety before any LiPo is used. Years 9–10, after Arduino.

Open the student course

Each lesson works two ways. Students can work through the online tutorial at their own pace (it checks their answers and saves their progress in their browser), or you can teach it to the whole class from the slides, then send students into the tutorial for the Modify and Make steps.

Every lesson guide has plain-language notes, the answers to every check, a solution for every task, and slides and a worksheet for Waypoints Prepare. These guide pages are not linked from student pages, but they are not secret either: keep printed Teacher editions for answers you do not want students to find.

Whole-course cheat sheet: Open to print (every command, grouped by unit: a handout for the final challenge)

Driving a motor

Why a pin can't, and what can: transistors, drivers and a shared ground.

Driving a motor in 5 minutes (read before teaching this unit)

The idea in plain words

A pin is a signal, not a power supply. An Uno pin can safely give about 20 mA (40 mA at most). A small 6 V gear motor draws about 150 mA running and several hundred when it starts or stalls. So the pin only switches something that can carry the current: a transistor for one direction, or a motor driver (an H-bridge, such as the L293D or TB6612) for both directions. The motor gets its current from its own battery.

An H-bridge has two direction inputs (IN1, IN2: one HIGH and one LOW for forwards, swapped for backwards, both the same to stop) and an enable input (ENA) that takes PWM from analogWrite to set the speed.

With two supplies (USB for the board, a battery for the motor) the grounds must be joined: a signal is a voltage compared with ground, so the driver can't read the board's pins without a shared 0 V. Powering a motor from the board's own 5V pulls that 5V down when the motor starts, and the board resets.

A motor is a coil: switching it off makes a voltage spike. A flyback diode across the motor (drivers usually have them built in) gives that spike somewhere safe to go.

What students get wrong

  • If the code is right, the motor runs. Power comes before code.
  • Speed and direction come from one signal. Two jobs, two kinds of input.
  • Separate supplies need no connection. Join the grounds.

The words

transistor, motor driver, H-bridge, enable, PWM, common ground, flyback diode, stall current.

Cheat sheet: Open to print (A4, with board pictures) · Markdown

Batteries

Voltage, capacity and run time, and LiPo safety.

Batteries in 5 minutes (read before teaching this unit)

The idea in plain words

A battery has a voltage (V: how hard it pushes) and a capacity (mAh: how much charge it holds). Run time is roughly capacity ÷ current: 2000 mAh at 500 mA lasts about 4 hours. Don't plan to use all of it: voltage drops as a battery empties, and rechargeables are damaged by running flat, so plan on about 80%. Weight matters on anything that moves.

AA alkaline packs are cheap and safe; NiMH rechargeables are 1.2 V a cell, not 1.5. LiPo packs are light and can give large currents, which is why drones and fast robots use them, but they store a lot of energy in a soft pouch: damaged, over-charged or over-discharged cells can swell and catch fire. They need a balance charger, supervised charging in a fire-safe bag, a low-voltage cutoff, storage at storage charge, and retiring puffy cells.

What students get wrong

  • mAh is power or strength. It is how long, not how hard.
  • A LiPo is just a rechargeable AA. It needs its own rules.

The words

voltage, capacity (mAh), current draw, run time, NiMH, LiPo, 2S (two cells, 7.4 V), balance charger, storage charge.

Cheat sheet: Open to print (A4, with board pictures) · Markdown