MuTech RoboticsLearning Hub
← Back to learning path

Steppers and DC motors

9 min read

Servos are not the only way to make things move. DC motors give speed, and stepper motors give exact positions.

DC gear motors

A DC motor spins when it gets voltage. Swap the wires and it spins the other way. A gearbox trades speed for strength, which is why robot wheels use gear motors.

Why a driver is needed

A board pin cannot power a motor, and the spike from a motor can kill the pin. A dual H-bridge driver sits between them.

  • IN1 and IN2 set the direction.
  • ENA takes a PWM signal to set the speed.
  • OUT1 and OUT2 go to the motor.
IN1IN2Motor
HIGHLOWForward
LOWHIGHBackward
LOWLOWStop

Power motors from a battery, not from the board. Join the battery ground, the driver ground and the board ground together, or the signals will not work.

Stepper motors

A stepper moves in small fixed steps, so you can count them to reach an exact position with no sensor. It suits pill dispensers, pulleys and sun trackers.

The small 5 V geared stepper in our kits takes about 4096 half steps for one full turn. Its driver board has four inputs, and the code energises the coils in order.

  • Go slowly. Too much speed makes it buzz and skip steps.
  • It keeps using current while holding still, so it gets warm. Turn the coils off when it does not need to hold.

Which motor should you choose?

  • Wheels and fans: a DC motor.
  • Moving to an angle up to 180°: a servo.
  • Exact turns or many rotations: a stepper.

Use the torque calculator in Tools to check whether a motor is strong enough.

Quick quiz

1. Which driver input sets the speed?

2. What must be joined for the signals to work?

3. Which motor suits an exact position with no sensor?

Score: 0 / 3
Sign in to track progress

See it in a project

Tea-Serving Robot →