Quick Note: Changing Stepper Motor Directions


When wiring up your CNC, or stepper motors in general, you may find that you want to reverse an axis. Instead of reversing all 4 wires (assuming you have a 4-wire stepper), all you need to do is flip one pair of wires.

On the Shapeoko 2, using the stock 4-conductor wires, I swapped the black-green pair. If I recall correctly, the Shapeoko wiki was ambiguous about which pair to switch although it doesn’t matter. Red-White reversal will do the same thing.


On the Y-axis, since there are two motors that need to rotate in opposite directions in order to work properly together. Figuring out which motor should be G-B-R-W, and which motor should be B-G-R-W, is a 50-50 proposition. Instead of swapping the fragile motor leads in the event you want to reverse the axes, you can just swap the heavier-duty wires coming from the Arduino. Here, I didn’t need to swap anything.

X-axis hook-up left, Z-axis on right.
X-axis hook-up left, Z-axis on right.

On my X and Z-axis terminal blocks, I ended up reversing both motors (you can see green stepper wire is on the left). The reason you may want to do this is to setup a more intuitive coordinate system.

Screen Shot 2014-02-17 at 6.09.19 PM

In Universal GCode Sender, I wanted the jog arrows to match the resulting movement on the CNC. Otherwise it’s like playing inverted on a video game controller. If you’re not used to it, unfortunate things may happen at the worst times. Especially if you’re not paying attention.

Your resulting setup may be different, but just flip your wires as needed until you’re comfortable with your CNC’s operation.

2 thoughts on “Quick Note: Changing Stepper Motor Directions

  1. you can also use the “$6” parameter in GRBL (version 0.8) to reverse the directions.

    $6 for Grbl 0.8, $7 for Grbl 0.7
    Invert X axis: 32
    Invert Y axis: 64
    Invert Z axis: 128
    To invert multiple axes, just add the values above together. So all 3 would be 224.

Leave a Reply