Learning Goals 5 min
Servos are tame. They have built-in protection, modest current draw, and clean library calls. DC motors are wild. They draw huge starting currents, generate electrical noise, spin backwards if you flip the wires, and will kill your Arduino if you wire them straight to a pin. Today you learn why — so the rest of Cluster B can fix it properly.
- Describe the three numbers that matter when picking a DC motor for a project: nominal voltage, stall current, and no-load speed (RPM).
- Explain — in one sentence each — three reasons you cannot connect a DC motor's leads directly to an Arduino digital pin: current, inductance, and noise.
- Compute the simple "will my battery survive this motor" budget: average current draw × runtime, in mAh, vs your battery's capacity.
Warm-Up 10 min
Find any small DC motor you have: a hobby motor from a toy, the spare in the kit, a removed motor from a broken appliance. Note its size — anything from a 3 V pager motor (smaller than your fingernail) to a brushed RC motor (the size of a soup can) is a "DC motor".
The two-wire test
If you have a 1.5 V AA battery and the motor, touch the two motor leads to the two battery terminals. The motor spins. Now flip the leads — it spins the other way. That's the entire user interface of a DC motor:
- Voltage applied → motor spins. More voltage (up to its rated max) → faster spin.
- Voltage polarity → motor direction. Swap the leads → motor spins the other way.
- No voltage → motor coasts to a stop. No internal feedback, no controller, nothing fancy.
The one-question warm-up
You measured 1.5 V across the battery while the motor was stationary. You then attach the motor and the voltage drops to 1.1 V while it's spinning. What does that tell you?
Reveal
The motor is drawing enough current to sag the battery voltage by 0.4 V. Cheap alkaline AAs have an internal resistance of ~250 mΩ; a 0.4 V drop suggests a current of about 0.4 / 0.25 = 1.6 A. The motor is happily pulling more current than a UNO can supply through any single pin (40 mA absolute max). This sag is the headline reason you cannot drive a motor from the same supply as the Arduino without filtering — and the reason every motor build in this cluster uses a separate battery pack.
New Concept · Voltage, current, inductance, and noise 25 min
The three numbers in a DC motor datasheet
| Spec | What it means | Typical hobby-motor value |
|---|---|---|
| Nominal voltage | What the motor is designed for. Run it here for full life. | 3 V, 6 V, 9 V, 12 V |
| No-load RPM | How fast it spins with nothing attached at nominal voltage. | 6000–18000 RPM (high!) for bare motors |
| Stall current | Current drawn when the shaft is held still under voltage. | 0.5 A – 5 A for hobby sizes |
| No-load current | Current drawn spinning freely with nothing attached. | 50 mA – 200 mA |
| Running current | Typical "in use" current — somewhere between no-load and stall. | 200 mA – 1 A |
Stall current is the big one. When the motor starts from rest, or when something stops it briefly, it draws its full stall current. If your power supply can't deliver that without sagging, the motor stutters and the Arduino on the same supply will brown out and reset.
Why an Arduino pin alone cannot drive a motor
- Current limit. A UNO digital pin can source about 20 mA comfortably (40 mA absolute max). A hobby motor wants 200 mA – 2 A. The pin would burn out, the chip might die, the motor wouldn't budge.
- Inductive kick. A motor is a coil of wire. When you cut its current, the collapsing magnetic field generates a brief, huge voltage spike (often 50 V+ off a 6 V motor). That spike comes back through your wire and into the Arduino, and digital pins do not tolerate that. The fix is a flyback diode, which we'll meet in L03-07.
- Brush noise. Brushed DC motors arc internally as the commutator slides. Each spark is a tiny EM burst on the power rail. If the motor shares power with the UNO, the noise can corrupt analog readings, scramble I²C, and make sensors flaky. The fix is decoupling caps + a separate power rail.
The right diagram for "motor on Arduino"
The simplest legal way to drive a motor from an Arduino looks like this:
- Logic side: Arduino digital pin → a transistor base/gate, through a resistor.
- Power side: separate battery pack → motor → transistor → battery ground. The transistor "switches" the motor current on and off, but the current itself never flows through the Arduino.
- Common ground: the Arduino's GND must connect to the battery's negative terminal. Otherwise the transistor has no shared reference.
- Flyback diode in parallel with the motor, cathode (stripe) towards the battery's positive side. We'll work through this in L03-07.
This is the topology we'll build in L03-06. Today is just "know what's coming".
Power budget — does my battery last the lesson?
Pick a battery; check three values: voltage, capacity in mAh, and the project's average current draw.
| Battery | Voltage | Capacity | Comment |
|---|---|---|---|
| 4 × AA alkaline (in series) | ~6 V | ~2500 mAh | Classroom standard. Good for ~5 A peak, ~1 A sustained. |
| 9 V PP3 alkaline | 9 V | ~500 mAh | Tiny. Sags badly under motor loads. Avoid for anything bigger than a vibration motor. |
| 2-cell LiPo | 7.4 V | 1000–3000 mAh | RC car standard. Can deliver 10+ A briefly. Requires care to charge. |
| 18650 Li-ion | 3.7 V | ~2500 mAh | Common in vape pens, laptop packs. Useful with a TP4056 charger (L04). |
Worked example. Your robot car has two DC motors averaging 400 mA each = 800 mA total. Battery is a 4 × AA pack rated 2500 mAh. Runtime ≈ 2500 / 800 = 3.1 hours. Doubled-up: closer to 1.5–2 hours of real driving, because mAh ratings assume ideal discharge curves and AA cells sag under high loads.
Worked Example · Measure a real motor 20 min
Today is paper + multimeter, not breadboard. You'll characterise the motor you'll be driving for the next five lessons.
Step 1 — read the label or datasheet
Most hobby motors have a label or printed nominal voltage on them. The common ones in classroom kits:
- FA-130 / RE-140 (yellow plastic gearbox motors): 3 V nominal, 250 mA no-load, ~2 A stall.
- TT motor (the "yellow gear motor" in robot kits): 3-6 V, ~150 mA no-load, ~1 A stall.
- Vibration motor (pager motor, off a phone): 1.5-3 V, 80 mA running.
Step 2 — multimeter (DC voltage)
Set your multimeter to DC volts (20 V range). Touch its probes to a fresh 1.5 V AA battery — you should see ~1.5 V. Now touch them to the motor's leads while you spin the motor's shaft by hand. The voltage you read is the motor working as a tiny generator — a few hundred millivolts, depending on how fast you spin. The faster you spin, the more voltage. This "back-EMF" is the same effect that limits motor speed when running normally.
Step 3 — multimeter (DC current)
Set the meter to its highest DC current range (usually 10 A). Put the meter in series with a single AA battery and the motor — meter's red probe to battery +, meter's black probe to motor +, motor − to battery −.
When the motor is spinning freely you should see no-load current (around 100–300 mA for a small motor). Gently pinch the shaft with your fingers until it stops; the meter should jump to stall current (often 1–2 A — release quickly to avoid burning the motor or popping a fuse).
Step 4 — record
Note your two readings in your notebook:
- No-load current: ___ mA
- Stall current: ___ mA (or A)
These two numbers determine which motor driver you'll need. The L298N we meet in L03-08 handles up to ~2 A per channel; most classroom hobby motors fit comfortably.
Step 5 — write a one-paragraph "motor card"
Like a baseball card for your motor. Include: nominal voltage, measured no-load current, measured stall current, no-load RPM (look up the datasheet or estimate), and the project you intend to use it in. You'll refer back to this in L03-06, L03-08, L03-09 and the two-wheel test bed in L03-10.
Try It Yourself · Five paper questions 15 min
Your motor spins clockwise when you connect red to battery+ and black to battery−. What do you do to make it spin counter-clockwise without changing the motor?
Reveal
Swap the two wires: black to battery+, red to battery−. Direction reverses. This is the fundamental reason a single transistor only drives a motor in one direction — you'd need to physically rewire to reverse, which is silly. The H-bridge (L03-08) gives you both directions in software.
A student plugs their motor directly between an Arduino digital pin and GND, sets the pin HIGH, and the motor doesn't budge. They write "the pin is broken". Are they correct?
Reveal
Probably not. The pin can only source ~20 mA before its internal protection kicks in (or it's damaged). A motor needs hundreds of mA. The pin is current-limiting itself; the motor never sees enough current to start. After this stunt: test the pin with an LED-and-resistor. If the LED lights, the pin is fine — the motor was just too thirsty to spin. (And the pin may still be silently damaged for next time.)
Your robot needs to drive for 1 hour with two motors averaging 350 mA each. The on-board electronics (Arduino + sensors) take another 80 mA. What capacity battery do you need?
Reveal
Total average current = 350 × 2 + 80 = 780 mA. For 1 hour: 780 mAh. Real-world: budget at least 1500–2000 mAh to account for sag under peak loads. A standard 4 × AA pack (~2500 mAh) handles this; a 2200 mAh LiPo would be cleaner.
A robot car runs fine on a small 600 mAh battery while moving steadily. When it tries to climb a hill, the Arduino resets every few seconds. Why?
Reveal
Hill-climbing stalls the motors briefly, drawing closer to stall current (1-2 A each). The 600 mAh battery sags hard under the spike — the 5 V regulator can't hold its output, the Arduino browns out and resets. Fix: bigger battery (more mAh and lower internal resistance), or a stiffer (more energy-dense) cell chemistry like LiPo, or a buck regulator between the motor pack and the Arduino so motor sag doesn't propagate.
You measured 350 mV across a freely-spinning motor when you turned the shaft by hand. Later you measure 5 V across the motor when it's running on a fresh battery — but with a multimeter you see the running current is much less than the stall current. Explain why.
Reveal
A spinning motor generates a voltage that opposes the applied voltage (back-EMF). The faster it spins, the more it generates. The actual current through the motor is set by the difference between the applied voltage and the back-EMF, divided by the motor's small winding resistance. At full speed the back-EMF is close to the supply voltage, so the difference (and the current) is small. At stall there's no back-EMF, the difference is the full supply voltage, and the current is whatever V/R allows — that's why stall current is much higher than running current.
Mini-Challenge · Sketch the right wiring 10 min
You don't build anything yet — but you'll draw the wiring on paper.
- Draw a simple block diagram: an Arduino UNO, a 4 × AA battery pack, a hobby DC motor, and a transistor (any kind). Place them on the page.
- Draw the connections so the transistor switches the motor on / off under control of an Arduino pin. The Arduino must not be in the path of motor current. The pack's − must connect to the Arduino's GND.
- Mark the spot where a flyback diode will go (we add it in L03-07). Draw it as a placeholder "diode here".
- Annotate the three failures that would happen if you swapped any of: the diode orientation, the Arduino-to-transistor wire, or the common ground.
Reveal one good answer
- Battery+ → motor + lead. Motor − lead → transistor collector / drain. Transistor emitter / source → battery −.
- Arduino pin → 1 kΩ resistor → transistor base / gate. Arduino GND → battery −.
- Flyback diode in parallel with the motor: cathode (stripe) towards battery+, anode towards transistor.
- Failures: Diode the wrong way round → diode blows when motor starts. Missing Arduino-to-transistor wire → motor never gets switched on. Missing common ground → transistor floats, never really turns on, motor jitters.
Keep the sketch — we'll wire it for real in L03-06 and add the diode in L03-07.
Recap 5 min
A plain DC motor is the most basic actuator in this whole course: two wires, applied voltage spins it, polarity decides direction. But it's also the most dangerous one because the current draw is enormous and the inductive spike on switch-off can fry a microcontroller pin. The rule for the rest of Cluster B: motor power and microcontroller power are separate; only the grounds are shared, and the motor is switched by a transistor (L03-06) protected by a flyback diode (L03-07), with the H-bridge (L03-08) giving you direction control. Today was theory — tomorrow we build the simplest possible motor driver, the one-direction transistor switch.
- DC motor
- A two-wire motor whose speed is set by applied voltage and direction by voltage polarity. Brushed DC motors are the cheapest and most common; brushless ones (BLDC) need a smarter driver.
- Nominal voltage
- The voltage the motor is designed to run at for full rated life. Running 10% above or below is usually fine; double that and you cook the windings.
- No-load current
- Current drawn while the motor spins freely with nothing attached. Friction in the bearings + iron losses.
- Stall current
- Current drawn when the motor is held still under voltage — often 5–10× the running current. Sets your battery and driver requirements.
- Back-EMF
- The voltage a spinning motor generates that opposes the applied voltage. Limits running current; provides natural speed feedback.
- Inductive kick / flyback voltage
- The brief, large voltage spike a motor (or any inductor) generates when its current is suddenly cut. Can destroy unprotected transistors and microcontroller pins.
- Common ground
- Connecting the negative terminal of two power supplies. Without it, a control signal from one supply has no shared reference at the other, and the circuit doesn't work.
- Power budget
- Battery capacity (mAh) ÷ average current draw (mA) = runtime in hours. Plus a margin for sag under peak loads.
Homework 5 min
- Make a "motor card" for the motor you'll use in Cluster B. Fill in: brand / part number, nominal voltage, measured (or datasheet) no-load and stall currents, estimated no-load RPM, and a note on what gearbox (if any) it has.
- Pick a battery for your Cluster B builds. Write down its nominal voltage and mAh capacity. Calculate the runtime if your average draw is 700 mA.
- Read ahead to ARD-L03-06 (Transistor as a Switch) and bring: 1 × NPN transistor (2N2222 or BC547 are perfect), 1 × 1 kΩ resistor, 1 × DC motor, 4 × AA pack with holder, a few jumper wires, your UNO.
Bring back next class:
- Your motor card.
- Your battery + runtime estimate.
- The L03-06 components above. We'll build the one-direction switch and watch it spin.