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.

Piccolo C2000-Series 28069M Launchpad with 8305N Boosterpack (Getting Started Issues)

Other Parts Discussed in Thread: MOTORWARE

Hello,

 

I am attempting to rotate a BLDC motor with the 28069M Launchpad and the DRV8305N Boosterpack.

I am in need of assistance to get the motor to spin.

 

I mounted the DRV8305N Boosterpack onto the the 28069M Launchpad where the J1 pins on the Boosterpack are above the J1 pins on the 28069M Launchpad.

The terminal blocks are facing the usb plug.

1)      I am confused on which labs I may use to detect the motor parameters (page 2 of the InstaSpin Labs states that Lab2a does not work with 28069 processors)

 

2)      I assumed that I needed to change the motor parameters to start the Identifying Feature.

I am not sure that I had to do this (procedure from Lab2a)

I changed the Motor Parameters by adding the MY_MOTOR parameters to the user_j1.h file:

user_j1.h file location: \motorware\motorware_1_01_00_16\sw\solutions\instaspin_motion\boards\boostxldrv8305_revA\f28x\f2806xM\src

#define MY_MOTOR 113

#define USER_MOTOR MY_MOTOR

 

//The motor parameters for testing the initial motor

//Motor is SunnySkyX2208-7KV:2600II

//Initial Guessed parameters were copied from instaspin labs (lab2a,page 35)

#if (USER_MOTOR == MY_MOTOR)

#define USER_MOTOR_TYPE MOTOR_Type_Pm

#define USER_MOTOR_NUM_POLE_PAIRS (14)

#define USER_MOTOR_Rr  (NULL)

#define USER_MOTOR_Rs (NULL)

#define USER_MOTOR_Ls_d (NULL)

#define USER_MOTOR_Ls_q (NULL)

#define USER_MOTOR_RATED_FLUX (NULL)

#define USER_MOTOR_MAGNETIZING_CURRENT (NULL)

#define USER_MOTOR_RES_EST_CURRENT (10.0)

#define USER_MOTOR_IND_EST_CURRENT (-10.0)

#define USER_MOTOR_MAX_CURRENT (3.0)

#define USER_MOTOR_FLUX_EST_FREQ_Hz  (20.0)

//END of my parameters

 

 

3)      When I start Lab2b using the Lab2a procedure:

Lab2b location: \motorware\motorware_1_01_00_16\sw\solutions\instaspin_foc\boards\boostxldrv8305_revA\f28x\f2806xF\projects\ccs5\proj_lab02b

 

(page 35 of InstaSpin Labs)

I proceed to edit the “gMotorVars.Flag_enableSys” variable to enable the motor in software.

I click on “View->Scripting Console” then open the file: sw\solutions\instaspin_foc\src\proj_lab02b.js

(page 36 of InstaSpin Labs)

I clicked on the Realtime Debugger Button and acknowledged the popup.

I then click on the “continuous refresh button in the watch window

I then clicked the “Run” button to start the project.

 

When I attempt to edit the variable, I changed the field to “1”, but when I pressed enter on my keyboard, the value stayed “0”.

The value I tried to change is the highlighted value in red below.

See Below for the Watch Window/ Expressions readout:

gMotorVars                struct _MOTOR_Vars_t_          {...}             0x00B280@Program                  

gMotorVars.UserErrorCode    enum <unnamed>  USER_ErrorCode_maxCurrent_indEst_Low                    0x00B28C@Program                  

gMotorVars.CtrlVersion            struct _CTRL_Version_              {...}             0x00B28D@Program                  

gMotorVars.Flag_enableSys   unsigned char            0 (Decimal)                 0x00B280@Program                  

gMotorVars.Flag_Run_Identify                 unsigned char            0 (Decimal)                 0x00B281@Program                  

gMotorVars.Flag_enableForceAngle       unsigned char            1 (Decimal)                 0x00B283@Program                  

gMotorVars.Flag_enablePowerWarp     unsigned char            0 (Decimal)                 0x00B288@Program                  

gMotorVars.CtrlState                 enum <unnamed>  CTRL_State_Idle       0x00B28A@Program                  

gMotorVars.EstState                  enum <unnamed>  EST_State_Idle         0x00B28B@Program                  

gMotorVars.SpeedRef_krpm long           0.09999996424 (Q-Value(24))  0x00B298@Program                  

gMotorVars.MaxAccel_krpmps                 long           0.1999999881 (Q-Value(24))    0x00B29C@Program                  

gMotorVars.Speed_krpm        long           0.0 (Q-Value(24))     0x00B29E@Program                  

gMotorVars.MagnCurr_A        float           0.0              0x00B2AA@Program                 

gMotorVars.Rr_Ohm                 float           0.0              0x00B2AC@Program                 

gMotorVars.Rs_Ohm                 float           0.0              0x00B2AE@Program                  

gMotorVars.Lsd_H  float           0.0              0x00B2B2@Program                  

gMotorVars.Lsq_H  float           0.0              0x00B2B4@Program                  

gMotorVars.Flux_VpHz             float           0.0              0x00B2B6@Program                  

gMotorVars.I_bias  struct _MATH_vec3_                 {...}             0x00B2DC@Program                 

gMotorVars.V_bias struct _MATH_vec3_                 {...}             0x00B2E2@Program                  

gMotorVars.VdcBus_kV           long           0.0 (Q-Value(24))     0x00B2D4@Program                  

gDrvSpi8301Vars      unknown Error: identifier not found: gDrvSpi8301Vars           

gDrvSpi8305Vars      struct _DRV_SPI_8305_Vars_t_                {...}             0x00B200@Program                  

 

Please let me know if anyone else has similar issues or can help in any way.

I need to get the motor spinning as soon as possible.

-Keith

  • Hi Keith,

    The proejct didn't pass the check for errors in USER_checkForErrors(&gUserParams) as below variable.

    gMotorVars.UserErrorCode    enum <unnamed>  USER_ErrorCode_maxCurrent_indEst_Low 

    You need to set USER_MOTOR_MAX_CURRENT > abs(USER_MOTOR_IND_EST_CURRENT) as below.

    #define USER_MOTOR_RES_EST_CURRENT (10.0)

    #define USER_MOTOR_IND_EST_CURRENT (-10.0)

    #define USER_MOTOR_MAX_CURRENT (30.0)

    Best Regards,

    Yanming Luo

  • 0. use proj_lab02c to ID this low inductance high speed motor. You must use 02c.

    1. "1) I am confused on which labs I may use to detect the motor parameters (page 2 of the InstaSpin Labs states that Lab2a does not work with 28069 processors)"
    thanks, lab02a now works with the 28069 so I will have this updated

    2. as yanming noted increase the max_current
    #define USER_MOTOR_MAX_CURRENT (15.0)
    but you also need to increase the est_freq for high speed motors
    #define USER_MOTOR_FLUX_EST_FREQ_Hz (60.0)

    I also suspect that you probably don't need as much RES_EST
    #define USER_MOTOR_RES_EST_CURRENT (5.0)
    and your low inductance motor won't be effected much during the INS_EST current state so you can also lower
    #define USER_MOTOR_IND_EST_CURRENT (-3.0)
  • Thank you both Yanming and Chris.

    I am still unable to start the motor after your recommendations.

     

    More Info:

    The bus voltage is 12V (11.67V actual with multimeter).

    The red Fault LED is now ON and switches off randomly when I reboot my computer or restart CCS6 (solid red)

    The values for USER_MOTOR_RES_EST_CURRENT (5.0) and #define USER_MOTOR_IND_EST_CURRENT (-3.0) did not have any effect.

    I am still unable to change the “gMotorVars.Flag_enableSys” in the watch window. (will not change to a “1”)

     

    I attached the user_j1.h file5047.user_j1.h

    I also added the “gUserParams structure variables if anyone can make heads or tails of that.

     

     

    Here are the updated “user_j1.h” parameters:

    #define MY_MOTOR 113

    #define USER_MOTOR MY_MOTOR

    //The motor parameters for testing the initial motor

    //Motor is SunnySkyX2208-7KV:2600II

    //Initial Guessed parameters were copied from instaspin labs (lab2c,page 49)

    #if (USER_MOTOR == MY_MOTOR)

    #define USER_MOTOR_TYPE MOTOR_Type_Pm

    #define USER_MOTOR_NUM_POLE_PAIRS (14)

    #define USER_MOTOR_Rr  (NULL)

    #define USER_MOTOR_Rs (NULL)

    #define USER_MOTOR_Ls_d (NULL)

    #define USER_MOTOR_Ls_q (NULL)

    #define USER_MOTOR_RATED_FLUX (NULL)

    #define USER_MOTOR_MAGNETIZING_CURRENT (NULL)

    #define USER_MOTOR_RES_EST_CURRENT (10.0) //I also suspect that you probably don't need as much RES_EST

    #define USER_MOTOR_IND_EST_CURRENT (-10.0) //and your low inductance motor won't be effected much during the INS_EST current state so you can also lower

    #define USER_MOTOR_MAX_CURRENT (30.0) //USER_MOTOR_MAX_CURRENT > abs(USER_MOTOR_IND_EST_CURRENT)

    Here are the Watch Window/Expressions Window Real-time Variables:

    gMotorVars  struct _MOTOR_Vars_t_   {...} 0x00B380@Program

    gMotorVars.UserErrorCode      enum <unnamed>      USER_ErrorCode_maxCurrent_High 0x00B38C@Program

    gMotorVars.CtrlVersion  struct _CTRL_Version_   {...} 0x00B38D@Program 

    gMotorVars.Flag_enableSys     unsigned char     0 (Decimal)      0x00B380@Program 

    gMotorVars.Flag_Run_Identify  unsigned char     1 (Decimal)      0x00B381@Program 

    gMotorVars.Flag_enableForceAngle    unsigned char     1 (Decimal)      0x00B383@Program 

    gMotorVars.Flag_enablePowerWarp     unsigned char     0 (Decimal)      0x00B388@Program 

    gMotorVars.CtrlState    enum <unnamed>    CTRL_State_Idle      0x00B38A@Program 

    gMotorVars.EstState     enum <unnamed>    EST_State_Idle      0x00B38B@Program 

    gMotorVars.SpeedRef_krpm      long  0.09999996424 (Q-Value(24))      0x00B398@Program 

    gMotorVars.MaxAccel_krpmps    long  0.1999999881 (Q-Value(24))      0x00B39C@Program 

    gMotorVars.Speed_krpm   long  0.0 (Q-Value(24)) 0x00B39E@Program 

    gMotorVars.MagnCurr_A   float 0.0   0x00B3AA@Program 

    gMotorVars.Rr_Ohm float 0.0   0x00B3AC@Program 

    gMotorVars.Rs_Ohm float 0.0   0x00B3AE@Program 

    gMotorVars.Lsd_H  float 0.0   0x00B3B2@Program 

    gMotorVars.Lsq_H  float 0.0   0x00B3B4@Program 

    gMotorVars.Flux_VpHz    float 0.0   0x00B3B6@Program 

    gMotorVars.I_bias struct _MATH_vec3_      {...} 0x00B3DC@Program 

    gMotorVars.V_bias struct _MATH_vec3_      {...} 0x00B3E2@Program 

    gMotorVars.VdcBus_kV    long  0.0 (Q-Value(24)) 0x00B3D4@Program 

    gDrvSpi8301Vars   unknown     Error: identifier not found: gDrvSpi8301Vars     

    gDrvSpi8305Vars   struct _DRV_SPI_8305_Vars_t_  {...} 0x00B300@Program 

    gUserParams struct _USER_Params_    {...} 0x00B400@Program 

    iqFullScaleCurrent_A    float -2.43314111e-37   0x00B400@Program 

    iqFullScaleVoltage_V    float 6.61839932e+31    0x00B402@Program 

    iqFullScaleFreq_Hz      float 1.21912513e-26    0x00B404@Program 

    numIsrTicksPerCtrlTick  unsigned int      11291 0x00B406@Program 

    numCtrlTicksPerCurrentTick    unsigned int      3375  0x00B407@Program 

    numCtrlTicksPerEstTick  unsigned int      11357 0x00B408@Program 

    numCtrlTicksPerSpeedTick      unsigned int      7082  0x00B409@Program 

    numCtrlTicksPerTrajTick unsigned int      5149  0x00B40A@Program 

    numCurrentSensors unsigned int      48165 0x00B40B@Program 

    numVoltageSensors unsigned int      43585 0x00B40C@Program 

    offsetPole_rps    float 1.7746062e-38     0x00B40E@Program 

    fluxPole_rps      float -4.45882034 0x00B410@Program 

    zeroSpeedLimit    float 7.83314997e-27    0x00B412@Program 

    forceAngleFreq_Hz float -1.17075649e-14   0x00B414@Program 

    maxAccel_Hzps     float -1.62670651e-19   0x00B416@Program 

    maxAccel_est_Hzps float 6.02517342e-11    0x00B418@Program 

    directionPole_rps float 7.44059543e-21    0x00B41A@Program 

    speedPole_rps     float -9.79740173e+13   0x00B41C@Program 

    dcBusPole_rps     float -1.44693618e-37   0x00B41E@Program 

    fluxFraction      float 1.38518168e-12    0x00B420@Program 

    indEst_speedMaxFraction float -3.40776123e-11   0x00B422@Program 

    powerWarpGain     float 1.3058817e+10     0x00B424@Program 

    systemFreq_MHz    unsigned int      19303 0x00B426@Program 

    pwmPeriod_usec    float -10.3678198 0x00B428@Program 

    voltage_sf  float 1.24530759e-21    0x00B42A@Program 

    current_sf  float -2.78843665 0x00B42C@Program 

    voltageFilterPole_rps   float 0.0158165004      0x00B42E@Program 

    maxVsMag_pu float -2.79487967 0x00B430@Program 

    estKappa    float 4.88597642e-08    0x00B432@Program 

    motor_type  enum <unnamed>    0x527A      0x00B434@Program 

    motor_numPolePairs      unsigned int      18665 0x00B435@Program 

    motor_ratedFlux   float 5.93281458e-34    0x00B436@Program 

    motor_Rr    float -2.22493769e-33   0x00B438@Program 

    motor_Rs    float -2.27364582e-36   0x00B43A@Program 

    motor_Ls_d  float 3.39165273e-25    0x00B43C@Program 

    motor_Ls_q  float 2.68915746e+13    0x00B43E@Program 

    maxCurrent  float -4.1539941e+17    0x00B440@Program 

    maxCurrent_resEst float 5.82617841e+20    0x00B442@Program 

    maxCurrent_indEst float -7.68734748e+31   0x00B444@Program 

    maxCurrentSlope   float -5.33869466e+36   0x00B446@Program 

    maxCurrentSlope_powerWarp     float -1.7858534e-27    0x00B448@Program 

    IdRated     float 7.02063735e-16    0x00B44A@Program 

    IdRatedFraction_indEst  float -0.0463340245     0x00B44C@Program 

    IdRatedFraction_ratedFlux     float -9.56725239e-15   0x00B44E@Program 

    IdRated_delta     float -3.91721784e-31   0x00B450@Program 

    fluxEstFreq_Hz    float 1.34030367e+10    0x00B452@Program 

    ctrlWaitTime      unsigned long[4]  0x00B454@Program  0x00B454@Program 

    estWaitTime unsigned long[14] 0x00B45C@Program  0x00B45C@Program 

    FluxWaitTime      unsigned long[6]  0x00B478@Program  0x00B478@Program 

    LsWaitTime  unsigned long[7]  0x00B484@Program  0x00B484@Program 

    RsWaitTime  unsigned long[6]  0x00B492@Program  0x00B492@Program 

    ctrlFreq_Hz unsigned long     521576823   0x00B49E@Program 

    estFreq_Hz  unsigned long     3356421835  0x00B4A0@Program 

    RoverL_estFreq_Hz unsigned long     160607942   0x00B4A2@Program 

    trajFreq_Hz unsigned long     1280459382  0x00B4A4@Program 

    ctrlPeriod_sec    float 7.92762925e-37    0x00B4A6@Program 

    maxNegativeIdCurrent_a  float -3979.68701 0x00B4A8@Program 

    errorCode   enum <unnamed>    USER_ErrorCode_maxCurrent_High      0x00B4AA@Program  

    Please keep me posted on whether anyone is having issues running lab2c.

  • Hi Keith,

    You didn't still pass the user parameters check as below message, need to set correct user parameters in user.h.

    gMotorVars.UserErrorCode      enum <unnamed>      USER_ErrorCode_maxCurrent_High 0x00B38C@Program

    you need to set USER_MOTOR_MAX_CURRENT < USER_IQ_FULL_SCALE_CURRENT_A, so you can set these parameters as below first

    #define USER_MOTOR_RES_EST_CURRENT      (5.0)
    #define USER_MOTOR_IND_EST_CURRENT      (-5.0)
    #define USER_MOTOR_MAX_CURRENT          (10.0)

    Best Regards,

    Yanming Luo

  • 8171.user_j1.hI am still not able to spin the motor using the new parameters.

    I attached the user_j1.h file.

    I am still running InstaSpin Lab2c.

     

    The phase output voltages are all in phase (locked rotor condition???).

    I am not sure why the software is NOT set to output the PWMs in sequence, 120 degrees out of phase...

     

    Oscilloscope readouts (reading the centertap output of the H-bridges directly to motor):

    DRV8305N Reads as follows:

    Phase A: Purple, Channel_3

    Phase B: Cyan, Channel_2

    Phase C: Yellow, Channel_1

     

    The motor does not turn, but every so often, the motor enters a stall condition and begins to vibrate excessively.

    As you can see in the attached photo, the PWMs are in phase with one another…

    Does anyone know how I can fix this?

  • 1. user.h issues, make this change. Currently you are trying to run the interrupt at 45 KHz which will not work.

    #define USER_NUM_PWM_TICKS_PER_ISR_TICK        (3)

    2. is J1 defined / active in user.h?

    3. which version of CCS are you using?  Which version of the compiler is active? (right click on project --> properties)

  • Thank you Chris!

    That worked!

    Changing line 140 in user_j1.h to "#define USER_NUM_PWM_TICKS_PER_ISR_TICK        (3)" did the trick.

    I attached my modified and tested7633.user_j1.h for BLDC high speed outrunner motors (for small quad-rotors). It should work for others if they need it.

    File location: \ti\motorware\motorware_1_01_00_16\sw\solutions\instaspin_foc\boards\boostxldrv8305_revA\f28x\f2806xF\src

    I will test in the future to see if it works on 2806xM devices (I have the 28069M Launchpad).

    J1 was define in user.h.

    I am using CCS Version: 6.1.3.00034.

  • The attached file in the last post:

    I have no idea why the name was changed from user_j1.h to 7633.user_j1.h.

    ????? - WHAT THE HECK!

    I am attaching it again here:

    6747.user_j1.h

  • It did it again...
    TO ANYONE GOING TO USE THE ABOVE HEADER FILE:

    CHANGE THE NAME OF IT FROM
    "6747.user_j1.h"
    TO
    "user_j1.h"