DC motors, servos and steppers: choosing the right control
Compare speed, position, drivers and power requirements for common project motors.
A brushed DC gear motor turns continuously when powered. An H-bridge lets you change direction, while PWM can vary its drive duty cycle. Most simple robot-car builds do not know the exact shaft position unless they add an encoder or another feedback sensor. Choose a driver using the motor's voltage and stall current, with adequate cooling and current protection.
A hobby positional servo combines a motor, gearbox and internal position feedback. The controller sends a repeated pulse command requesting an angle; the servo electronics supply the motor current internally. An SG90 is useful for a lightweight pointer or scanning sensor mount. Positional and continuous-rotation servos behave differently, so confirm the model before selecting code.
A stepper motor moves through a coil sequence. Counting commanded steps can estimate position, but an overloaded motor can miss steps without telling the controller. The small 5V 28BYJ-48 uses a gearbox and a matching ULN2003 driver module. Gear ratio variations and backlash mean a nominal steps-per-revolution value is not a precision guarantee.
The 28BYJ-48 Stepper Motor Demo uses a four-state, two-coil full-step sequence and releases the coils between moves. Releasing reduces idle energization, but also removes holding torque. A loaded mechanism may move while the coils are off. Start unloaded and check movement before attaching any mechanism.
Motor power is separate from the control signal. Use a suitable regulated supply and share ground when the driver requires a common signal reference. Never connect a motor coil straight to a GPIO. The driver must provide the appropriate current path and inductive-transient protection; check its wiring and datasheet rather than assuming every board is interchangeable.
Choose a DC gear motor for continuous wheel rotation, a positional servo for a small controlled angle, and a stepper when incremental motion suits the mechanism. CNC machines and larger bipolar steppers require a different driver and motion-control design. These small demos are not CNC controllers.
References: https://docs.arduino.cc/learn/electronics/servo-motors/ and https://www.ti.com/product/ULN2003A