A stepper motor has two coils, and the number of leads tells you what wiring options you have. Four leads means bipolar. Five leads means unipolar, with the centre taps joined inside the motor. Six leads can be wired either way. Eight leads give the most options, including series and parallel bipolar and unipolar. Before you connect a driver, find the coil pairs with a multimeter.
Bipolar and unipolar, explained
- Bipolar: the driver reverses the current in each coil. This usually needs an H-bridge driver, such as the A4988 or DRV8825. A bipolar motor gives more torque for its size, but the driver is more complex.
- Unipolar: each coil has a centre tap, and the driver sends current through one half of a coil at a time. The current always flows in the same direction, so the driver can be simpler. Unipolar drivers often use a transistor array such as the ULN2003. Torque is usually lower for the same size.
Lead count and wiring options
| Leads | Typical wiring | Notes |
|---|---|---|
| 4 | Bipolar | Two coils with no centre taps |
| 5 | Unipolar | The two centre taps are joined inside the motor. You cannot rewire it as bipolar without opening it. |
| 6 | Unipolar, or bipolar with the centre taps left unconnected | Common and flexible |
| 8 | Bipolar in series, bipolar in parallel, or unipolar | Each coil is split at its centre |
For an eight-lead motor, series wiring gives more torque at low speed but more inductance, which limits top speed. Parallel wiring allows higher speed, with less torque at low speed, and it needs more current from the driver. Check the motor’s datasheet for the ratings of each option.
Find the coils with a multimeter
Do this with the motor disconnected from any driver and from power.
- Set the multimeter to resistance (ohms), or to continuity.
- Measure between each pair of leads. Most pairs will read open (very high resistance). The coil pairs read a low resistance, often a few ohms. Each low-resistance pair is one coil. Expected values vary by motor, so check the datasheet if you have one.
- Six leads: the centre tap sits in the middle of each coil. Measuring from one end of a coil to its centre tap gives about half the resistance of measuring end to end. This tells you which lead is the centre tap.
- Five leads: the common wire is the joined centre taps. Measure from the common wire to each of the other four leads. Each reading is about half a coil’s resistance.
Wire colours differ between makers. Trust the datasheet, or your measurements, over the colours.
Wiring a bipolar motor
- Four leads: connect the two wires of coil A to the driver’s A pair, and the two wires of coil B to the driver’s B pair. A4988 drivers label these 1A and 1B, and 2A and 2B.
- Six leads: leave the centre taps unconnected, and use only the two ends of each coil.
- Eight leads: join the wires for series or parallel as the datasheet says, and then connect each coil pair to the driver.
If the motor buzzes or vibrates without turning, the wires may not belong to the same coil pairs. Recheck the coil identification.
Wiring a unipolar motor
- Connect the centre taps to the positive supply, or to the driver’s common supply pin.
- Connect each coil end to a driver output. A ULN2003 has one output per coil end.
- The driver switches the outputs in sequence. Each coil is energised at half its length, so expect lower torque than a bipolar drive.
Safety and good practice
- Disconnect power before you wire the motor. Do not connect or disconnect a stepper while the driver is powered. Inductive spikes and the wrong order can damage the driver.
- Keep the current at or below the motor’s rating. Set the driver’s current limit to match. For an A4988 example, see how to drive a stepper motor with an Arduino and an A4988.
- Use a driver that matches the motor type. A bipolar motor needs a bipolar driver, and a five-lead motor is a unipolar motor.
For the wider comparison of motor types, see types of electric motors.