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.

TMDSHVMTRPFCKIT: ADC polarity and the related modification

Part Number: TMDSHVMTRPFCKIT
Other Parts Discussed in Thread: TMS320F28035, TMS320F28027F, MOTORWARE

Dear TI Experts:
I hope to apply TMS320F28035 and TMDSHVMTRPFCKIT to develop my custom design.
In the TI provided project HVPM_Enhanced_Sensorless_2803x, I found the following commands in HVPM_Enhanced_Sensorless.c
_iq offsetA=0;
_iq offsetB=0;
_iq offsetC=0;
clarke1.As = _IQmpy2(_IQ12toIQ(AdcResult.ADCRESULT1)-offsetA); // Phase A curr.
clarke1.Bs = _IQmpy2(_IQ12toIQ(AdcResult.ADCRESULT2)-offsetB); // Phase B curr.

For my custom design (a PMSMS FOC control with rated 3KW and rated Vbus=86V ), the Rshunt=0.003/4 Ohm and the OPA gain=20 (A) for the phase current sensing.
In this manner, how can I modify the project files provided by TI to meet my design?  For the above offset values, do I need to modify them?
For the negative and positive polarity in ADC sensing of phase current, how should we modify the program?

I found the *.h (setting file) for TMDSHVMTRPFCKIT (with TMS320F28035) is simpler than the user.h for InstaSPIN MCU, such as TMS320F28027F or 69M.  Does it mean the project programs of TMDSHVMTRPFCKIT is very smart, so the users only have to set the motor data, base voltage, and base current?
It seems that TI has provided more material for the InstaSPIN approach, but less for TMS320F28035 programming.

I really need your help to finish the job. Could you kindly show me how to solve the problem?

Many thanks in advance!
Tang Han
  • As replied to your question in a similar topic you posted (https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/828660/3081728#3081728), you may try the instaSPIN-FOC solution in motorWare (download it from the link is http://www.ti.com/tool/c2000ware)  that should be easier to spin a motor in minutes, and the InstaSPIN User's Guide has a detailed description on your question that can be used for this example project you referred also. 

  • Dear Expert Yanming:

    Thanks for your kind and professional reply.

    But I really must finish the project (Sensorless PMSM FOC control) by TMS320F28035, could you kindly teach me more?

    You mentioned in another post that "1. The offset will be calibrated automatically, so you don't change anything if you didn't skip the step and didn't change the current feedback circuit of h/w board as well. "

    I found in the Level 2 for Sensored BLDC of HV kit, there are some techniques about offset calibration. But in the Level 2 for Enhanced_Sensorless  of HV kit, it seems no statement about offset calibration.  That is why you say "The offset will be calibrated automatically", right?  But the user may doubt about the result of offset calibration. I am so curious about the result.  

    Foy my custom design (the Rshunt=0.003/4 Ohm and the OPA gain=20 (A) for the phase current sensing), I may make the following definition in HVPM_eSensorless-Settings.H

    #define BASE_CURRENT 110     //110*(0.003/4)*20=1.65

    Is it enough for the phase current feedback, and the offset will be calibrated automatically?

    On the other hand, about the ADC polarity (positive and negative), could you knidly show us which command we should modify?

    I am sorry that I can't find the answer from the document recommended by you. 

    Thanks for your kind help.

    Wish you the best ~

    Tang Han

  • Hope to hear from you soon~   Many thanks~

  • Hope to get your professional guideline~   Many thanks~

  • Please post the hardware schematic and the related code you designed accordingly, and what code do you have questions.

    The base current and voltage are related to your hardware as their comments. The BASE_CURRENT is peak sensing current that equals to half of the ADC sampling current range. The BASE_VOLTAGE equals to the 1/SQRT(3) of the ADC sampling voltage range.

    You might refer to a similar TI EVM kit to design your own board that should be easy to start.