1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

measuring adc voltage

Discussion in 'Microcontrollers' started by elecLear78, Jun 9, 2017.

  1. elecLear78

    elecLear78 Member

    Joined:
    Jul 16, 2013
    Messages:
    226
    Likes:
    1
    Location:
    india
    This is a general question not specific to micro controller. Is it mandatory that if i am reading adc value i should always take average value?
     
  2. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,228
    Likes:
    641
    Location:
    Derbyshire, UK
    No, but it's probably a good idea - it really depends what you're trying to do though - if you're reading it as fast as possible it's not an option though.
     
  3. elecLear78

    elecLear78 Member

    Joined:
    Jul 16, 2013
    Messages:
    226
    Likes:
    1
    Location:
    india
    But generally we see a difference of around adc count of 10 or sometimes more. I think that is the reason analog electronics is more difficult than digital electronics.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. crutschow

    crutschow Well-Known Member Most Helpful Member

    Joined:
    Mar 14, 2008
    Messages:
    10,592
    Likes:
    477
    Location:
    L.A., USA Zulu -8

    Taking a running average is typically what is done to reduce noise and improve resolution in ADC readings.
     
  6. crutschow

    crutschow Well-Known Member Most Helpful Member

    Joined:
    Mar 14, 2008
    Messages:
    10,592
    Likes:
    477
    Location:
    L.A., USA Zulu -8
    What??
    I fail to see the connection between noise bits in an ADC converter and the difficulty level of analog electronics. :confused:
     
  7. elecLear78

    elecLear78 Member

    Joined:
    Jul 16, 2013
    Messages:
    226
    Likes:
    1
    Location:
    india
    Sorry my mistake wrong statement.
     
  8. Beau Schwabe

    Beau Schwabe New Member

    Joined:
    Jun 4, 2017
    Messages:
    24
    Likes:
    5
    Back to noise and the number of samples .... by taking more samples you increase the signal to noise ratio. Why? because "noise" has a tendency to mathematically cancel it self out, while a true signal within the noise has a tendency to accumulate or re-enforce itself the more samples that are taken. The general formula for an increased signal to noise ratio by ensemble averaging is essentially the square root of the number of samples taken. .... i.e. With TWO samples your signal to noise ratio becomes 1.41 to 1 ... FOUR samples 2:1 .... TEN samples 3.16:1

    I might add in some cases you want to avoid any division i.e. adding two numbers and dividing by 2 to obtain an average of the two numbers. The reason is that this will introduce a compounding error by truncation and you will loose data in the process. If you must only perform the division at the end or for display purposes (human readable feedback) only. Otherwise use an Accumulator to hold ALL of the raw data being sampled.

    Similar techniques can be used to turn the LSB (Least Significant Bit) into fractional bit data that is useful .... You know the annoying bit on the end that bounces from a 1 to a 0 and is never stable that most people just truncate to minimize the fluctuation?..... If it were truly random, that bit would be ON 50% of the time and OFF the other 50% of the time. Any bias or "signal" to the system would persuade that 50/50 percentage one direction or the other. By taking several samples (sometimes hundreds or thousands) you can measure the bias any external influence might be introducing to the LSB. I have used this technique on angular rate sensors to utilize buried data below the noise floor to minimize drift error with pleasing results.
     
    Last edited: Jun 9, 2017
    • Like Like x 2

Share This Page