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.

Please help - I cannot get stable reading from Tiva 12-bit ADC?

Other Parts Discussed in Thread: TM4C129ENCPDT

Hi,

the chip I am suing is TM4C129ENCPDT.

I am trying to use the ADC ports to sample audio signal. Before I connect real audio signal to the pins, I want to make sure the ADC works fine with DC levels. I am using an external 3V as ADC reference 

What I found is that the ADC result on the DC level is not stable. I trigger the sampling sequence at 4 times per second and  the reading from the ADC would not not stay near at 0, instead it would fluctuate from 0 t0 70.

The same thing happens if I tie the input to 3V. I cannot get steady reading around 4096, the fluctuation is about the same.

I have no experience on this. I know that certain fluctuation is unavoidable, but I am not clear what is normal and what is not normal. 70 looks too high to me. With 70, I am loosing 6-7 bits!

Can anybody help me what I can do to improve this?


Thanks!

  • Tianlei Zhang said:
    Can anybody help me what I can do to improve this?

    Indeed - there are multiple things which you can do:

    • describe your board (we know the MCU) yet not the board.   Is it home-made - if so is it proper?  (vendor has a board design guide - have you complied?)
    • are the input signals you're providing proper?   (i.e. "clean, noise-free", and properly matching the input impedance of your ADC's input)   Much ADC tech detail is w/in MCU manual (ADC chapter) and the manual's rear, "ADC specs" section.  You must read, understand & comply...
    • small cap - placed very close to MCU's ADC input - bypassing to ground often helps.
    • should your MCU enjoy an Analog VDD pin - has such been properly filtered, treated?   (we use ferrite bead, high & low value caps, to "smooth")
    • have you properly routed board VDD & Gnd?   Single point ground along w/ground plane prove helpful. 
    • feeding a signal more "mid-range" than @ extremes (3V3, Gnd) would enable more "signal swing" to reveal - confirming your "fix."

    As often stated - precision ADCs are available from this vendor.   I'd expect (at minimum) the 3 lsb to "bounce" w/any such MCU's ADC.   (any vendor)

    As (most always) - your "unguided post" forces additional time, effort upon hapless helpers - even those here on "official" business...

  • Hello Tianlei,

    And to add to cb1's excellent post: What is the impedance of the Signal conditioning circuit as seen by the ADC?

    Regards
    Amit
  • Tianlei Zhang said:
    With 70, I am loosing 6-7 bits!

    No, not even close. With a noise of 70 counts you have a count range of 4025 noise free. That's about 11.97 bits noise free.

    Robert

  • Also make sure your reference is properly filtered and has sufficient drive at sufficient frequency for the task. I don't have a variant with a reference just the analog supply. You have to keep in mind the frequency requirements on the reference are likely to be quite high compared with your sampling rate.

    And especially take note of cb1 injunction to measure at mid range (with a known good signal). A/Ds and the conditioning circuits feeding them will have gain issues at the rails. You do not want to confuse problem sources.

    And to repeat and emphasize cb1 again. Read and understand the spec sheet. A/Ds are rather more complex than first appears. 12 bit conversion is not the same as noise free is not the same as linear is not the same as accurate.

    Robert
  • To return the kindness of poster Robert - and w/the approval of forum expert/leader Amit - the following (always) bears repeating:

    Your ADC's "deviation" from the "actual, proper" voltage input reflects its accuracy.

    The clustering of such measures speaks to its precision.

  • Thanks for all the kindly replies. I have got good direct to start my experiment.