hi ... i have arduino mega 2560 made in china ... How accurate is the analog inputs ?
Well this page indicates that they're Made in Italy so I think if it's made in China it's not really an Arduino Mega 2560.
You could test it yourself though.... get an adjustable, reliable, power supply and put known voltages from 0 to 5 into the analog pins, read the value, and Serial.print(value*5/1023) and compare.
The chips themselves are all made in the same place.
What do you mean by the accuracy, that is a term drowned in caveats in electronics.
The absolute accuracy is +/- 2 least significant bits, but there is also the accuracy of the reference voltage to take into account. That comes from the 5V supplied by the USB or supplied by the regulator if running on an external supply.
The chips themselves are all made in the same place.
Ah, I hadn't really thought of that. I think I kind of assumed somewhere along the line in reading about compatibles and clones, that maybe the chips were fake too, sometimes.
I did a test on mine, and attaching 5V to the analog input, the value I got back from the analogRead() was 1018.
No way could I get 1023. So yeah, maybe 5 LSB's.
There are several good explanations of the various kinds of "accuracy" of A/D conversion on the internet.
But with analog to digital conversion, you are more likely to be affected by other issues ( impedance, capacitance,
cross-talk between multiple analog inputs, variations in the reference.... ) than you are by the absolute
accuracy of the conversion process itself.
analogRead() [of 5V] was 1018.
No way could I get 1023. So yeah, maybe 5 LSB's.
1023 -1018 is 5, which is three bits...
Were you using the 5V of the Arduino itself? Since this was an easy test, I ran it myself, with a jumper between 5V and A5, and 3.3V and A0. I got consistent readings of 1024 and 669 (669 should mean 3.27V, if I did my math right. That seems reasonable, as it's spec'ed to be between 3.0 and 3.6V)
I got consistent readings of 1024
No you got 1023.
oops. Yeah; 1023... Sigh.
thnx ..for all your replies ... i will check it