Servo, Stepper or DC Motor: Which Motor for Your Project?

Quick answer

Angle: servo. Exact turns: stepper. Wheels and fans: DC motor, always through a driver or transistor, never straight from a pin.

Side by side

Servo

Who it's for
Beginners
Level
intermediatebeginner
Cost
Low
Main parts
Uno, servo, sensor
Wiring
Easy
Code
About 30 to 41 lines, Servo library (comes with the IDE)
It can
Go to an angle and hold it
It can't
Turn round and round (a normal servo)

Stepper

Who it's for
Intermediate
Level
intermediate
Cost
Medium
Main parts
Uno, 28BYJ-48, ULN2003 board, sensor, I2C LCD
Wiring
Medium
Code
About 48 to 59 lines, Stepper library
It can
Turn an exact number of steps
It can't
Go fast

DC motor with driver

Who it's for
Intermediate
Level
intermediate
Cost
Medium
Main parts
Uno, DC motor, L298N or L293D, motor supply
Wiring
Hard
Code
About 24 to 59 lines
It can
Spin fast, with speed control
It can't
Know where it is

DC motor, blinds

Who it's for
Intermediate
Level
intermediate
Cost
Medium
Main parts
Uno, LDR, motor and driver, supply (and LCD in one)
Wiring
Hard
Code
About 24 to 30 lines
It can
Open or close blinds with light
It can't
Stop at a chosen place without an end switch

Written from the parts lists and code in these tutorials. Cost is a rough guide to the parts they list, compared with each other; line counts are of the main program.

More comparisons