Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

CCS/TMS320F28035: Reading Phase current using ADC

Part Number: TMS320F28035

Tool/software: Code Composer Studio

Hello,

I have a TMS320F28035 card that I am using to control a linear PMSM. I am programming in Simulink and then exporting it to the CCS V5. I need to use the ADC to read the phase currents but I cannot make it work, it seems that my ADCs read nothing.

According to the schematics, the current sense resistors are placed at the lower side of the transistors bridge, therefore, current flows through them only when the low gate is open. The ADC analogue input (ADCin) is:

ADCin=(Vref-Vs·G),

where Vref=1.65V; Vs=Rs*if (if= phase current and Rs=0.002ohms) and G is the Gain.

The ADC should have as digital output output (ADCout):

ADCout= ADCin·4096/3.3

I have programmed it in Simulink as I show in my screenshots below, but it just reads Vref*4096/3.3, as if the phase current were "0", but it isn't. I have tried to program it in different ways but I keep having the same results. To check the ADC readings I use a DAC of the card.

Please, ¿could you help me? If you need any more information, please, ask.

Thank you!

  • Hi Lucia,

    I've a doubt here, how do you get the value of 'if' (phase current)? From another ADC input?

    Regards,
    Gautam
  • Hello Gautam,

    I measure the phase current using other methods, like an ammeter and an oscilloscope. The phase currents have values between +-6 A, therefore, the ADC should be reading something like:

    ADCout= 4096/3.3·(1.65-5·0.002·G) ; if G=20, then ADCout= 1800.

    To read the output of the ADC, I use a DAC. In simulink, I connect the output of the ADC to a DAC, but first I scale it because the output of the ADC is over 12 bits and the input of the DAC is 10 bits, as you can see in the screenshot below. I have checked that the DACs work properly by trying different inputs, so I think that the problem is in the ADC settings.

  • Hello,

    I haven't solved this issue yet. Can somebody help me? The ADCs are reading 2048 all the time, that corresponds to a If=0, what it is not true. I think that the SOCs are not working properly...any suggestions?

    Thank you!