Unit 05 · lesson

DC Motors and Motor Drivers

A controller pin cannot usually power a robot motor directly. Motors demand more current and create electrical behavior that logic electronics are not designed to handle.

The missing layer is the motor driver.

What the driver does

A motor driver acts as a controlled power switch between the energy source and motor.

Conceptually:

controller command ──────┐

battery ─────────────→ motor driver ─────────→ motor

The controller requests direction and output. The driver handles the motor-side current.

Many drivers use an H-bridge arrangement that can reverse the polarity across a DC motor, allowing forward and reverse rotation.

PWM: full voltage, switched over time

A common speed-control technique is pulse-width modulation, or PWM.

Instead of supplying a smooth lower voltage, the driver switches rapidly between states. The duty cycle describes the fraction of time the output is active.

25% duty:  █___█___█___█___
50% duty:  ██__██__██__██__
75% duty:  ███_███_███_███_

The motor's mechanical inertia smooths much of that switching into an average behavior.

Do not confuse duty cycle with guaranteed motor speed. Load, battery condition, motor characteristics, friction, and feedback all matter.

Reversing direction is not free

Rapidly commanding full forward to full reverse can create large current and mechanical stress.

Good control systems may include:

  • ramp limits;
  • braking/coasting modes;
  • current limits;
  • motion profiles;
  • software interlocks.

Failure case

Suppose the controller reports a 50% motor command but the motor does not move.

Possible layers include:

  • no battery power at the driver;
  • disabled driver;
  • wrong control signal;
  • broken motor connection;
  • stalled mechanism;
  • current protection active;
  • dead motor.

"Command = 50%" proves only that one software variable has that value.

It does not prove the motor received usable energy.

Trace one actuator

Pick a motor-driven mechanism. Build a four-column trace:

LayerExpected evidenceObserved evidenceIf missing, check next
command
driver state
motor voltage/current
mechanical motion

You are building a troubleshooting model before there is a failure.

Why a motor stalls

A DC motor produces torque by drawing current. As the shaft slows under load, current generally rises. At stall, shaft speed is zero while current demand can be very high.

That creates an important robotics relationship:

more mechanical load

motor slows

current rises

heating rises

This is one reason "the motor is strong enough to hold it" is a dangerous design argument. Holding a mechanism at or near stall can turn electrical energy into heat instead of useful motion.

Read a simplified operating case

Suppose a mechanism needs 1.2 N·m at the output shaft. A motor can safely provide only 0.25 N·m at the desired operating speed.

Using a reduction near 5:1 could multiply available output torque in an ideal model:

0.25 N·m × 5 ≈ 1.25 N·m

Real gearboxes have losses, and acceleration requires margin, so that calculation is only a starting point. It does show why the correct question is usually not "Which motor has the biggest number?" It is:

What motor, gearing, duty cycle, and thermal load can produce the required motion repeatedly?

Motor driver as an interface

A controller usually does not send motor current directly through a processor pin. The motor driver sits between low-power logic and high-power actuation.

software command → controller signal → motor driver → motor current → torque

When the mechanism does not move, diagnose each layer separately. A valid software command does not prove that power reached the motor.