# How to reverse rotation direction of stepper motor

Is it possible to reverse a stepper motor's direction of rotation by changing the polarities of its wires?

I'm asking because I have two stepper motors connected to one single driver and mounted on one axle, and I would like to spin the axle from both sides so one motor would have to spin clockwise and the other one counterclockwise.

• I think it should suffice to reverse polarity of one coil. Do you have unipolar or a biploar stepper? (6 vs 4 wires). May 27, 2013 at 6:33
• Bipolar 4 wires May 27, 2013 at 7:02
• Is there a specific reason you want to connect two motors to opposite ends of the same axis? Yes, you'll get more torque if your driver can deliver sufficient current, which would be shared between the two motors, but I would guess you'll add a whole load of additional mechanical issues. May 27, 2013 at 8:14

(Your bipolar 4 wire motor?) Current through 1a, 1b coils will turn the rotor so it is aligned as shown above. Turn on the current (in the appropriate direction) the rotor turns clockwise (half step) between 1a, 2a. Turn off the current to 1a, 1b and the rotor turns clockwise (another half step) to align with 2a, 2b. Reversing the direction of the current in the coils produces motion in the same direction. To change direction you need to reverse the current in one set of coils only. At the moment the two motors are connected in parallel and turn in the same direction. Swap ONE of the coil pairs over and you should be able to get the two motors turn in the opposite direction with the same drive signal.

Here's a timing diagram of a stepper motor:

As you can see, you have to do the following for one step:

1. Both clock lines are default high
2. Bring CLK A low
3. Bring CLK B low
4. Bring CLK A high
5. Bring CLK B high

When you want to step the other way around, you have to do this:

1. Both clock lines are default high
2. Bring CLK B low
3. Bring CLK A low
4. Bring CLK B high
5. Bring CLK A high

Therefore, you can just swap the clock lines. You can also invert the polarity of the lines (high <=> low). Unfortunately, I can't see anything specific to your setup because you didn't give specific information.

• The problem is that two motors are connected to same driver output and I want to reverse second motor to spin counter clockwise May 27, 2013 at 6:44
• @AurimasNiekis So turn the coil of one around.
– user17592
May 27, 2013 at 6:44
• no difference which? May 27, 2013 at 7:02
• Preferably the one you want to turn around, but you can also do the other and then modify your code.
– user17592
May 27, 2013 at 7:04
• If you do this, make sure to only flip one of the phase pairs, not both. May 27, 2013 at 8:18

Short answer: Yes, just reverse the connections to one winding and the motor will go the other way.

You can also connect the A coil of one motor to the B coil of the other and vice versa. You'd connect:

DriverA-Motor1CoilA-Motor2CoilB-DriverĀ
DriverB-Motor1CoilB-Motor2CoilA-DriverB̄