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.

Problems with Id run on custom controller

Other Parts Discussed in Thread: DRV8301, MOTORWARE

Hello.

I built a custom motor controller to run two motors using f28069M. I have problems getting motor to run (Lab2d for example).

Motor I am using is small  BLDC with KV930.

During Id run, when gMotorVars.EstState = EST_State_Rs motor starts moving (As I undestand it should not) and current rises too high and causes power supply to reset (12 V, 5 A rating). I do not have such problems when using Launchpad with DRV8301 booster pack.

I use same connections (analog inputs and PWM signals) to the MCU as on F28069 Launchpad. I dont use DRV8301 and for current sensing I use Allegro ACS758 Hall sensors. In picture below  is shown current and voltage measurement circuit. Each phase and DC bus has one.

Does anyone have any idea what could be wrong?

User.h file is modified using excel table that is included in motorware (V1.01.00.16) package. 

I also put minus in hal.h file for bias -= OFFSET_getOffset(obj->offsetHandle_I[cnt]);

user.h (user_j1.h) file:

1323.user_j1.h

Measurement circuit (only one inverter unit attached):

Video demonstration:

  

F28027 Launchpad in video is used only for XDS100v2 connection.

  • I have a feeling that problem is related to current sensing, because before I accidentally had forgotten to solder a resistor on board and current feedback didnt reach MCU. And then the result was similar.

    My current feedback signals are centered around 1,5 V instead of 1,65 V. Could this cause this error?

  • there are so many things it could be!
    yes, I suspect there are serious issues with the hardware.
    are you sure of all of the USER_ADC scaling from your circuits?
    all of your currents and voltages changed from our BOOST example, yet you kept the same
    #define USER_VOLTAGE_FILTER_POLE_Hz (364.682)


    you shouldn't need to do the -offset in the hal

    your PWM is set to 30 KHz with no decimation. during motor ID this is too high, you could be overflowing the controller.
    change
    #define USER_NUM_PWM_TICKS_PER_ISR_TICK (2)

    you should update
    #define USER_MOTOR_FLUX_EST_FREQ_Hz (60.0)
  • Thank you for your answer.

    I got my motor running now, sort of. I had to deleted that minus from hal.h. 

    My cutoff frequency on voltage sense filter is 360 Hz, so I also updated USER_VOLTAGE_FILTER_POLE_Hz t0 360.0 now.

    My next issue is that motor only spins till EST_State_RatedFlux. Then speed drops to almost zero.  Can you tell me what could be the issue there?

    And also should I change my hardware so that current sense signals are centered around 1,65 V not 1,5 ?

    EDIT:

    I also tried using motorware v14 (instead of V16). During EST_State_Rs it produced more noise(sound) but when spinning during ramp-up it had less vibrations. It was also spinning during EST_State_RatedFlux but then had vibrations. And now it stops during EST_State_Ls.

    Parameters seem to be same in user files in V14 and V16.

  • Got it working fine with motorware v14 now. Realized that my ADC full scale currents were wrong. I thought that full scale current is from 0 to 50 A, but now I think it is actually from -50 A to 50 A, so 100 A.

    Had to change

    #define USER_IQ_FULL_SCALE_CURRENT_A         (26.0) 

    #define USER_ADC_FULL_SCALE_CURRENT_A        (50.0)

    to

    #define USER_IQ_FULL_SCALE_CURRENT_A         (51.0) 

    #define USER_ADC_FULL_SCALE_CURRENT_A        (100.0).

    I also changed my voltage dividers so current sense signal is centered around 1,65 V.

    I still wonder why it is not working with V16. 

  • glad you got it working!
    I believe in v16 it may have to do with the polarity of the current sense. We made a change with the -offset value from previous versions.

    yes - current full scale is -Current to + Current