VernierST / arduino

Project sketches using Vernier Sensors with Arduino. The Vernier Library is used where appropriate. Please see VernierLib for additional sketches.
https://www.vernier.com/arduino
Other
28 stars 21 forks source link

2^N - 1 quantization steps in ADC #1

Closed bri-huang closed 9 years ago

bri-huang commented 10 years ago

Your code uses 1024 instead of 1023 for converting the raw ADC value to a resistance of the thermistor. I'm pretty sure that the number of quantization steps is 1023 (2^N - 1) for the ADC. The Arduino reference for the AnalogRead() function shows that the resolution is = 5V / 1024, but I don't think that's correct.

http://en.wikipedia.org/wiki/Analog-to-digital_converter#Resolution

It's a minor difference in accuracy, but I think we should be consistant. I'm working up documentation for our Vernier Shield. I hope to have some good examples ready this week.

2-9-2014 5-58-05 pm

Smythics commented 9 years ago

Thanks Brian! We took care of this. TS