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.

TMS320F28335: The acquired samples through ADC goes erratic

Part Number: TMS320F28335

Deal all,

I am using TMS320F28335 for inverter control and for time being the open-loop is being implemented. I am using a voltage sense card that conditions 50VAC to 0 to +3V to acquire into F28335 micro controller. However, I am facing following issue.

I regulate the DC bus voltage to control the AC o/p voltage and it is evident on the code composer studio graphing tool. Nonetheless, after a particular DC voltage the waveform looses the sinusoidal shape as shown in the below attached figures. However, when I decrease the voltage the waveform becomes normal. Could anyone solve this mysterious issue!

I can assure that the sample size I have chosen includes a complete cycle of output sine. Furthermore, the actual output voltage shape is almost a sine.

Here is the screenshot when the voltage is sine

The below figure shows when the waveform goes erratic.

The below waveform shows when the DC voltage is further increased.

I am in in quite a tight corner. Could anyone off me the hook!

Regards,
Rajesh BN.

  • Hi Rajesh,

    Your pic is not clear enough. Could you fix it?

    Furthermore, the actual output voltage shape is almost a sine.

    So are you saying the actual output voltage looks fine but the output voltage through the CCS graph tool is not correct?

    Regards,

    Chen 

  • Absolutely! The actual 3 phase voltages are sinusoidal but the acquired values not sinusoidal. Nevertheless, sections of sine are getting inverted as shown in the figures provided in the doc file attached.

    tiforusdoubts (1).docx

    Regards,

    Rajesh BN.

  • Hi Jiang,

    I have solved the problem. The issue stems at the initialisation of variables.

    The ADC mirror values are stored in a variable that is initialized as an integer. Then the value is scaled to get the actual values and this is initialized as floating number.

    The following logic is used in the original code.

    int VR;

    float Vra;

    VR = ADC mirror.Adcresult0;

    Vra = (VR-2048)*50/2048;

    Once I have initialized VR as float instead of int, it has worked like a dream. Still, I want to know why the above code was making an issue.

    Regards,

    Rajesh bn.

  • Hi,

    Not sure what could be the issue. Is the ADCresults0 the register value? or you defined different parameters.

    But looks like the value is incorrect when it crosses 12~14 voltages and will change the positive/negative sign.

    Regards,

    Chen