5 DC Motors
5.1 Start With the Story
Imagine a ventilation fan that works perfectly on the bench but stalls when dust builds up in the duct. The command did not change, but the physical load did, so the motor current, heat, and proof of airflow changed too.
That is why a DC motor story starts with the load, not the code. Choose the driver, PWM range, protection, and feedback around the worst motion the motor may face, not just the unloaded spin you can see on a desk.
5.2 Overview: DC Motors Are Continuous-Motion Loads
A DC motor converts electrical power into continuous rotation. It is a good actuator choice when an IoT system needs a fan, pump, wheel, conveyor, small gearbox, or other rotating load where speed and direction matter more than exact position.
The beginner mistake is treating a DC motor like a small LED. A motor is an inductive, moving, high-current load. A microcontroller command must cross a driver boundary, survive startup current, handle back-EMF, and produce enough physical evidence that the useful motion actually happened.
Start with the load numbers. A small 6 V gearmotor might draw 180 mA with no load, 600 mA while pushing a real mechanism, and 1.8 A when stalled. The controller pin is only a logic signal; it cannot be the motor supply. The driver, wires, connector, battery, and voltage regulator must tolerate the worst case long enough for the fault strategy to work. A driver rated for 700 mA because the motor “usually runs at 600 mA” is too close to the edge if the mechanism can jam.
PWM is a control method, not a proof of motion. A 70% duty command on a 6 V supply gives an average applied drive of roughly 0.70 x 6 = 4.2 V before motor dynamics and driver losses, but the shaft speed still depends on load torque, back-EMF, friction, and supply sag. If a fan only needs approximate airflow, open-loop PWM plus a temperature response may be enough. If a conveyor must move parts reliably, the design needs current, encoder, limit-switch, or process evidence.
Direction matters too. A one-direction fan can use a low-side MOSFET or motor-driver channel with flyback handling. A robot wheel, valve runner, or reversible roller needs an H-bridge so firmware can command forward, reverse, coast, or brake. The motor family is the same, but the driver boundary changes with the motion job.
If you only need the intuition, use this rule: use PWM for speed, a transistor or H-bridge for current, protection for inductive kick, and feedback when speed or position must be proven.
5.2.1 Core DC Motor Ideas
- Speed by average power: PWM switches the motor supply rapidly. The duty cycle changes the average delivered power, so the motor tends to run faster or slower under its current load.
- Direction by current path: An H-bridge changes the direction of current through the motor so the shaft can rotate forward or reverse.
- Torque by current: Higher load usually means more current. Startup, stall, jam, and heavy-load cases matter when selecting a driver and power supply.
- Evidence by feedback: An encoder, limit switch, current measurement, airflow, pressure, or process sensor can prove more than command acknowledgement alone.
5.2.2 Beginner Example
A small ventilation fan can use a transistor or MOSFET driver and PWM if it only needs one direction. A wheeled robot needs an H-bridge because it must reverse. A conveyor may need a gearbox and feedback because the useful result is movement under load, not just a spinning shaft on the bench.
5.2.3 Overview Knowledge Check
5.3 Practitioner: Size The Driver Around The Real Load
A practical DC motor design starts with the load, not with a driver module. The record should state supply voltage, running current, startup or stall current, direction need, braking need, PWM behavior, thermal margin, protection, and the evidence used to confirm motion.
Open-loop PWM is often enough for a fan or pump where approximate flow is acceptable and another sensor can confirm the process. Closed-loop control is needed when the system must hold a target speed, track movement under changing load, or prove that a mechanism reached a useful state.
5.3.1 Review Workflow
- Name the mechanical job. Record whether the motor drives airflow, pumping, wheels, a roller, a valve, a gear train, or another load.
- Capture current evidence. Measure or obtain running, startup, and blocked-load current under representative conditions.
- Select the driver boundary. Use a low-side switch for one-direction loads, an H-bridge for reverse or brake, and a rated motor driver for higher current or control features.
- Add protection. Include inductive energy handling, supply decoupling, thermal margin, wiring limits, and safe behavior during reset or power loss.
- Define feedback. Decide whether speed, position, current, limit switches, airflow, pressure, or process data will confirm useful output.
- Retest after change. Reopen the record when the motor, gearbox, load, supply, PWM settings, driver, enclosure, or failure mode changes.
5.3.2 Driver Review Ledger
| Design Item | Evidence To Record | Review Question | Common Failure |
|---|---|---|---|
| Power stage | Supply voltage, running current, startup current, blocked-load current, wiring, and thermal path. | Can the driver and supply survive the real load with margin? | The motor works unloaded but resets the controller or overheats under real startup load. |
| Control mode | One-direction switch, H-bridge direction control, brake/coast behavior, PWM range, and ramp policy. | Does the command set match the motion and stop behavior the load needs? | Reversing direction immediately while the mechanism is still moving or jammed. |
| Protection | Flyback or recirculation path, snubber needs, bulk capacitance, fuse or current limit, and reset-safe output state. | Where does inductive energy and fault current go? | Back-EMF or inrush causes driver damage, microcontroller resets, or unsafe default motion. |
| Feedback | Encoder, limit switch, current sense, process sensor, timeout, expected response, and manual recovery path. | How does the system know motion succeeded, stalled, or failed? | Software reports success because it sent PWM even though the load did not move. |
5.3.3 Worked Review: Pump Or Fan Path
A one-direction fan may not need an H-bridge, but it still needs a motor driver, supply margin, startup ramp, inductive protection, and a way to show whether airflow or temperature changed as expected. A pump used for dosing needs stronger evidence: expected current, runtime limit, flow or pressure confirmation, dry-run behavior, and safe shutdown on fault.
The difference is not only motor size. It is the consequence of wrong motion. A dashboard fan can tolerate approximate speed. A dosing pump or moving mechanism may require closed-loop confirmation and a conservative failure path.
5.3.4 Practitioner Knowledge Check
5.4 Under The Hood: Motion Evidence Comes From The Whole Loop
Under the hood, a DC motor is part of an electromechanical loop. PWM changes average electrical drive, current produces torque, load changes speed, speed changes back-EMF, and the useful physical process responds through airflow, pressure, wheel motion, or mechanism position. The design is trustworthy only when the loop has enough evidence at the right boundary.
Back-EMF is especially important. A spinning motor behaves partly like a generator, creating voltage opposite the applied supply. When the motor slows under load, that opposing voltage falls and current can rise. When the driver switches current off, stored inductive energy needs a safe recirculation path. These effects are why driver and protection choices cannot be left as afterthoughts.
Gearing changes the loop before software sees it. Suppose a motor has a no-load speed near 6000 rpm and is paired with a 30:1 gearbox. The unloaded output speed is about 6000 / 30 = 200 rpm before losses. If a wheel radius is 30 mm, its circumference is about 2 x 3.14 x 0.03 = 0.188 m. At 120 rpm under load, the wheel turns twice per second, so the ideal ground speed is about 2 x 0.188 = 0.376 m/s before slip. That calculation links PWM experiments to a physical result students can measure.
Current evidence should be interpreted over time. A startup spike of 2.0 A for 80 ms may be normal for a loaded motor, while 2.0 A for 2 s may mean a jam. A simple current limit that trips instantly can make the product unreliable; a timeout that ignores current can burn the driver. A more useful rule records normal startup duration, expected running current, blocked-load current, and the delay before firmware declares a fault.
The protection path also depends on the driver mode. In a low-side switch, inductive current needs a flyback or clamp path when the switch opens. In an H-bridge, current may recirculate through driver devices or diodes depending on whether firmware commands coast, brake, or reverse. The safety review should name that path explicitly, because back-EMF does not disappear just because the command changed.
5.4.1 Internal Behaviors To Surface
- Back-EMF: Motor speed affects the opposing voltage generated by the motor, so current draw changes with load, acceleration, and stall conditions.
- PWM Dynamics: Duty cycle, frequency, driver switching behavior, audible noise, thermal loss, and mechanical response should match the load and product context.
- Closed Loop: Encoder or process feedback lets the controller compare target and actual behavior instead of assuming PWM equals speed.
- Fault Handling: Timeouts, current limits, stall detection, jam recovery, brake/coast behavior, and manual override define safe operation after failure.
5.4.2 Failure Modes To Test
- Startup surge: initial current causes supply sag, reset, or driver thermal stress.
- Stall or jam: blocked rotation draws high current while software still reports commanded speed.
- Back-EMF spike: switching or braking produces voltage stress without a safe current path.
- Reverse shock: firmware reverses a moving load without coast, brake, or mechanical review.
- Feedback mismatch: encoder speed looks normal while the driven process, such as airflow or fluid movement, is blocked.
5.4.3 Under-The-Hood Knowledge Check
5.5 Summary
- DC motors are useful for continuous rotation, fans, pumps, wheels, conveyors, and geared mechanisms where speed and direction matter more than exact position.
- PWM controls average drive, while an H-bridge is needed when the motor must reverse or use explicit brake/coast behavior.
- Driver sizing must account for real load, startup current, blocked-load current, thermal path, wiring, and safe reset behavior.
- Back-EMF and inductive switching require a safe current path and protection strategy.
- Feedback or process evidence is needed when software must prove more than “command sent.”
5.6 Key Takeaway
Design DC motor outputs as electromechanical loops: command through a rated driver, protect the inductive load, size for startup and stall, and verify useful motion with appropriate evidence.
5.7 See Also
- Actuators: Review the broader logic-to-load boundary for IoT actuator outputs.
- Actuator Types and Comparison: Compare DC motors against servos, steppers, relays, solenoids, and human-feedback outputs.
- PWM Control for Actuators: Deepen the review of duty cycle, frequency, resolution, ramps, and actuator control signals.
- Actuator Safety and Protection: Connect motor control to flyback protection, current limits, watchdogs, and safe default states.
