Sub topic 4
Full-step, half-step, and wave drive
Assume you know how a driver energizes two motor windings, can read a simple wiring diagram, and understand the motor’s step angle. This chapter explains how the order of coil currents changes motion.
The basic drive sequence
A stepper motor turns because its driver creates a rotating magnetic field. In a two-winding bipolar motor, call the windings A and B. A plus or minus sign shows the current direction through a winding:
A+: current flows through winding A in one direction.A-: current flows through winding A in the opposite direction.B+andB-: the equivalent states for winding B.
The driver changes these states in a fixed sequence. Reversing the sequence reverses the motor.
Comparing the drive modes
| Mode | Coil sequence | Angle per command for a 1.8° motor | Main characteristic |
|---|---|---|---|
| Wave drive | A+, B+, A-, B- | 1.8° | Lowest power use, lower torque |
| Full-step | A+B+, A-B+, A-B-, A+B- | 1.8° | Two windings energized, higher holding torque |
| Half-step | A+, A+B+, B+, A-B+, A-, A-B-, B-, A+B- | 0.9° | Smoother motion and twice the position resolution |
In wave drive, only one winding is energized at a time. This reduces electrical power, but the motor usually produces less holding torque.
Full-step drive energizes both windings. The rotor aligns between the magnetic fields, so the motor has strong holding torque. Some drivers use a different current level for the two-winding states, but the sequence remains conceptually the same.
Half-step drive alternates one-winding and two-winding states. The extra intermediate positions reduce vibration and double the number of commanded steps per revolution. The two kinds of states can have different torque unless the driver compensates their currents.
For a 200-step motor:
- Full-step or wave drive: 200 commands per revolution.
- Half-step drive: 400 commands per revolution.
Do not connect a motor winding directly to Arduino pins. Use a current-limiting driver or a suitable dual H-bridge. The following example shows the logical sequence for a driver with two input pins per winding. The exact input behavior depends on the driver.
const int A1 = 5;
const int A2 = 6;
const int B1 = 7;
const int B2 = 8;
const int halfStep[8][2] = {
{ 1, 0}, { 1, 1}, { 0, 1}, {-1, 1},
{-1, 0}, {-1, -1}, { 0, -1}, { 1, -1}
};
void setWinding(int positivePin, int negativePin, int state) {
if (state > 0) {
digitalWrite(positivePin, HIGH);
digitalWrite(negativePin, LOW);
} else if (state < 0) {
digitalWrite(positivePin, LOW);
digitalWrite(negativePin, HIGH);
} else {
digitalWrite(positivePin, LOW);
digitalWrite(negativePin, LOW);
}
}
void setup() {
pinMode(A1, OUTPUT);
pinMode(A2, OUTPUT);
pinMode(B1, OUTPUT);
pinMode(B2, OUTPUT);
}
void loop() {
for (int i = 0; i < 8; i++) {
setWinding(A1, A2, halfStep[i][0]);
setWinding(B1, B2, halfStep[i][1]);
delay(5);
}
}The array’s order determines direction. Iterate from index 7 down to 0 to reverse it. The delay controls speed, but a motor may stall if the first commands are too fast.
Exercise
A 1.8° motor is controlled in half-step mode. How many commands are needed for one revolution, and what happens if the sequence order is reversed?
Show answer
Half-step mode uses 400 commands per revolution because each command moves 0.9°. Reversing the sequence reverses the motor’s direction.