Grumpy_Mike:
Further more when I run the Ultra basic demo and apply 1V to the input and change the resolution I get the following readings for voltage:-
14 bits - 0.2468V
15 bits - 0.493V
16 bits - 0.98665
17 bits and above 0.0V
All with the same input voltage. The only thing I changed was the number in this line:-int bits_of_precision = 16; //must be a value between 10 and 21Also with the full demo on 16 bits I get zero out for a voltage of 0.011V in and anything below.
Edit:
Grumpy Mike, with regards to your faulty values in your 14-bit, 15-bit, and 17-bit and above resolutions, you made a mistake in the application of my library. Please see the following posts for clarification.
Original content:
Grumpy_Mike, with regards to your comment: ("Also with the full demo on 16 bits I get zero out for a voltage of 0.011V in and anything below."), this is a very useful contribution. Thank you. This indicates the limitations of oversampling near the upper and lower bounds. I think this is because near the limits (ex: for 10-bit readings, near 0 and 1023), the noise is constrained on one side. Constraining the noise is a limiting factor on increasing resolution in that area. What I mean by constrained can be described as follows:
Unconstrained noise distribution would be, for example: if the true reading is 500, then that means the mean reading is 500, but there is noise evenly distributed about this value, so the ADC might return 498, 499, 500, 501, 502, at random. This is an even noise distribution, so oversampling can enhance resolution.
**A constrained noise distribution would be, however: ** if the true reading is 0, then that means the avg reading will NOT be 0. This is because the readings (due to noise fluctuations) want to be -2, -1, 0, 1, 2, at random, but they are constrained to 0, 1, 2, and -2 and -1 are not possible. This means that if the true reading is 0, you might actually get a result that says it is, at average, 1 (or if you use a floating point value to take the avg. of many readings, it would at least be skewed to the right [>0], even if the true mean should be 0 if noise were not constrained). This constrained noise distribution prevents oversampling from increasing resolution wherever noise is constrained. So, I would expect that near the upper and lower limits, resolution is either not improved by oversampling, or improved only marginally by oversampling. Also, strange cutoff values like you demonstrated via testing are not surprising, but are rather informative, to help us better understand (and believe) what I describe just above.
So, I thank you very much for your results.