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.

LAUNCHXL-F28069M: Motor Controller Programming

Part Number: LAUNCHXL-F28069M
Other Parts Discussed in Thread: DRV8301, MOTORWARE

Hello E2E Experts,

Good day.

I purchased an F28069M motor controller for use with custom hardware. The Launchpad is used to drive a DRV8301 and the motor I'm trying to run is an ATO-D110BLD1500. I've been trying to find a program that will allow me to control a 48V BLDC or to write my own but has been unsuccessful. The MotorWare labs seem designed to run the controller with specific kits and I can't get it to even spin the motor.

Please let me know if TI has any pre-written code for running the Launchpad with custom hardware or if there are any support resources for writing my own control code.

Below are the design files I have if it will help.

Vin-Electric PCM Schematic.pdf

Gerbers.zip

Additionally, our motor draws 40 amps at peak current.

Regards,

CSC

  • It's difficult to provide an example to a customer for their own board. The customer may follow the steps below to migrate the example labs to their own board and verify the current and voltage signals of the hardware board before run the InsatSPIN labs.

     

    Please follow the steps to change the example labs and verify the current and voltage signals of the hardware board before run the lab02a/b/c since you are using your own board. Make sure that the current and voltage sampling works well.

    1. Change the PWM and ADC configuration in hal.c refer to the guide, motorware_hal_tutorial.pdf.

    C:\ti\motorware\motorware_1_01_00_18\docs\tutorials

     

    2. Set correct parameters based on the hardware board in user.h

    #define USER_IQ_FULL_SCALE_VOLTAGE_V           (xx)

    #define USER_VOLTAGE_FILTER_POLE_Hz               (xx)

    #define USER_ADC_FULL_SCALE_VOLTAGE_V       (xx)

    #define USER_IQ_FULL_SCALE_CURRENT_A           (xx)

    #define USER_ADC_FULL_SCALE_CURRENT_A       (xx)

     

    3. make sure that the sign of the current coefficient in HAL_readAdcData() in hal.h matches the current sensing circuit. Refer to chapter 5.2.2 Current Feedback Polarity in InstaSPIN user's guide (SPRUHJ1, https://www.ti.com/lit/spruhj1) to set the sign of the current scale factor.

     

    static inline void HAL_readAdcData(HAL_Handle handle,HAL_AdcData_t *pAdcData)

    {

       _iq current_sf = (+/-)HAL_getCurrentScaleFactor(handle);

    }

     

    4. Follow the instaSPIN lab guide to use lab01b and lab01c to verify your own hardware since you are not using the TI EVM kits and then run the subsequent labs.

     

    5. Using the lab02b or lab02c and tuning the identification variables parameter below to identify the motor parameters, and use the identified parameters to run the motor if the current and voltage sensing signals are verified and good.

    #define USER_MOTOR_RES_EST_CURRENT      (1.0)                               // A -  10-30% of rated current of the motor

    #define USER_MOTOR_IND_EST_CURRENT      (-1.0)                             // A -  10-30% of rated current of the motor,  just enough to enable rotation

    #define USER_MOTOR_MAX_CURRENT            (5.0)                               // A -  30~150%  of rated current of the motor

    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (40.0)                            // Hz - 10~30% rated frequency of the motor

  • Hello Yanming,

    Good day.

    I've gone through these steps but can't seem to run the motor, even with lab01c. I kept all the PWM signals as default but set the following for ADC:
    VDC = A7
    VA = B1
    VB = A2
    VC = B2
    IA = A0
    IB = B0
    IC = A1
    Please doublecheck that these values make sense for our circuit connections.

    I set the full scale voltage as 48V and full scale ADC voltage as 66.32V
    Full scale currents were kept at ~40 and ~81
    Voltage filter pole set to ~335
    We tested both positive and negative current sign

    When Run_Identify is set to 1, the board begins consuming more power (0.6A -> 1.4A) but the motor does not spin or make noise. The realtime graphs show that the IQ reference is being set but nothing reads out for either IQ or angle.

    Please let me know what I should try next.

    Regards,

    CSC

  • As mentioned above, you may try to run the lab01, lab01b and lab01c to verify PWM output and the current and voltage sensing with ADC on the hardware board first.

    Using lab01 without connecting the motor to verify the PWM.

    Using lab01b without connecting the motor to verify the PWM and ADC

    Using lab01b to run the motor with open-loop to  verify the voltage sensing with ADC

    Using lab01c to run the motor with current closed-loop to  verify the current and voltage sensing with ADC