Sub topic 1
How a Stepper Motor Turns Pulses into Steps
Prerequisites
This chapter assumes you can read a simple wiring diagram, use setup() and loop() in Arduino code, and understand that electrical current creates a magnetic field. You should also know that a motor driver sits between the Arduino and the motor.
A stepper motor is a brushless motor that turns by moving between preferred angular positions. Instead of receiving one continuous voltage like a simple DC motor, its coils receive current in a controlled sequence. Each change in the sequence moves the rotor by one step.
The Working Model
The stationary part of the motor is the stator. It contains electromagnetic coils, also called windings. The rotating part is the rotor. The rotor contains permanent magnets or magnetized iron teeth.
When current flows through a stator coil, that coil becomes an electromagnet. The rotor turns so that its magnetic poles line up with the magnetic field. The driver then changes which coil is energized. The rotor follows the changing field.
A controller usually sends two signals to a driver:
DIRselects the direction.STEPrequests movement. Each valid pulse onSTEPadvances the motor by one configured step.
The Arduino does not usually provide the coil current directly. The driver interprets the pulses and switches the motor windings safely.
From Pulse to Position
Suppose a motor has a step angle of 1.8 degrees. One complete revolution contains:
| Motor step angle | Full steps per revolution |
|---|---|
| 1.8° | 200 |
The calculation is:
steps per revolution = 360° / step angle
For this motor, one pulse commands 1.8 degrees of movement when the driver is in full-step mode. After 50 pulses, the commanded position is 90 degrees. After 200 pulses, it is one full revolution.
The motor does not report its actual position to the Arduino in this basic arrangement. This is open-loop control. The controller assumes that the rotor followed every commanded step. If the load is too heavy, the motor accelerates too quickly, or the current is set incorrectly, the rotor can fall behind. The Arduino may continue counting pulses even though the physical position is now wrong.
Why the Motor Can Hold Position
A stepper motor can hold its position while stopped because the driver can keep current flowing through the windings. The resulting magnetic field resists small external forces. Holding current also produces heat, so a stationary motor can still draw substantial power.
Exercise
Exercise
A motor has a 0.9° step angle. How many full steps are required for one revolution, and what happens if the driver receives only 100 pulses?
Show answer
It requires 360 / 0.9 = 400 full steps per revolution. One hundred pulses command 90° of rotation, assuming the motor does not miss steps.