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!