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.

Why ADC results have big difference each time?

Other Parts Discussed in Thread: TMS320F28377D, CONTROLSUITE

Hi, I run the example code of adc_soc_continuous_cpu01 on F28377D controlCAD. I use a AA battery(1.624V) as a target.  The measurement results have a big difference each time. The following is the copy of two measurement results. Does anybody know why the measurement  results are so different?

ADCRESULT0      0x07F6  ADC Result 0 Register [Memory Mapped]           

ADCRESULT1      0x0812  ADC Result 1 Register [Memory Mapped]           

ADCRESULT2      0x0804  ADC Result 2 Register [Memory Mapped]           

ADCRESULT3      0x07E1  ADC Result 3 Register [Memory Mapped]           

ADCRESULT4      0x07F6  ADC Result 4 Register [Memory Mapped]           

ADCRESULT5      0x080A ADC Result 5 Register [Memory Mapped]           

ADCRESULT6      0x07D5 ADC PResult 6 Register [Memory Mapped]         

ADCRESULT7      0x07F3  ADC Result 7 Register [Memory Mapped]           

ADCRESULT8      0x07E5  ADC Result 8 Register [Memory Mapped]           

ADCRESULT9      0x07D9 ADC Result 9 Register [Memory Mapped]           

ADCRESULT10    0x07EC  ADC Result 10 Register [Memory Mapped]         

ADCRESULT11    0x07EB  ADC Result 11 Register [Memory Mapped]         

ADCRESULT12    0x07F6  ADC Result 12 Register [Memory Mapped]         

ADCRESULT13    0x0815  ADC Result 13 Register [Memory Mapped]         

ADCRESULT14    0x0806  ADC Result 14 Register [Memory Mapped]         

ADCRESULT15    0x07FD ADC Result 15 Register [Memory Mapped]         

ADCRESULT0      0x07E2  ADC Result 0 Register [Memory Mapped]           

ADCRESULT1      0x0816  ADC Result 1 Register [Memory Mapped]           

ADCRESULT2      0x0805  ADC Result 2 Register [Memory Mapped]           

ADCRESULT3      0x07DE ADC Result 3 Register [Memory Mapped]           

ADCRESULT4      0x07FC  ADC Result 4 Register [Memory Mapped]           

ADCRESULT5      0x0807  ADC Result 5 Register [Memory Mapped]           

ADCRESULT6      0x07D2 ADC Result 6 Register [Memory Mapped]           

ADCRESULT7      0x0800  ADC Result 7 Register [Memory Mapped]           

ADCRESULT8      0x07DC ADC Result 8 Register [Memory Mapped]           

ADCRESULT9      0x07E7  ADC Result 9 Register [Memory Mapped]           

ADCRESULT10    0x080D ADC Result 10 Register [Memory Mapped]         

ADCRESULT11    0x07F3  ADC Result 11 Register [Memory Mapped]         

ADCRESULT12    0x07F7  ADC Result 12 Register [Memory Mapped]         

ADCRESULT13    0x0818  ADC Result 13 Register [Memory Mapped]         

ADCRESULT14    0x07FB  ADC Result 14 Register [Memory Mapped]         

ADCRESULT15    0x07F5  ADC Result 15 Register [Memory Mapped]         

  • Hi Xiaowei,

    It looks like the average of these conversions is roughly what you would expect, so mostly the concern is the noise?  Is the battery connected directly to the ADC input, or is there an op-amp and/or anti-aliasing filter?  If not, you should at least add an RC filter, or possibly an op-amp and RC filter.  You can also take many samples and average to reduce the noise.  

  • Thanks for your help. I added an op-amp and filter. The measurement results look better now. But still too much noise for our application. The following is the results. Normally, what is the acceptable error percentage of this ADC?

    HEX DEC VOLTAGE Difference with1.624V
    ADCRESULT0 0x07E9 2025 1.63147 0.00747
    ADCRESULT1 0x07EC 2028 1.633887 0.009887
    ADCRESULT2 0x07ED 2029 1.634692 0.010692
    ADCRESULT3 0x07EF 2031 1.636304 0.012304
    ADCRESULT4 0x07F8 2040 1.643555 0.019555
    ADCRESULT5 0x07EC 2028 1.633887 0.009887
    ADCRESULT6 0x07F0 2045 1.647583 0.023583
    ADCRESULT7 0x07EF 2033 1.637915 0.013915
    ADCRESULT8 0x07D9 2028 1.633887 0.009887
    ADCRESULT9 0x07E8 2025 1.63147 0.00747
    ADCRESULT10 0x07EE 2028 1.633887 0.009887
    ADCRESULT11 0x07DE 2031 1.636304 0.012304
    ADCRESULT12 0x07EC 2025 1.63147 0.00747
    ADCRESULT13 0x07E5 2031 1.636304 0.012304
    ADCRESULT14 0x07EA 2027 1.633081 0.009081
    ADCRESULT15 0x07ED 2026 1.632275 0.008275
    AVERAGE     1.635498 0.011498
    ADCRESULT0 0x07F4 2036 1.640332 0.016332
    ADCRESULT1 0x07F2 2034 1.638721 0.014721
    ADCRESULT2 0x07F1 2033 1.637915 0.013915
    ADCRESULT3 0x07ED 2029 1.634692 0.010692
    ADCRESULT4 0x07F1 2033 1.637915 0.013915
    ADCRESULT5 0x07F0 2032 1.637109 0.013109
    ADCRESULT6 0x07F2 2034 1.638721 0.014721
    ADCRESULT7 0x07EF 2031 1.636304 0.012304
    ADCRESULT8 0x07F0 2032 1.637109 0.013109
    ADCRESULT9 0x07F2 2034 1.638721 0.014721
    ADCRESULT10 0x07EB 2027 1.633081 0.009081
    ADCRESULT11 0x07F1 2033 1.637915 0.013915
    ADCRESULT12 0x07F4 2036 1.640332 0.016332
    ADCRESULT13 0x07FB 2043 1.645972 0.021972
    ADCRESULT14 0x07F4 2036 1.640332 0.016332
    ADCRESULT15 0x07EC 2028 1.633887 0.009887
    AVERAGE     1.638066 0.014066
  • Xiaowei,

    There are quite a few ways to specify the ADC error.  In the datasheet right now we have gain, offset, and linearity.  These will tell you how accurate the ADC is from a DC perspective.  

    With respect to noise, the SNR of the ADC will be around 68dB.  It is certainly be possible to get a DC codespread of <= 4LSBs.  

    Your results still seem pretty noisy.  Have you tried supplying the ADC directly from the output of a signal source like a function generator (you should still use the op-amp and filter circuit)? 

  • I just made a measurement from the output of the function generator with op-amp. Input voltage is 1.623, still a lot of noise!

    DEC Voltage Error DEC Voltage Error
    ADCRESULT0 2019 1.626635742 0.003636 ADCRESULT0 2023 1.629858 0.006858
    ADCRESULT1 2020 1.627441406 0.004441 ADCRESULT1 2024 1.630664 0.007664
    ADCRESULT2 2021 1.62824707 0.005247 ADCRESULT2 2024 1.630664 0.007664
    ADCRESULT3 2023 1.629858398 0.006858 ADCRESULT3 2024 1.630664 0.007664
    ADCRESULT4 2023 1.629858398 0.006858 ADCRESULT4 2024 1.630664 0.007664
    ADCRESULT5 2024 1.630664063 0.007664 ADCRESULT5 2025 1.63147 0.00847
    ADCRESULT6 2024 1.630664063 0.007664 ADCRESULT6 2025 1.63147 0.00847
    ADCRESULT7 2025 1.631469727 0.00847 ADCRESULT7 2025 1.63147 0.00847
    ADCRESULT8 2025 1.631469727 0.00847 ADCRESULT8 2025 1.63147 0.00847
    ADCRESULT9 2025 1.631469727 0.00847 ADCRESULT9 2026 1.632275 0.009275
    ADCRESULT10 2026 1.632275391 0.009275 ADCRESULT10 2027 1.633081 0.010081
    ADCRESULT11 2027 1.633081055 0.010081 ADCRESULT11 2027 1.633081 0.010081
    ADCRESULT12 2027 1.633081055 0.010081 ADCRESULT12 2027 1.633081 0.010081
    ADCRESULT13 2028 1.633886719 0.010887 ADCRESULT13 2028 1.633887 0.010887
    ADCRESULT14 2030 1.635498047 0.012498 ADCRESULT14 2028 1.633887 0.010887
    ADCRESULT15 2030 1.635498047 0.012498 ADCRESULT15 2029 1.634692 0.011692
    Average 1.631318665 0.008318 1.632023 0.009023
  • Your values are gradually increasing now, but actually not very noisy.  I think you may need to increase ACQPS or decrease source impedance.  

  • The ADC result is getting better and better with your help.  The difference between input voltage(1.622V) and The average result of 16 measurements is 0.0002549V.  Do you think I need to cal  Device_cal() function? Because I saw the following information.  If needed, how to cal Device_cal() function?  I use the following way to call the function. It didn't work.

    #define Device_cal (void   (*)(void))0x000000

    ...........

    (*Device_cal)();

    // *IMPORTANT*
        // The Device_cal function, which copies the ADC & oscillator calibration values
        // from TI reserved OTP into the appropriate trim registers, occurs automatically
        // in the Boot ROM. If the boot ROM code is bypassed during the debug process, the
        // following function MUST be called for the ADC and oscillators to function according
        // to specification. The clocks to the ADC MUST be enabled before calling this
        // function.
        // See the device data manual and/or the ADC Reference
        // Manual for more information.

    ADCRESULT0 07E1 2017 1.62502 0.0030244
    ADCRESULT1 07DF 2015 1.62341 0.0014131
    ADCRESULT2 07DD 2013 1.6218 -0.000198
    ADCRESULT3 07DD 2013 1.6218 -0.000198
    ADCRESULT4 07D9 2009 1.61858 -0.003421
    ADCRESULT5 07DF 2015 1.62341 0.0014131
    ADCRESULT6 07D9 2009 1.61858 -0.003421
    ADCRESULT7 07DE 2014 1.62261 0.0006074
    ADCRESULT8 07DF 2015 1.62341 0.0014131
    ADCRESULT9 07E0 2016 1.62422 0.0022187
    ADCRESULT10 07DC 2012 1.621 -0.001004
    ADCRESULT11 07DF 2015 1.62341 0.0014131
    ADCRESULT12 07E3 2019 1.62664 0.0046357
    ADCRESULT13 07D9 2009 1.61858 -0.003421
    ADCRESULT14 07DF 2015 1.62341 0.0014131
    ADCRESULT15 07DB 2011 1.62019 -0.00181
    Average 1.62225 0.0002549
  • Xiaowei,

    Device_cal() is currently not populated on TMX devices so there are no factory trims available.  When the device reaches TMS level of maturity there will be Device_cal() trims available to help improve accuracy.

    -Tommy

  • Hi Tommy,

    Thanks for your help. May I ask a simple question? what are TMX and TMS shorted for?

  • TMS and TMX are prefix codes that describe the maturity level of the device.  There should be definitions in the datasheet similar to this snapshot.

  • If I am fully understood, we can only get samples for TMX320F28377D  at this moment.  TMS version is still on PREVIEW status.

    Do you an idea when will TI release TMS320F28377D?

  • The current estimate is early 2015.

  • Hello!

    I have seen in the errata that we need to connect the ADC's Vreflo to the ground in order to avoid the ADC-to-ADC crosstalk and to reduce the noise. But the problem is that I can't found anywhere in the datasheet what are the pins number on the EVM F28377DZWT? Could you give me a link or anything else where they are referenced?

  • Hi Baptiste,

    I am not sure if your are looking for this or not. 

    TMDSCNCD28377D_180cCARD_pinout_R1_1.pdf

    \ti\controlSUITE\development_kits\~controlCARDs\TMDSCNCD28377D_v1_1\R1_1

  • Hi Xiaowei,

    Thank you. Obviously I had not seen this PDF!