This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV8833 motor driver: stepper motor is not rotating in coounterclock (reverse) wise direction.

Other Parts Discussed in Thread: DRV8833, DRV8834

hi,

   I am writing a linux device driver for stepper motor.I need to rotate stepper motor in both direction.I am able to rotate stepper motor in clockwise direction but when i am trying this in counterclock wise then it moving only in back and forth.

I am using DRV8833 motor driver to drive the stepper motor.

To rotate motor in clockwise direction, i am using this configuration:-

Pin A1        Pin A2       Pin B1      Pin  B2         

1                      0                    0            1                  = 0x9

0                      0                    0            1                 =  0x1

0                      0                    1            1                  =  0x3

0                      0                    1            0                  =  0x2

0                      1                    1            0                   =  0x6

0                      1                   0             0                 =   0x4

1                     1                    0             0                  = 0xC

1                     0                    0              0                  = 0x8

And for counter clock wise i am using exactly opposite of this: 0x8 ,  0xC , 0x4  , 0x6  0x2 ,  0x3  , 0x1  , 0x9

But the motor is not rotating in counter clock wise, it only just moving in back and forth.

So any one please help me out of this problem.

Regards

Vikram Singh Shekhawat

  • Hi Vikram,

    Is there any particular reason you are using the DRV8833? The DRV8834, a very similar device, has a built in indexer that allows for a STEP/DIRECTION control. Simply select the direction you want on the DIR pin with a 0/1 and apply a rising edge for each step on the STEP pin.

  • Hi Nick,

    Thanks for your suggestions but i can't use DRV8834 because our board is completely developed and now it's not possible to remove DRV8833 IC and add DRV8834 IC.

    Is there any other way to solve this problem.I think problem is only with steps( that rotate motor in counter clock direction) , so do you have any idea what changes i have to made in steps to rotate motor in counter clock direction.

    Regards

    Vikram

  • Vikram,

    I see issue with your sequence even for clock-wise direction. The state 0x3 and 0xC are of no use because no active power is applied to motor. Please use following sequence and reverse the same for different direction.

     Pin-A1             PinA-2             PinB-1             PinB-2             Hex

    1                      0                      0                      1                      0x9

    0                      0                      0                      1                      0x1

    0                      1                      0                      1                      0x5

    0                      1                      0                      0                      0x4

    0                      1                      1                      0                      0x6

    0                      0                      1                      0                      0x2

    1                      0                      1                      0                      0xA

    1                      0                      0                      0                      0x8

     Best Regards

    Milan  

  • Hi Milan,

    Thanks for your  help these sequences are working for me in both direction.

    Regards

    Vikram