Shop OBEX P1 Docs P2 Docs Learn Events
Troubles with Sigma-Delta ADC - Page 4 — Parallax Forums

Troubles with Sigma-Delta ADC

124»

Comments

  • labsmokelabsmoke Posts: 38
    edited 2007-10-29 07:18
    rayman:

    I have some trouble sorting out what part of your code that does the analog converstion, its not really the smallest of codes, dont you have something thats not 4000 longs? hehe...
  • RaymanRayman Posts: 14,162
    edited 2007-10-29 09:59
    It's just the "Dual_ADC1.SPIN" object that does the conversion. The rest is just GUI...
  • labsmokelabsmoke Posts: 38
    edited 2007-10-29 14:13
    oh, i see...ok it looks fairly simple, ill give it a try...
  • RaymanRayman Posts: 14,162
    edited 2007-10-29 15:07
    Of course, you should check out the Microphone2VGA example and the counters Appnote, if you haven't already...
  • rjo_rjo_ Posts: 1,825
    edited 2007-10-29 18:51
    I love this thread... I've been in and out, so I haven't had time to really study it... But the flow and the content are beautiful.

    Before I say anything about the content... I would like to empathize with the experts a little. I still remember how it feels to have patients ask me all of the right questions and then come to exactly the wrong conclusion... and then behave as if they were right an I was wrong.

    This thread is related to a brief conversation that I had with deSilva about an MIT Professor who claimed that Ohm's law should no longer be considered to be a law.

    deSilva was correct (of course) in basically saying that laws are abstractions based upon idealized circumstances, which almost never really exist. And that the point of an engineering education was to learn this fact and then learn how to live with it.

    The issue comes home for the amateur the first time he tries to actually do something with the laws he has been studying... and the Resistor/Capacitor circuits are a great way to illustrate the issues.

    I wanted to make a simple Ohm meter. I basically followed the Lab session.... and the data was a complete mess. (I think) because I was using various kinds of resistors... and because obviously with some of the resistors... the more I measured them... the more they heated up... and the more they heated up the more they resisted... and the longer the time to threshold became.

    So, unless you take temperature into account, which I didn't see in any of the formulae (on very brief inspection)... then the formulae will only work if you have a circuit that forces heat to be constant.... THAT"S an opinion... and I am prepared to be wrong.

    Rich
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-29 19:30
    Rich,
    Most of the time, when working with resistors, you assume (and choose your circuit and resistors so) that the current through them is small enough so there's not much self-heating and the resistance is dependent (practically speaking) only on ambient temperature which is presumed to be reasonable (since we normally have to live there). In a sense, the temperature is taken into account in the underlying design so that the circuit operation is minimally dependent on it. In "the old days" when most resistors were 20% tolerance and capacitors were +200/-50% tolerance, you really had to design your circuits to tolerate wide variations in values. Now when most resistors come in 5% values and 1% values don't go for an outrageous premium, you can use other designs that were impractical before.
  • RaymanRayman Posts: 14,162
    edited 2007-10-29 19:43
    Once you've had a few 2W resistors explode in your face, like I have, you become very aware of resistor wattage rating and heating effects...
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-29 19:56
    rjo_,
    There's a real trick to listening to people, understanding how they came to the conclusions they did, particularly accepting their underlying experiences, and reframing their experiences in terms of "how the world really works" whatever that may be at the moment while leaving wiggle room for new (real!) understandings of "how the world really works" that seem to emerge these days almost hourly ... and not looking like a fool in the process.
  • RaymanRayman Posts: 14,162
    edited 2007-10-29 22:40
    rjo_,

    Let me expand a bit...· First, some people (like myself) may fail to mention the need for proper wattage selection of resitors, just because it's second nature for us.

    Second, if you really need more precision, check out the resistors here:

    ·http://www.caddock.com/

    They have laser trimmed resistors and dividers with virtually no thermal, voltage dependence...
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-29 22:58
    As Mike said: Nowadays we can realize designs by high precision parts, formerly impossible. My pet example is Babage's Analytic Engine, wihich was NOT possible to build 200 years ago due to the slopyness of the mechanicists of that time and their insuffient tools....

    Precision resistors are the basis for precision ADCs and DACs.
    A "general" circuit however works differently. This only came to my mind after having viewed 15 minutes of Prof. Levien's lecture RJO_ was refering to. All electronics of the past (and most of the future) only worked because resistors are PTCs by nature. This gives them a negative feed back characteristic in case of current fluctations.

    I doubt that many circuits will ever have worked if we had the bad luck of NTCs only in our toolbox smile.gif
  • Tracy AllenTracy Allen Posts: 6,660
    edited 2007-10-30 17:52
    Integrated DACs and ADCs depend not so much on precision resistor (or capacitor) values per se, but on precision ratios of them that can be most easily obtained by integrated circuit technology.

    These days 0.1% surface mount 0805 and 0603 resistors are available off the shelf at good prices from major distributors. That has been a real boon for making precision analog circuits that don't require trimming, or to reduce the trimming to a minimum. That level of precision is a good bet for something like this sigma-delta circuit, like the thermocouple circuit with offset to zero that Rayman demonstrated.

    There is still a question in my mind about characterization of drift of the Propeller threshold voltage with time and temperature. What effect will that have on precision sigma-delta readings?

    Also available are 5% and better surface mount film capacitors that have excellent characteristics for sample and hold and high frequency analog circuits. And low-K ceramics are built with ever better materials that cram more capacitance into smaller packages. We haven't discussed what type of capacitor would be best for delta-sigma. Intuitively, it should be one with low soakage factor, and low ESR and generally good high frequency characteristics.

    I'm not sure, did we resolve the question of how to choose the capacitor value? I am still not convinced that there is a first order bandwidth restriction introduced by the RC time constants at the input, and still am of the handwaving opinion that the optimum is wide and is mostly dictated by noise considerations.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • RaymanRayman Posts: 14,162
    edited 2007-10-30 18:54
    Tracy Allen said...

    I'm not sure, did we resolve the question of how to choose the capacitor value? I am still not convinced that there is a first order bandwidth restriction introduced by the RC time constants at the input, and still am of the handwaving opinion that the optimum is wide and is mostly dictated by noise considerations.



    · I don't know the answer for C either.· Fortunately, most of the things I'm interested in right now are slow.· For DC signals, it doesn't appear to matter what you use for C...
  • DroneDrone Posts: 433
    edited 2007-12-22 12:24
    Rayman & Slosjo,

    There a pair of nice delta-sigma ADC calculator applets at www.pulsedpower.net, look under Applet Index > Electronics. If anything, they may be useful for checking your component calculations.

    David
  • RaymanRayman Posts: 14,162
    edited 2007-12-22 13:17
    Wait a minute... Hey, that's my Applet! (Actually, that's my website too [noparse]:)[/noparse]
  • DroneDrone Posts: 433
    edited 2007-12-22 13:39
    So right you are Rayman.. I forgot you spawned that gem! Sorry - Daivd
  • deSilvadeSilva Posts: 2,967
    edited 2007-12-22 15:02
    @Drone,
    did you ever wonder why there is no "C" calculated in that applet?
    What Ray posted is the well known situation.

    What we ask ourselfs is, whether the RC combination really acts as a low pass filter to be designed according to aliasing considerations, or whether the high frequency feed-back will shift all that into higher areas of "noise".
    It will do no harm to take "Nyquist conforming" values for C, however experience shows that is does not seem to matter...
Sign In or Register to comment.