TheSolderBenchnotes from my electronics bench

Log #108 · Nov 16, 2026

How to Identify Stepper Motor Wires (4, 5, 6 and 8 Wires)

Find the coil pairs of any stepper motor with a multimeter or the shaft-turning trick, understand 4-wire bipolar, 5- and 6-wire unipolar and 8-wire motors, and connect each type to a driver like the A4988 the right way.

Motors & Servos · 5 min read · Beginner

A stepper motor pulled from an old printer, or bought without a datasheet, comes with a bundle of wires and no labels. Wire colors are not standardized, and connecting the coils wrong makes the motor buzz and shake instead of turning. The good news: you can identify every wire in a couple of minutes with a multimeter, and the number of wires already tells you most of the story. This guide covers 4, 5, 6 and 8-wire motors.

Coil diagrams for four stepper types: a 4-wire bipolar motor with two separate coils; a 6-wire unipolar motor where each coil has a center tap; a 5-wire unipolar motor whose two center taps share one common wire; and an 8-wire motor with four separate half-coils. Below, a multimeter shows a few ohms across a coil pair and open circuit between different coils
Count the wires, then measure resistance to find which ones belong together.

Inside a stepper

Most hobby steppers (NEMA 17 motors in 3D printers, small motors in scanners) have two coils, usually called A and B. The driver energizes them in sequence to pull the rotor around in small steps (typically 200 steps per revolution, 1.8° each). What changes between motor types is how the ends of those coils come out of the case.

4 wires: bipolar

Two coils, each with two ends. This is the most common type for NEMA 17 motors.

  • Coil A: 2 wires
  • Coil B: 2 wires

Finding the pairs with a multimeter:

  1. Set the meter to the lowest resistance (Ω) range.
  2. Pick any wire and measure it against each of the other three.
  3. One of them shows a low resistance: that's its partner, the other end of the same coil. Typical values are 1.5–5 Ω for NEMA 17 motors and 20–80 Ω for small motors.
  4. The other two wires are the second coil; check that they also show a similar resistance to each other.

Between wires of different coils the meter shows open circuit (OL or 1).

No multimeter? The shaft trick: spin the shaft with your fingers; it turns easily. Now twist two wires together and spin it again. If it suddenly feels lumpy and resists, those two wires are a coil pair, because the shorted coil acts as a brake. Untwist them and try other pairs.

6 wires: unipolar with center taps

Each coil has a wire at both ends and one in the middle, the center tap: three wires per coil, two coils.

Measuring:

  • Find the two groups of three wires that are connected to each other (wires in different groups show open circuit).
  • Within a group, the center tap is the wire that shows half the resistance to each of the other two. The two ends show the full resistance between them.

Example: in one group, A–B = 4 Ω, B–C = 4 Ω, A–C = 8 Ω. Wire B is the center tap; A and C are the coil ends.

Using a 6-wire motor with a bipolar driver (A4988, DRV8825): connect only the two ends of each coil and leave both center taps unconnected (and insulated). The motor then works like a 4-wire bipolar motor, with the full coil in use, which gives good torque at low speed.

5 wires: unipolar with a common wire

Like the 6-wire type, but both center taps are joined inside the motor into one common wire. The famous 28BYJ-48 is this type, and its common wire is red.

Measuring: the common wire shows the same resistance to all four other wires; any two of the other wires show double that value.

5-wire motors are driven by a unipolar driver such as the ULN2003 board, with the common wire connected to the supply. They can't be used with a bipolar driver as they come, because the two coils are tied together inside. The wiring and code for the 28BYJ-48 are in the 28BYJ-48 guide.

8 wires: four half-coils

Each of the two phases is split into two separate half-coils, giving four coils and eight wires. That allows three ways to connect it:

Connection How Result
Bipolar series Join the two half-coils of each phase end to end More torque at low speed, lower current
Bipolar parallel Connect the two half-coils of each phase side by side Better torque at high speed, needs about twice the current of series
Unipolar Use the junction of the series halves as a center tap Works with unipolar drivers

Identifying the four pairs is easy with the multimeter (four pairs of wires with low resistance), but finding which half-coils belong to the same phase, and their polarity, needs the motor's datasheet or a careful test. If you don't have the datasheet, a 4-wire motor is a much easier place to start.

Quick reference

Wires Type Use with
4 Bipolar A4988, DRV8825, TMC drivers
5 Unipolar, common wire ULN2003
6 Unipolar with center taps ULN2003, or a bipolar driver using only the coil ends
8 Four half-coils Either, depending on how you connect them

Connecting to an A4988 or DRV8825

The driver board has four motor pins, usually labeled 1A, 1B, 2A, 2B (or A1, A2, B1, B2):

  • One coil → 1A and 1B
  • The other coil → 2A and 2B

It doesn't matter which coil you call "1" or which end of a coil goes to "A". Swapping them only changes the direction of rotation. What matters is that each pair of driver pins gets both ends of the same coil. Full wiring, current limit setting and code are in the A4988 stepper guide.

Never connect or disconnect a stepper while the driver is powered. The coil's inductance creates a voltage spike that can destroy the driver chip instantly.

About wire colors

You'll often see a NEMA 17 with black, green, red and blue wires, where black/green is one coil and red/blue the other. Other manufacturers use completely different colors and pairings, and the order in the connector varies too. Treat any color chart as a hint and always confirm with the multimeter.

Troubleshooting

  • Motor vibrates or buzzes but doesn't turn: the coils are mixed, with one wire from each coil on the same driver pair. Re-check the pairs.
  • Turns in the wrong direction: swap the two wires of one coil (or set the direction in code).
  • Turns, but weakly and gets very hot: for a bipolar driver, check the current limit; for a 6-wire motor, make sure you used the coil ends and not a center tap.
  • Motor skips steps at speed: the supply voltage is too low or the acceleration too high. See choosing the right motor for when a stepper is the right tool.

— TheSolderBench · found a mistake? tell me

More pages from this notebook

DC Motors vs Servos vs Steppers

How the three motor types work, what each is good at, how you control them and a simple guide to choosing the right one for your build.

→ wheels = DC, angles = servo, steps = stepper

How to Control a Servo with Arduino

Wire an SG90 servo, move it with the Servo library, control it with a knob, sweep it smoothly and power larger servos without resetting your board.

→ board resets? servo needs its own supply

Driving a Stepper Motor with the A4988

Wire a NEMA 17 stepper to an A4988 driver, set the current limit safely, choose microstepping and move it precisely with Arduino code.

→ set Vref BEFORE connecting the motor