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.

CCS/TMS320F28062F: Motor control failure before reaching max current

Part Number: TMS320F28062F
Other Parts Discussed in Thread: DRV8305

Tool/software: Code Composer Studio

Hi TI,

We are creating our custom speed controller using F28062F, DRV8305 and Instaspin FOC. We are very impressed with the FOC performance so far but we recently are frustrated with this issue which we still couldn't figure out after burning out more than a dozen of DRV and TMS.

Problem: At low speed (<2krpm), the motor only stalls at max current and recovered very quickly after the load is removed. However, at mid and high speed (>4krpm), the motor stalls for 2-3 seconds and starts screaming. At the same time, DRV nFault pin pulls low but no fault is reported via SPI. It is clear that the higher rpm motor spins, the more quickly the motor starts screaming. At 6krpm, the motor is very easy to stop and the drv fault is instantly triggered. The DRV and TMS finally browned out after a dozen of motor screaming.

Attempts:

1) We played with different PWM switching frequency (from 30khz to 45khz) and control loop frequency. It also seems that the higher the PWM frequency is, the lower motor speed at which the drv fault is triggered. This is counter-intuitive as we thought the higher frequency the better motor control is.

2) We beefed up the caps for charge pumps (high and low side) and PVDD for the DRV.  

3) We also add diode on the current sense line past drv and adjust resistors values to have enough headroom for voltage spikes on ADC pins.

4) We also use staged PID for different speed ranges.

Here are our hardware and user setting:

Drive IC: DRV8305N

Shunts: 3mohm

Motor: hobby grade, KV900, target max speed 10800RPM

We have configured Vsense and Isense resistors and caps such that:

#define USER_IQ_FULL_SCALE_FREQ_Hz (1516.7)
#define USER_IQ_FULL_SCALE_VOLTAGE_V (17.0) 
#define USER_ADC_FULL_SCALE_VOLTAGE_V (25.12)
#define USER_IQ_FULL_SCALE_CURRENT_A (56.0)
#define USER_ADC_FULL_SCALE_CURRENT_A (110.0)

#define USER_MOTOR_TYPE MOTOR_Type_Pm
#define USER_MOTOR_NUM_POLE_PAIRS (7)
#define USER_MOTOR_Rr (NULL)
#define USER_MOTOR_Rs (0.0336407572)
#define USER_MOTOR_Ls_d (7.04068543e-06)
#define USER_MOTOR_Ls_q (7.04068543e-06)
#define USER_MOTOR_RATED_FLUX (0.00615494233)
#define USER_MOTOR_MAGNETIZING_CURRENT (NULL)
#define USER_MOTOR_RES_EST_CURRENT (3.0)
#define USER_MOTOR_IND_EST_CURRENT (-3.0)
#define USER_MOTOR_MAX_CURRENT (40.0)

#define USER_MOTOR_FLUX_EST_FREQ_Hz     (100.0)   

#define USER_PWM_FREQ_kHz (30.0) // or 45.0
#define USER_NUM_PWM_TICKS_PER_ISR_TICK (3)
#define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
#define USER_NUM_CTRL_TICKS_PER_CURRENT_TICK (1)
#define USER_NUM_CTRL_TICKS_PER_EST_TICK (1)
#define USER_NUM_CTRL_TICKS_PER_SPEED_TICK (10) // or 15

I would really appreciate some help from TI gurus as we are racing against the project deadlines now.

Thanks,

Xunjie

  • I forget to mention that at higher RPM, motor starts screaming before reaching 70% of the max current.
  • Since the nFAULT pin of DRV8305 goes into low which indicates an error event has occurred that has caused by the driver. You need to check the status registers of DRV8305 to know what fault latched.

    Per the scenario you descripted, it seems a over current fault latched by DRV8305, you can try to set a higher VDS_LEVEL to extend the current limitation of driver.

    Read back and check the control register to confirm the SPI is ok for DRV8305, the status resisters should be changed if there is a fault appeared.
  • Hi Yanming,

    Thank you very much!

    I will increase VDS_LEVEL to see if the fault is still triggered.

    We used the lab05 to start off and have not changed anything on DRV SPI modules. We often get the DRV fault pin pulled low but do not see any faults latched on the debug window at all. (We went through all the status registers on the gDrvSpi8305Vars.) Do we need to change anything on lab05?

    Thanks,
    Xunjie
  • Hi Yanming,

    We tried to increase VDS_LEVEL to extend the current limit but it did not make a difference. Again, when the motor screams, all the DRV status registers still show no faults even though the nfault pin was pulled low.

    We noticed the default setting of VDS_LEVEL is 1.175V based on our CSD18502's Rds(1.8mohm), it will allow for 652A current but our max current is set at 40A. So we don't think the VDS_LEVEL could trigger the drv fault.

    Are there any other possibilities?

    Thanks,
  • #define USER_IQ_FULL_SCALE_VOLTAGE_V (17.0)
    #define USER_ADC_FULL_SCALE_VOLTAGE_V (25.12)
    Your IQ Full scale voltage is smaller than your ADC full scale voltage, same problem with your IQ full scale current. Read the warnings given, and adjust as required. It is possible the control becomes unstable at higher speeds due to a numerical problem related to this too small IQ full scale voltage/current.
    If it is just a control issue, try setting the Kp of the speed controller lower, and perhaps zeroing the Ki of the speed controller, just as a test.

    I also remember something about reading the DRV registers automatically clearing the faults. Not sure about this one, it's been a long time since I've worked on DRV chips.
  • Hi Rob,

    Thanks for your reply. We use the Instaspin guideline to create 30% headroom on USER_IQ_FULL_SCALE_VOLTAGE_V from ADC_FULL_SCALE. We intentionally increase the hardware for ADC full scale voltage in case of voltage spike damaging ADC pins. Same principle applies to current settings.

    We also decrement Kp all the way close to zero but the problem still exists.

    Are there any other drive chips do you recommend?

    Thanks,
  • You still should not set USER_IQ_FULL_SCALE_x smaller than USER_ADC_FULL_SCALE_x, ever. I've had bad experiences with this, and I consider it an error. (Though maybe someone from TI has better advice on this)