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.

TMS320F2800157: Getting ADC count less.

Part Number: TMS320F2800157
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG, OPA350

Tool/software:

Hello,

I am using TMS320F2800157 controller, 32 package

I am using the example (adc_ex10_multiple_soc_epwm) to measure voltage. For ADC counts corresponding to voltages below 15 volts, the error percentage is low. However, as the voltage exceeds 15 volts, the error percentage increases non-linearly.

Its reference voltage is 3.3v internal 

The table below presents the measured samples:

Actual volt(applied volts) ADC count Measured volt Difference voltage
5 292 4.93 0.07
10 585 9.89 0.109999999999999
15 863 14.83 0.17
20 1129 18.8 1.2
25 1390 22.9 2.1
30 1564 26.1 3.9
35 1669 28.9 6.1
40 1767 30.9 9.1
45 1873 31.4 13.6
50 1950 32.8 17.2

Could you offer some guidance on how to resolve this issue?

Thanks 

Siva Kumar

  • Hello Siva,

    What is your input network -- how do you condition the signal before connecting to the ADC pin? Could you share a schematic?

    Also please share your ADC initialization code -- in particular, the ADC prescale divider setting and the SOC configuration used.

    Thanks,
    Ibukun

  • Hello Ibukun,

    Here schematic

     

    I am using direct example code: adc_ex10_multiple_soc_epwm provided by TI. I am using SOC0 channel, and A0 pin using to read adc voltage that I am not using any prescaler values.

    Thanks and regards 

    Siva Kumar 

  • Hello Siva,

    The schematic is cropped so I'm not sure if I have this right. But if VBAT is the ADC input, then I believe the acquisition window size is too short. The default examples use the minimum ACQPS setting, which assumes ≤ 50Ω source impedance. For a high impedance input like this one, you will need a much longer sample & hold window.

    For more details on this, please refer to the following:

    - Device TRM, ADC chapter > Additional Information > Choosing an acquisition window size

    ADC Input Circuit Evaluation for C2000 MCUs

    Charge-Sharing Driving Circuits for C2000 ADCs

    Best regards,
    Ibukun

  • Hello Ibukun,

    Thank for your early response,

    Currently, I can successfully read ADC counts with minimal offset differences. However, when I use Sysconfig-generated code, the ADC does not read proper values because the voltage reference is configured internally instead of externally.

    Previously, with the C2000ware 5001 version ADC example using an external voltage reference, everything worked correctly.

    Could you please suggest a solution for this issue?

    Thanks and Regards,

    Siva Kumar

  • Hello Siva,

    What is the ACQPS setting for the SOC being used to convert this channel? Have you tried increasing it?

    Thanks,
    Ibukun

  • Hello Ibukun,

    The ACQPS count is set to 9. When I increase it beyond 9, the ADC count I read decreases. Therefore, I'm currently using an ACQPS value of 9. Can you provide a solution for this issue using Sysconfig?

    Thanks 

    Siva Kumar 

  • Hello Siva,

    ACQPS 9 (10 cycles) at 60MHz is just 167ns. With a high impedance input like this, the sampling time needs to be much higher. Doing some quick math using your schematic and assuming internal 3.3V reference, your acquisition window size needs to be at least 6.5us. If you want fast acquistion times, you will need to buffer your signal with a fast op amp e.g. OPA350.

    Again, please take a look at the application notes I referenced above.

    Thanks,
    Ibukun

  • Hello Ibukun,

    Thank you for your support.

    Currently, I can successfully read the ADC data using the ADC example code in version 5.00. However, I believe there is an issue with the Sysconfig generated code: it indicates an external reference, but it does not function as an external mode voltage reference.

    Regards & thanks,

    Siva Kumar

  • Hi Siva,

    As I mentioned in the previous thread, for the 32-pin package, external reference mode must be used to use VDDA as the reference. There is no actual VREFHI pin on this package. The reference is "external" because it is outside the ADC module -- not necessarily outside the chip.

    Best regards,
    Ibukun