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.

Testing InstaSpin on own hardware by open loop

Other Parts Discussed in Thread: TMS320F28069, MOTORWARE

Hello community,

I have developped an own simple hardware to control a PMSM motor with a dc link of 300V and a power of 500W.

Voltage measurement is realized by simple voltage divider and 3-phase current measurements by shunts at low side FETs with

positive gain opamps.

Values at user.h have been adapted.

When I apply external voltage at the dc-link, phase u, v, w voltage dividers, or a DC current of 1A through the shunts,

the values in the software seem to be OK.

When I start running with disconnected motor, the drain source voltages look fine.

But when I start running or identifying with connected motor, there is a high current consumption, limitted by my DC power supply. 

Is there a possibility to test my hardware by open loop control, so just controlling the bridge with a certain PWM and rotating frequency

in order to check, if my gate driver and MosFets work correctly. 

Thank you and kind regards,

Joachim

  • I have a few questions

    • Did you update HAL_setupAdcs() so it reflects the inputs that you are using for currents, voltages and DCbus?
    • Did you update HAL_setupPwms() in hal.c so it reflects the output PWM pins used?
    • Did you verify the polarity of the currents?

    It actually seems to me that the polarity is negated, so that's probably why you get a huge current spike. What polarity are you using? Did you get one of the TI boards as reference? if so, could you compare your hal.c and hal.h files vs. the board you used as reference for the polarity?

    -Jorge 

  • Thanks for response !

    I didn't change the HAL_setupADCs() and HAL_setupPWMs(), because I have used the same pin configuration as the HV evaluation board. With this board everything works fine.

    The summation current measurement is not implemented at my hardware.

    Just the polarity of phase current measurement is now positive and I adapted this in the function HAL_updateAdcBias:

    bias -= OFFSET_getOffset(obj->offsetHandle_I[cnt]);

    By the way: I can't see any differences when I change current polarity at the HV evalboard. It works correctly for negative and positive polarity as well, even there is an inverted opamp circuit at the HV evalboard.

    By injecting external currents to the shunts or external voltage to each voltage divider, I can see correct values in debugging mode.

    Device: TMS320F28069

    Code Composer Studio Version 6.1.1.00022

    Programmer: XDS510LC JTAG Emulator 

     

    -Joachim

  • Hi,

    Please refer to the following two posts:

    https://e2e.ti.com/support/microcontrollers/c2000/f/902/p/311930/1090313#1090313
    https://e2e.ti.com/support/microcontrollers/c2000/f/902/p/311930/1095570#1095570

    If you have positive current feedback, you also need to change these lines in HAL_readAdcData():

    pAdcData->I.value[0] = -value;
    ...
    pAdcData->I.value[1] = -value;
    ...
    pAdcData->I.value[2] = -value;

    Best regards,
      Robert

  • Is there any reason why this information is not included in the Instaspin User Guide (SPRUHJ1F)? At least I can't find it. Myself and a colleague were working for two days without getting it to work, reading the user guide. By luck we stumbled upon this thread, made the changes and the motor started to spin beautifully...

  • it is getting an update late this year.
    it should have been done sooner. the only reasoning was that we were relying on customers to re-use the code in MotorWare and choosing an EVM which matched their own current polarity.