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.

DRV8301-69M-KIT Motor direction

Other Parts Discussed in Thread: DRV8301, MOTORWARE

hi,

We have the DRV8301-69M-KIT (DRV8301 and F28069M) and I've been following the InstaSPIN-FOC projects/labs included in motorware with a Anaheim BLY172S motor.

Proj_lab4 demonstrates a basic torque controller which seems to take it's direction cue from gMotorVars.IqRef_A.  There is some code which looks at the sign of this value and sets a +ve or -ve speed using CTRL_setSpd_ref_krpm().  

This seems to work ok for +ve currents, the motor spins up correctly.  However, if a -ve value is entered (even from stationary) the motor does absolutely nothing.

The signed reference current is passed directly into CTRL_setIq_ref_pu() which doesn''t feel right - this means that a -ve current gets entered despite the direction being set by the CTRL_setSpd_ref_krpm() call?  Anyway, if I labs() the value going into this, negative current demands now get the motor to turn but not to spin properly - it moves like a very slow stepper motor?

Can someone give me some pointers on;

a) Was this demonstration meant to work out of the box?

b) Regardless of point a, how do I get it to work!?  :-)

regards

ian

  • Hi Ian,

    I am moving your post to the InstaSPIN forums. They can better assist with these questions.

  • yes, it works directly out of the box.

    you only change the gMotorVars.IqRef_A value.

    there is a function included in the labs which takes the sign of the IqRef value and sets a speed command with the same sign. This is necessary - even though the Speed loop is NOT being used - so that FAST's direction capability works correctly.


    HOWEVER,
    I just checked MW _14 and am having issues with lab 4 and 5a. The rotor doesn't spin with either...I went back to MW _13 and they work just fine. Which version are you using? Let us investigate a bit more.
  • disregard my HOWEVER. I tested again and the projects in _14 are working correctly for me now


    please check your CCS version and the compiler. There is a very nasty bug in compiler version 6.2.0-6.2.2 which is what this is sounding like.
  • hi Chris,

    Thanks for looking into this, versions are:

    Code composer studio: Version 5.5.0.00077

    C2800 Compiler Tools: Version 6.2.0

    C/C++ Development Tools: Version 8.1.1.201209170703

    I'm presuming the compiler version you're talking about is the "C2800 Compiler Tools" ?

    I'll try to update and try again when I'm in the office.  Yesterday I continued with the later SpinTACK schedule (plans?) stuff and this also failed because the motor wouldn't operate in reverse, obviously still with that compiler.

    ian

  • yes, your compiler has the bug. Update the compiler to anything 6.2.3+
    Once this is updated all will work as expected.