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.

TM4C123 ADC Internal Reference Use

Hello everyone! 

  I'm back on my TM4C123's design project (after a long "other urgent issues" period...), performing what I expect to be the "final adjustments". 

My system registers data (from a load cell, a potentiometer and  a temperature sensor), using the ADC. From all the tests I've performed, everything SEEMS to be working OK. I've just one final doubt.

I've used the ADC's internal 3.3V reference for the data adquisition (from what I could tell initially, the acquired values were OK).

Looking closely now at the obtained data, I've checked that there's a 20mV (i.e 20-25 counts) error for a fixed value acquisition. (To be more clear, if I put a stable 2.5V input in any of the inputs (approx 3103 counts), the readings will vary from 3091 to 3115.

The question is the following. I've taken measures with an oscilloscope in the ADC's inputs, but I DO NOT see this 20mV error.

Could it be something derived from the fact of using the internal reference instead of supplying an external one? Or it's something strictly circuit-related, and I should double-check the design?

I appreciate your opinions on this. If there's anything I've forgotten to clarify, please let me know.

Kind Regards,

Martín Cunningham 

  • Hello Martin,

    Since you are using the 3.3V internal reference a lot depends on the stability of the supply. Rathen using a temp compensated external reference would have been better.
    Also where the decoupling caps are kept on the system does decided how good the stability of the source pin would be

    Also note that the stability of the Measurements has a error limit as well under strict lab conditions. This does not take into account the noise being generated in the device or in it's IO due to switching.

    Regards
    Amit
  • That "reference" is just the analog power supply. Power supplies are usually specified as +/-10% or +/- 5% and also can have considerable noise. They are likely to vary over time and temperature so calibrating to an absolute is of rather limited use.

    Using a proper filter on the analog input will help reduce short term variations.

    A real high precision reference is needed for high accuracy work. Accurate references are expensive. A reference with 12 bit initial accuracy will be of similar cost to a TM4C123. Note that word initial, reference accuracy is subject to temperature, soldering history and strain (probably other factors as well).

    Then you have the base ADC parameters which only claims a 15 count accuracy to start with.

    Finally you have your signal conditioning circuitry. To maintain your accuracy your gains and offset must be maintained will below 0.025%. Finally you need a sensor accurate enough for any of that to matter which is rather more rare than most people think it is. Check your sensor data sheet, you may be surprised. Having measurements accurate to 0.05% on a sensor only capable of 5% seems rather pointless.

    Robert

    I tell you, this hobby horse herd covers the prairies.

  • A few notes at the end of the day

    Martin Cunningham said:
    a potentiometer

    A/D conversion of the pot can be made independent of the reference accuracy. The principle is to use a buffered copy of the reference voltage to drive the two "outside" terminals of the pot and run the wiper voltage (buffered of course) to the A/D.  The wiper voltage will vary as the reference does always keeping the same ratio to the reference voltage.  This "ratiometric" input is insensitive to the absolute value of the reference only depending on its short term stability.  Some other sensors also operate or can be made to operate in this fashion.

    Martin Cunningham said:
    temperature sensor

    Measuring better than 1C is difficult. For very much better you need very good equipment.

    Martin Cunningham said:
    a load cell

    If this is something like a strain gauge then you may be able to use it in a ratiometric fashion.

    I was also able to check the A/D specs in the manual (Did you? and what conclusions did you come to about the basic accuracy of the A/D?)

    TM4C123 manual said:

    SYSTEM PERFORMANCE when using internal reference

    ET Total unadjusted error, over full input range (min)-  (nominal)±10.0 (max)±30.0 LSB

    Your results are more than the nominal but well within the guaranteed worst case error.

    Robert

  • Robert Adsett said:
    Your results are more than the nominal but well within the guaranteed worst case error

    Actually, I double checked your original post, it's not a 20 count offset, it's +/- 10 count.  That's well within the nominal TUE.

    Robert

  • Good catch Robert. I Missed it by a mile

    Regards
    Amit
  • Thank you very much, Robert. You've been most helpful.

      That was excellently replied (plus, the "error budget? What's an error budget?" tag was well-deserved... hehe).

    I created the post because the errors in the readings were affecting my system´s performance. I expected a 0.5% error, but was getting something 4 times bigger. 

    Based on your reply, (i.e, being certain that I was well-within the nominal values), I was able to find  the cause. I had an error on an input circuit (mistaken Zenner Diode) which severely limited my dynamic range. Obsviously, 20 counts in 4096 aren't the same as 20 counts in 900 samples. 

    It is solved now. I'm satisfied with the results. Thanks again, Robert and Amit, for your assistance.

    Kind Regards.

    Martín 

  • I am glad you fixed a problem, but you should note that 0.5% is better than specified for the A/D alone. You have to add your signal conditioning errors to that.

    Not sure what you are suggesting in your 20 counts in 900 samples remark.

    Robert