Increasing accuracy of adc input - Page 1
Forum section: electronics / beginners

author: A2
author_rank: Contributor
timestamp: August 13, 2014, 02:30:16 pm
content: 1. I am measuring the resistance to 0.1 intervals. (from 350 ohm to 700ohm)Like I am reading 350.1 , 500.6 etc.But I have to deliver accuracy to two decimal places.2. Is it ok , if I take 256 samples of reading with 0.1 interval, & average them to get second decimal place also.

author: dfmischler
author_rank: Frequent Contributor
timestamp: August 13, 2014, 02:39:43 pm
content: Quote from: A2 on August 13, 2014, 02:30:16 pmNo. If that is all the resolution you have, then quantization noise (errors) will prevent you from generating more information. You will just be making up another meaningless digit out of garbage.

author: DJohn
author_rank: Regular Contributor
timestamp: August 13, 2014, 03:02:32 pm
content: In theory, if you add noise with a small amplitude and zero offset to the input, then averaging will give you higher resolution.In practice, you're already adding noise and bias from all sorts of sources, and you have little control over its properties. Unless you've taken a lot of care on the analogue side, you might as well just make up the extra digit.

author: macboy
author_rank: Super Contributor
timestamp: August 14, 2014, 02:49:12 pm
content: Forget what the above posters are saying.The answer is resoundingly, Yes,oversampling is a legitimate and useful way of increasingresolution(notaccuracy; you confused the terms).Google "oversampling adc increase resolution"and you will find a wealth of information in app notes from major ADC and microcontroller manufacturers.You must have a few LSb of uncorrelated noise, and you need many samples: 100x for 10x improvement, or 10000x for 100x improvement. Also, you need to know understand the basic limitations of your ADC: accuracy, linearity, etc., which will not be improved by this technique.

author: David Hess
author_rank: Super Contributor
timestamp: August 15, 2014, 10:04:16 pm
content: Quote from: macboy on August 14, 2014, 02:49:12 pmThe above point is understated if anything. The resolution will be increased and noise will be lower but the non-linearity, zero error, and gain error will remain the same so accuracy will not be improved.

author: Andreas
author_rank: Super Contributor
timestamp: August 16, 2014, 05:15:22 am
content: Hello,the often overlooked fact is that you need noise which has a"gaussian distribution" (of least 1 LSB) if you want to increase resolution.Otherwise you may get additional unlinearities.With best regardsAndreas

author: ejeffrey
author_rank: Super Contributor
timestamp: August 16, 2014, 05:59:02 am
content: The noise does not have to be Gaussian or white (which are not the same thing). It merely needs to be uncorrelated with the signal and have sufficient variance. It doesn't have to even be noise in any traditional sense: you can add a sinusoid and it will work just as well as long as you watch out for aliasing.

author: coppice
author_rank: Super Contributor
timestamp: August 16, 2014, 06:14:07 am
content: Quote from: Andreas on August 16, 2014, 05:15:22 amIt doesn't need to be Gaussian. In fact, Gaissian noise is not ideal. Its just the usual thing you get in the analogue world. For most purposes the ideal is a triangular probability density noise source, with the peak of the probability at 0.5 bits. When people apply dithering in DSP, where you have total control of the noise source they usually apply this kind of noise.Most unbiased noises sources will dither, although some distributions are much better than others.

author: Flenser
author_rank: Regular Contributor
timestamp: August 19, 2014, 03:52:50 pm
content: QuoteYes, you can use sampling to increase get extra ADC resolution.Yes, taking an average of 256 samples will get you 1 extra decimal place.There are many application notes describing using oversampling to get extra ADC resolution. I found the Atmel note "AVR121: Enhancing ADC resolution by oversampling" easy to understandhttp://www.atmel.com/images/doc8003.pdfThe technique actually uses signal noise to do this and so you must have a minimum amount of noise and the noise should have a particular distribution. Some notes describe deliberately adding noise to the signal you are measuring using op amps, like a triangle wave of the right level. You can also take advantage of any existing noise and the clock on a microcontroller may add enough noise.You need to take 4 raised to the power of N samples to get N extra bits precision. So 4 samples for 1 extra bit (1/2 LSB), 16 samples for 2 extra bits (1/4 LSB), 64 sampls for 3 extra bits (1/8 LSB) and 256 samples for 4 extra bits (1/16 LSB) which you can round to get 1 extra decimal place.

author: Bassman59
author_rank: Super Contributor
timestamp: August 19, 2014, 04:32:46 pm
content: Quote from: macboy on August 14, 2014, 02:49:12 pmYes, this.

author: Rick Law
author_rank: Super Contributor
timestamp: August 20, 2014, 06:14:26 am
content: Hello, Mr. A2:The requirement looks simple, but it isreally a very tall order.I think first have a look at the math is helpful here. You are measuring 350 to 700 ohms, and you need two digits after the decimal. That is a 5 digit result you want/need.699.99 and 700.00 is 0.001428% difference.+- 0.0014% precisionis hard to get.If you offset the ADC's zero point, 350 to 700 at 2 digit decimal is 70000-35000=35000 points. 1/35000 is +- 0.0028%.Now lets look at your ADC and the number of digits:Say you are using a 10bit ADC. Your measurement will be 0 to 1023 which is 3 digit resolution assuming perfect accuracy. To even get intto the 5th digit, you need 14 bits. With 14 bits, you have 0 to 16383. You have 4.1 digits. For value below 16383, you have 5 digits. For values > 16383, you have only 4 digits. Even 16 bit ADC will only get you 65535 and not full 5 digits. If you really needfull 5 digits, you need an ADC of >=17 bits. (If you offset the ADC's zero point, at 35000 points a 16 bit ADC will do for resolution).Resolution does not equal accuracy. Perfect one ADC really doesn’t exist. A reasonably good ADC such as the 16 bit ADS1115 has small errors but too big an error for you: (from TI datasheet) gain error “0.01% typical at 2.0248V(FS) 25C”. 0.01% is very respectable but it is 7 times the error you can accept. (recall from above, 0.01 of 700.00 is .001428%) Typical is 0.01%, but the same line has max error at 0.15% which is really the number one should use to design with.Offset error, gain error, etc, can all be compensated to some extend. Averaging will help with noise, but it will certainly do nothing towards gain error, linearity, etc. as David pointed out below.Quote from: David Hess on August 15, 2014, 10:04:16 pmSo, let say oversampling gives you a 10X improvement in resolution, you are still left holding the bag with gain error, offset error, etc. that you have to compensate out.Remember, most commonly available “good” resistors are 1%. To get a 0.1% resistor is 10x or 100x the price. I can’t even venture to guess how much it would be for a 0.001% resistor. The solder-joint alone will probably mess up a 100ohm resister well beyond 0.001%.So, perhaps a good step to take is first reassess the requirements base on available budget. If 0.01% (700.00 +- 0.07) is needed, prepare to spend big bucks for 0.01% components.If you really need better then 0.0015%, you should just get a 6.5 digit DMM or better.Rick

author: XFDDesign
author_rank: Frequent Contributor
timestamp: August 20, 2014, 02:22:02 pm
content: Nicely done Rick.

author: KerryW
author_rank: Regular Contributor
timestamp: August 20, 2014, 02:40:16 pm
content: Maybe you could generate your own "noise"Set up an 8 bit DAC to output 0 to 255/256 LSB of your A/D. Sum this with your A/D input signal.Use successive approximation to find the tipping point.For example:DAC=0, A/D reads 0x100DAC=0x80, A/D reads 0x100DAC=0x80, A/D reads 0x100DAC=0xC0, A/D reads 0x101DAC=0xA0, A/D reads 0x100DAC=0xA8, A/D reads 0x101...DAC=0xA5, A/D reads 0x100A/D value=0x100.A5You would only need 8 readings instead of 256. Would this work?

author: macboy
author_rank: Super Contributor
timestamp: August 20, 2014, 04:53:01 pm
content: Quote from: KerryW on August 20, 2014, 02:40:16 pmOnly within the limits of the DNL of the ADC and the DAC. DNL specifies the variation in the step size of the ADC, one of the inaccuracies of any ADC (don't assume each step is exactly 1/(2^N) of full-scale!).Tip: some ADC technologies are more inherently linear than others and will give better results with oversampling.