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.

INSTASPIN-BLDC: LaunchXL - F28027

Part Number: INSTASPIN-BLDC
Other Parts Discussed in Thread: LAUNCHXL-F28027, MOTORWARE, DRV8305

I'm an instaspin newbie but I have completed the labs for the motorware labs using the launchxl-f28027 controller and bootsl-drv8305evm drive r with an Anaheim motor.  Now I want to use the f28027 controller with my own driver design and target motor.

What is the best way to proceed?   I want to reuse the labs to test my driver but obviously changes need to be made for my particular hardware.  I notice there are unique include paths for the user.h and hal files particular to the drv8305 driver.  Do I create my own version of these folders and modify the files?  How do I get my versions to be included instead of the originals? 

Thanks,

David

  • You might take a look at  the following 3 documentations to modify the related parameters and device configuration codes in the files of hal.c, hal.h and user.h according to the hardware board. Make sure that the current and voltage sensing circuit of your own hardware board is good for running the motor.

     Instaspin_labs.pdf at "\ti\motorware\motorware_1_01_00_18\docs\labs"

    motorware_hal_tutorial.pdf at "\ti\motorware\motorware_1_01_00_18\docs\tutorials"

    InstaSPIN-FOCTm and InstaSPIN-MOTIONTm User's Guide https://www.ti.com/lit/spruhj1

    https://www.ti.com/lit/ug/spruhj1i/spruhj1i.pdf

     

    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

     

    1. 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)

     

    1. 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);

    }

     

    1. 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.

     

    1. Using the lab02b or lab02c 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.