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.

How to rotate BLDC motor Counter-clock wise which is bundled with DRV8312-C2 Kit.

Other Parts Discussed in Thread: DRV8312, CONTROLSUITE, TMS320F28335, INSTASPIN-BLDC, TMS320F2812

Dear Sir/Madam,

                               i have studied datasheet of DRV8312 chip which explains the six commutation steps of  BLDC motor. There is Figure 11 on Page 16 of datasheet  which explains the sequence of PWM signals to given by micro-controller is response to hall sensor signals to rotate the BLDC motor. When i program my chip as explain in this timing diagram, BLDC motor begins to rotate in clock wise direction. NOW, QUESTION IS:-

HOW TO ROTATE BLDC MOTOR IN COUNTER-CLOCKWISE DIRECTION USING SAME SETUP? CAN YOU GIVE SIMILAR TIMING DIAGRAM FOR COUNTER CLOCKWISE DIRECTION?                 

                               

  • Hello Neeraj,

    Have you tried reversing the sequence from A-B-C to C-B-A?

    Thanks,

  • Hello Greenja,

                              Yes, i have tried reversing the sequence from A-B-C to C-B-A. But still motor is not rotating in Counter Clockwise direction. It gets locked. I have referred Counter Clockwise Commutation of various companies like ACTEL,ATMEL etc. In case of Actel , i have seen jerks in motor in  Counter Clockwise direction but motor is not rotating. I m examining the same available from ATMEL.              

  • Hello Neeraj,

    I do not have that kit that you are using so I was only making a suggestion for changing the rotation.

    Now, to clarify some things.  Are you just using the motor from the kit alone, or are you using the entire kit which includes the C2000 MCU?

    Have you downloaded the controlSuite software?  There should be motor direction control in there.  You should also be able to look at the code and see how they reverse the motor.

    If this is another MCU and it is your own custom software, does the motor run properly in the forward direction?  What type of speed control are using?

    You mentioned the ACTEL and ATMEL, are these other MCUs that you are using to try and control the motor?

    Thanks,

  • Hello Greenja,

                               Yes, i m able to rotate the motor clockwise from 600 to 1500 rpm. Now, to clarify some things. Yes, i m just using the motor with DRV8312EVM but minus C2000 MCU. This EVM is being interfaced with STM32-Discovery kit & C2000 MCU Piccolo card which it include has been taken out & disconnected from the slot . After that , you can see that there is J5  male header on DRV8312EVM card from schematics. I have taken Hall inputs CAP1,CAP2,CAP3 from J5 & generating PWMA,PWMB,PWMC,RESETA,RESETB,RESETC signals from STM32-Discovery kit & giving these to J5 in return.Now, motor is running on my Embedded hardware & Software written in embedded C on KEIL MDK ARM. Yes i downloaded the controlSuite software. i have sneaked inside the c code but that code doesn't have function of counter-clockwise rotation. Secondly, if you have sneaked at TI BLDC GUI comes with EVM, inside that there is no option of  counter-clockwise rotation. TI already said that  source code from TI controlsuite is already programmed inisde C2000 Picollo card. But again source code doesn't have function of counter-clockwise rotation. What i need just 6 commutation steps for reverse direction in similar fashion  as mentioned in Fig 11 of page 16 of DRV8312 chip datasheet. i was just referring function table for this same problem available from ACTEL & ATMEL.

    Now, please! help me.

    THANKS.                 

  • Neeraj,

    I am also using the DRV8312-C2 kit, but with a TMS320f28335 controlcard. Like you, I have the code working such that the motor can spin clockwise, but I have not been able to make the motor spin counter-clockwise. Have you been able to solve this problem? If so, can you please share your solution?

    Thanks,

    Hale

  • The InstaSPIN-BLDC software absolutely allows you to reverse direction. It is built into the algorithm.

    If you are using hall sensors you need the SW logic to know if you are reversing.

    If you are using an ST device, I suggest you go to the ST forums to ask for help on software questions.

  • I was actually able to figure it out, sorry i didn't post back for others to see. I had to play around with the commutation states that the motor was running though. Some were more smooth than others, but the changes I made are shown below.

     

    //original for clockwise rotation

    if (hall1.HallGpioAccepted==5)

         pwm1.CmtnPointer = 0;

    else if (hall1.HallGpioAccepted==1)        

         pwm1.CmtnPointer = 1;      

    else if (hall1.HallGpioAccepted==3)        

          pwm1.CmtnPointer = 2;      

    else if (hall1.HallGpioAccepted==2)        

         pwm1.CmtnPointer = 3;      

    else if (hall1.HallGpioAccepted==6)        

         pwm1.CmtnPointer = 4;      

    else if (hall1.HallGpioAccepted==4)        

         pwm1.CmtnPointer = 5;

     

    //mine for counter-clockwise rotation

    if (hall1.HallGpioAccepted==6)

         pwm1.CmtnPointer = 0;

    else if (hall1.HallGpioAccepted==4)        

         pwm1.CmtnPointer = 1;      

    else if (hall1.HallGpioAccepted==5)        

          pwm1.CmtnPointer = 2;      

    else if (hall1.HallGpioAccepted==1)       

         pwm1.CmtnPointer = 3;      

    else if (hall1.HallGpioAccepted==3)       

         pwm1.CmtnPointer = 4;     

    else if (hall1.HallGpioAccepted==2)       

         pwm1.CmtnPointer = 5;

  • hi Hale Petersen

    can you please explain more about the changes you made for the code, or even post the entire code or send it by mail.

    thank you in advance

  • Shay,

    You need to commutate the motor in the opposite direction by exciting the windings C-B-A instead of A-B-C. I would suggest keeping the CmtnPointer order the same, and switching the group of 3 hall states. See my post above as an example of what I mean. Depending on your type of motor, it may take some playing around with. You will probably see some cases where the motor is choppier than others (or may not spin at all), and that would points towards bad commutation. If that is the case, just try another sequence.

    I would recommend looking at the graph on page 16 of the DRV8312 datasheet. Pay close attention to the six states of the hall sensors, and try to mirror the order of the states (reverse the spin of the motor).

    Hope this helps,

  • thank you very much

  • Friends, it's not an "AC Motor" it's a DC motor.

    i.e. reversing "A-B-C" to "C-B-A" doesn't work.

    In a dc motor, if one were to reverse the direction, just reverse the direction of current in the same winding for same hall-position.

    How to do it?

    Well...you should have a hall sensor excitation table for forward direction.
    Just change the polarity of inverter bridge switches in it!

    i.e. If one sequence 1-0-1 of hall sensors correspond to "A+ B-" excitation. This will give +ve current in the winding for this position & produce +ve torque.
    now, in place of A+.B- switches, if one pulses the reverse, i.e. "B+, A-" then there will be opposite direction current in the same winding, producing -ve torque.

    Likewise, invert entire hall sensor table to get reverse direction of rotation, find out gate pulses! & have fun...:)
  • Hi , I need help to rotate the motor counter clock wise , I use sprc179, can you please write me the code to rotate it at 30 deg counterclock wise. TMS320f2812
     

  • You only need to change the commutation sequence based on hall sensor input (Hall Sensored Control) or BEMF zero cross point (Sensorless Control), like the commutation sequence for clockwise is (V+/W-, U+/W-, U+/V-, W+/V-, W+/U-, V+/U-), and the commutation sequence for anti-clockwise is (W+/V-, W+/U-, V+/U-, V+/W-, U+/W-, U+/V-) if the same hall sensor input or BEMF ZCP.