← Teacher guide

Why a motor can't run from a pin

Students try a motor straight on pin 9, compare the 700 mA it asks for with the 20 mA a pin gives, follow the two currents in a transistor circuit, see and fix the switch-off spike with a diode, and sort parts by whether a pin can drive them.

Power and motors · Driving a motor · about 40 minutes · Open the student lesson

Classroom resources

Load these into Waypoints Prepare: choose Load URL and paste the copied address, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.

Students will be able to

Timing

Predict and Try 5 min · Worked example 8 min · Vary 6 min · Tinkercad 12 min · Practise and Make 9 min

Before class

Model: Uno pin 20 mA recommended, 40 mA absolute maximum; motor 150 mA running, 700 mA starting (a small 6 V TT gear motor; check your kit's datasheet). In reality a pin asked for more sags and can be damaged; the board shows the current asked for.

Safety: never wire a motor straight to a pin on real hardware. Unit 4 (this course) is Years 9–10.

Running the lesson

  1. Predict: ask what is different about a motor and an LED, apart from what it does.
  2. Worked example: trace both loops in two colours.
  3. Vary: the spike is invisible on real hardware until something dies; say so.

The hard part (on purpose)

Students reach for the code first. Make 'power before code' the rule of the unit.

When students get stuck

What you will seeA question to askThe fix
A student rewrites the code.How much current does the motor need, and how much can the pin give?Use a transistor or driver.

Answers to the checks

  1. motor on a pin: A small motor is wired from pin 9 to GND. The sketch sets pin 9 HIGH. The motor…
    It doesn't turn: it needs about 700 mA to start and the pin gives about 20. Asking a pin for far more than 40 mA can damage it.
  2. Try: wire it straight: Switch pin 9 on. Does the motor turn? Compare the current it asks for with what a pin can give.

    It asks for about 700 mA; a pin gives about 20. Nothing in the code can change that.
  3. Two currents: The motor needs 700 mA to start. A pin can safely give 20 mA. How many times too much is that?
    35
    700 ÷ 20 = 35 times what a pin should give.
  4. Find the mistake: Sam's motor won't turn on pin 9. Click the line where Sam's reasoning first goes wrong.
    line 1
    Line 1: an LED needs about 10 mA, a motor hundreds. The pin can't supply it, so no code will fix it: it needs a transistor or driver and its own supply.
  5. Switch off: Switch the motor on, then off. What does the board warn you about?

    A motor is a coil: when its current is cut, it makes a voltage spike much bigger than 6 V that can damage the transistor.
  6. Fit the diode: Fit the diode, then switch the motor on and off again.

    The diode (across the motor, pointing back to +) gives the spike a safe path round the motor. Motor drivers usually have these built in.
  7. which can a pin drive?: Sort each part: straight from a pin, or through a transistor or driver?
    An LED with a 220 Ω resistor (about 15 mA) → Straight from a pin (with a resistor if it needs one); A small DC gear motor (150 mA running) → Through a transistor or driver; A piezo buzzer (a few mA) → Straight from a pin (with a resistor if it needs one); A 12 V LED strip (500 mA) → Through a transistor or driver; A servo's signal wire (its power from 5V) → Straight from a pin (with a resistor if it needs one)
    Anything over about 20 mA needs its own supply, switched by the pin. A servo's signal wire carries almost no current; its power wire goes to a supply.
  8. wire it safely: Change this circuit so the motor runs with the pin safe and the transistor protected.

    The pin switches a transistor, the battery drives the motor, and the diode catches the switch-off spike.

Solutions

One possible solution for each task. Other correct programs are fine.

Vary: switch it off › Switch off

Open task: any program that does what the step asks.

Vary: switch it off › Fit the diode

Open task: any program that does what the step asks.

wire it safely

Open task: any program that does what the step asks.

Stretch and support

Stretch: A MOSFET (such as the IRLZ44N) can switch several amps with almost no gate current. Why would that suit a bigger motor?

Support: A two-column card: signal (pin, mA) and power (battery, hundreds of mA).

Exit ticket

Why can't you run a motor from an Arduino pin, and what do you use instead?

A pin gives about 20 mA and a motor needs hundreds. The pin switches a transistor or motor driver, which switches the motor's own battery.

What each step is for

Where it leads

Next: Motor drivers (both directions and speed).

Sources