Sub topic 1
How a stepper motor turns pulses into steps
Prerequisites
This chapter assumes you know Arduino basics, including digitalWrite and delayMicroseconds. You should understand Ohm's law and be able to read a simple wiring diagram. You will need a breadboard and a separate motor power supply.
How a stepper motor turns pulses into steps
A stepper motor moves its rotor in fixed angular increments, called steps. Each pulse energizes a coil pair, which pulls the rotor to the next fixed position. A motor rated at 1.8 degrees per step needs 200 steps for one revolution (360 / 1.8 = 200).
Motor types: permanent magnet, hybrid, unipolar, and bipolar
Permanent magnet and hybrid motors differ in rotor design. Hybrid motors give finer steps and more torque for their size. Unipolar motors have a center-tapped winding on each coil, so current flows in one direction only. Bipolar motors have two windings and need the driver to reverse current through each coil. Bipolar motors deliver more torque for the same size.
Reading a stepper motor's ratings
Check these values on the datasheet before wiring anything:
| Rating | Where to find it | Why it matters |
|---|---|---|
| Step angle | Datasheet | Sets steps per revolution |
| Rated current per phase | Label or datasheet | Sets the driver current limit |
| Coil resistance | Datasheet | Helps estimate heating and voltage |
| Holding torque | Datasheet | Sets the load the motor can hold |
Full-step, half-step, and wave drive
Full-step drive energizes two coils at once, which gives maximum torque. Wave drive energizes one coil at a time, which uses less power but gives less torque. Half-step drive alternates one and two coils, doubling the resolution to 400 steps per revolution for a 1.8 degree motor.
Microstepping: smoother motion and its limits
Microstepping divides each full step into smaller steps by driving the coils with sinusoidal current. A 1.8 degree motor at 16x microstepping gives 3200 steps per revolution. Microstepping does not guarantee accurate positioning. The rotor often lands short of the ideal position, and holding torque stays the same.
full_steps = 200
microsteps = 16
steps_per_rev = full_steps * microsteps
print(steps_per_rev) # 3200Choosing a stepper driver
Choose a driver that handles at least the motor's rated phase current. It should accept step and direction inputs and offer the microstepping modes you need. Confirm that your supply voltage falls within the driver's range, and that the driver lets you adjust the current limit.
Exercise
How many steps does a 1.8 degree motor take per revolution at 16x microstepping?
Show answer
200 full steps multiplied by 16 gives 3200 steps per revolution.