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 labs 2a and 2b InstaSPIN FOC

Other Parts Discussed in Thread: BOOSTXL-DRV8301, BOOSTXL-DRV8305EVM

Hi Chris,

I'm currently getting started on InstaSPIN FOC with a C2000 Piccolo 28027F LaunchPad; I haven't purchased the BoosterPack and I don't have plans in getting it because I would like to use my own inverter. Anyways, I went through lab 1 and it worked just fine; the problem comes in the second lab, which I can't get running possibly because I have not connected the motor yet. The thing is I want to test the controller first without having to connect any motor, all I want to see is the control signals at the PWM pins through an oscilloscope to make sure the program is running correctly before I use it with the motor. Is that my problem? Does the program "stops" if it detects that no motor is plugged? Or what is it that I have to see? I haven't found the lines that do so yet, could you help me with this?

Thank you!

Jorge Flores

  • Jorge,
    proj_lab02 is for using the motor identification feature. If you don't have an inverter connected it won't do anything of note.

    While this would be useful to have a lab01b which just tests ADC and PWM output - with no other control or logic - we don't have this lab at this time (and to be honest we probably won't create it anytime soon).
  • Thanks for the rapid response Chris,

    So, what I would have to do is either connect the inverter (any inverter? because the program has as well some parameters of the TI Kits and BoosterPacks) or write a code myself, sort of a modification of lab01, with the ADC and PWM testing, am I right?

    Thanks a lot and sorry for these beginners questions, I'm actually a neophyte in FOC motor control.
  • the easiest way is to connect a BOOSTXL-DRV8301 or BOOSTXL-DRV8305EVM and a 3-ph motor.

    for your own inverter you will need to update any of the settings required (if you have remapped any of the signals or changed any of the voltage/current scaling and filters), then all of the projects will work.

    you could write some of your own code to test PWM and ADC, sure.
  • Hello Chris,

    First, I'd like to thank you for the advices you've given to me so far, they've been very helpful. However, I know have another issue!

    I managed to disable the modules that require a BOOSTERPACK, so I'm now able to observe the 6 PWM signals without any problem. The thing is, I can't figure out which part of the program does the variation of the duty cycle in order to get a sine wave after puting the generated signal through a low-pass filter: my scope does not recieve any signal after the filter! I found out the part of the program that actually generates the PWM signals is this:

    static inline void HAL_writePwmData(HAL_Handle handle,HAL_PwmData_t *pPwmData)
    {
    uint_least8_t cnt;
    HAL_Obj *obj = (HAL_Obj *)handle;
    PWM_Obj *pwm;
    _iq period;
    _iq pwmData_neg;
    _iq pwmData_sat;
    _iq pwmData_sat_dc;
    _iq value;
    _iq valor;
    uint16_t value_sat;

    for(cnt=0;cnt<3;cnt++)
    {
    pwm = (PWM_Obj *)obj->pwmHandle[cnt];
    period = (_iq)pwm->TBPRD;
    pwmData_neg = _IQmpy(pPwmData->Tabc.value[cnt],_IQ(-1.0));
    pwmData_sat = _IQsat(pwmData_neg,_IQ(0.5),_IQ(-0.5));
    pwmData_sat_dc = pwmData_sat + _IQ(0.5);
    value = _IQmpy(pwmData_sat_dc, period);
    value_sat = (uint16_t)_IQsat(value, period, _IQ(0.0));

    PWM_write_CmpA(obj->pwmHandle[cnt],value_sat);
    }

    As I see it, the CMPA value stays the same always, that means the duty cycle remains the same and hence no modulation ever occurs, which I don't understand because this is supposed to be an example for 3 phase motor control. Should I write myself some extra code to make the modulation (i. e. with a look-up table) or is this option "hidden" someplace else in the program? Thank you very much and hope hearing from you soon.

    Regards

    Jorge Flores
  • Dear Jorge Flores,

    Please see the discussion on the topic at e2e.ti.com/.../1688519

    to find out your answer for your problem.

    Good luck!