The most common 4-wire bipolar step motor pinout follows the NEMA color code: Coil A is Black and Green; Coil B is Red and Blue. However, relying solely on wire color is a fast track to a melted A4988 or TMC2209 driver. Japanese manufacturers (like Minebea and Sanyo Denki) and generic Chinese clones frequently swap these colors. Before applying power to any stepper driver, you must understand the standard mappings and verify the coil pairs with a multimeter.
The Complete Step Motor Pinout & Wire Color Reference
The table below covers the standard mappings for bipolar and unipolar stepper motors. Note that while the US-based NEMA standard (NEMA ICS 16) defines the physical frame dimensions and basic electrical characteristics, wire color codes are largely governed by manufacturer conventions rather than strict legal codes like the NEC or IEC 60446. Always treat the 'Standard' column as a baseline, not a guarantee.
| Motor Type | Wire Count | Coil A / Ends | Coil B / Ends | Center Tap / Common | Standard / Variant |
|---|---|---|---|---|---|
| Bipolar | 4-Wire | Black, Green | Red, Blue | N/A | NEMA Standard (US) |
| Bipolar | 4-Wire | Red, Blue | Black, Green | N/A | Japanese (Minebea/Sanyo) |
| Unipolar | 5-Wire | Black, Yellow | Brown, Orange | Red (Common) | Generic Unipolar |
| Unipolar | 6-Wire | Black, Green | Red, Blue | White (A), Yellow (B) | NEMA Standard (US) |
| Universal | 8-Wire | Black, White/Black | Red, White/Red | Green, White/Green, Blue, White/Blue | Industrial Universal |
Source references for driver compatibility and coil mapping can be found in the Texas Instruments DRV8825 Datasheet and Adafruit's Stepper Motor Guide.
Rows People Get Wrong (And How to Avoid Fried Drivers)
When wiring up a new CNC router, 3D printer, or automation jig, misinterpreting the table above leads to three specific, highly destructive mistakes:
If you are adapting a 6-wire unipolar motor to a modern 4-wire bipolar chopper driver (like a TMC2209), you must connect the coil ends (Black/Green to Coil A, Red/Blue to Coil B) and leave the center taps (White/Yellow) completely disconnected and insulated. If you accidentally tie the center taps to ground or VCC, you will short-circuit the driver's H-bridge and permanently destroy the silicon.
The 'Red is Always Positive' Fallacy: Stepper motors are driven by alternating square waves, not DC polarity. There is no 'positive' or 'negative' wire in a stepper coil. Red isn't VCC; it is simply one physical end of Coil B. Swapping the two wires of Coil A (e.g., swapping Black and Green) will not damage the driver; it will merely reverse the magnetic polarity of that specific coil, which changes the motor's rotational direction.
8-Wire Parallel vs. Series Confusion: An 8-wire motor gives you access to every individual coil half. If you wire the halves in series, you get higher torque at low speeds but high inductance limits your top speed. If you wire them in parallel, you cut the inductance in half, allowing for much higher top speeds, but the motor will draw twice the current. Check your driver's maximum current rating before choosing the parallel row.
Safe Interpretation When Markings Are Faded or Missing
If you pull a salvaged NEMA 23 from an old piece of equipment, or buy a cheap clone with no datasheet and non-standard wire colors, do not guess. Use a digital multimeter (DMM) to map the pinout in under two minutes.
- Set your DMM to the lowest Ohms (Ω) range. Most small steppers (NEMA 17) have coil resistances between 1.5Ω and 4.0Ω. Larger NEMA 23 or 34 motors may read up to 10Ω.
- Probe every possible pair. For a 4-wire motor, there are 6 possible combinations. Two combinations will show a low resistance (e.g., 2.2Ω). These are your Coil A and Coil B pairs. The other four combinations will read 'OL' (Over Limit / Infinite), meaning they belong to different coils.
- Identify Center Taps (for 5, 6, or 8-wire motors). The center tap will show exactly half the resistance to the two coil ends compared to the full end-to-end resistance. If End-to-End measures 4.0Ω, the Center-to-End will measure exactly 2.0Ω.
- Determine Phase Direction (Optional). To find which way is 'forward', temporarily short the two wires of Coil A together. Try spinning the motor shaft by hand. If it feels smooth, you have the wrong pair. If it feels 'notchy' and resists turning (due to back-EMF braking), you have found a true coil pair.
Step Motor Pinout FAQ
How do I identify a step motor pinout when the wires are all the same color?
If you have a motor with four identical black wires (common in some industrial pulls), rely entirely on the multimeter resistance test outlined above. Once you identify the two pairs using the DMM, label them with tape. To determine which pair is Coil A and which is Coil B, wire them to your driver and run a test G-code or Arduino sketch. If the motor vibrates in place without spinning, you have mixed wires from Coil A and Coil B in the same terminal. Swap one pair and test again.
What happens if I wire Coil A and Coil B backward on the stepper driver?
Nothing catastrophic. The driver will not fry, and the motor will not burn out. The motor will simply spin in the opposite direction of what your firmware expects. You can fix this in two ways: physically swap the two wires for that specific coil at the driver terminal, or invert the direction in your firmware (e.g., toggling #define INVERT_X_DIR in Marlin for 3D printers, or changing the direction pin logic in GRBL for CNC machines).
Can I use a 5-wire unipolar stepper motor with a modern 4-wire bipolar driver?
Generally, no. In a 5-wire motor, the center taps of both coils are tied together internally into a single common wire. Because you cannot separate them without physically opening the motor casing and cutting the internal copper trace, you cannot wire it to a standard bipolar H-bridge driver like an A4988 or DRV8825. You must use a unipolar driver array, such as a ULN2003 Darlington transistor board, which switches the ground path for each coil half independently.






