I am using Bipolar stepper motor Haydon Kerk 25343-05. My driver IC is DRV8833. The micro controller I am using is ATXMEGA16A4U.

The bipolar stepper motor has 4 wires. 4 PWM output pins of Microcontroller go to the driver chip which in-turn drives the stepper motor.

The step angle of the motor is 7.5 degree. If I name the wires as A,B,C,D; what kind of input pattern should be given to drive the motor forward. Should I give delay after each step, If so, how much delay should I give?


I'd call these signals A1-A2-B1-B2 (as in the datasheets).

For the pattern:
0101->1001->1010->0110->0101... the motor will rotate one direction and for
0101->0110->1010->1001->0101... it will go the other way.

If you add a delay between steps it will just rotate slower.

| improve this answer | |
  • \$\begingroup\$ There is no datasheet for the motor, where did you find it? Can I use GPIO to generate the pattern instead of PWM ? \$\endgroup\$ – Pradeep Ch Sep 30 '15 at 0:46
  • \$\begingroup\$ I was taking about the DRV8833 driver datasheets. You really don't need the datasheets for your motor as it has only four wires. Just make sure that you connect the 2 wires from one coil to A1 & A2 and the other coil to B1 & B2. If you switch the 2 wires from one or the other coil or flip the coils all together, the motor will just spin the other direction. \$\endgroup\$ – Alexxx Oct 1 '15 at 0:03
  • \$\begingroup\$ I just noticed that you were also asking about the PWM vs GPIOs. You don't use PWM with stepper motors. Just 4 GIPOs \$\endgroup\$ – Alexxx Oct 1 '15 at 23:34
  • \$\begingroup\$ Can you watch this video : youtube.com/watch?v=kAyDmovM18E . It has the stepping sequence for bipolar stepper motor. Coil A is energized and then B. The sequence appears: (A1 B1 A2 B2): 1010 0101 (-1)0(-1)0 0(-1)0(-1) ... I used '-1' to use reverse current direction. Your pattern does not appear here, How did you find the pattern? \$\endgroup\$ – Pradeep Ch Oct 2 '15 at 11:50
  • \$\begingroup\$ Ok. My sequence showed you how to set 4 GPIOs outputs that are connected to your driver. For coil A terminals A1A2=01 means that the current is flowing one direction (A1=gnd A2=vcc) while A1A2=10 means that it's in the opposite direction (A1=vcc A2=gnd). It's the same for coil B. A general rule is that you flip only one coil's current in each step, never both. That's all you have to know. \$\endgroup\$ – Alexxx Oct 3 '15 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.