Hi there,
I just tried to measure an analog voltage with my arduino.
I followed this tutorial https://www.arduino.cc/en/Tutorial/ReadAnalogVoltage but instead of
the potentiometer my curcuits consists of a 150 ohm resistor and an LED. The voltage drop across the
LED is approx. 2V. The measurment I get from the arduino is 2.08V , the measurment from the multimeter is 1.92V.
Is this just some inaccuracy or did I do something wrong?
You should also measure the "REF" pin to see what voltage the Arduino as using to compare the 2V voltage against. My guess is the "REF" pin will read less than 5V.
There may be other issues but checking the voltage reference seems like a good place to start looking for the problem.
I typically get 5.05V on USB so the arduino ADC absolute accuracy is 1% off. What kind of multimeter did you use? If it's a $20 meter, then I wouldn't trust its measurement too much. If you have access to a fluke meter, try that one also. Plus, as the LED heats up, it may change resistance so your measurements will be different if you're not reading two measurements simultaneously.
USB voltage could easily be well below 5V - 4.75 is the technical minimum value, real systems can
be lower due various voltage losses and I wouldn't be too surprised for a 5 to 10% error from this.
I will be starting a project using several analog inputs, but haven't played with the boards yet.
DuaneDegn:
You should also measure the "REF" pin to see what voltage the Arduino as using to compare the 2V voltage against. My guess is the "REF" pin will read less than 5V.
There may be other issues but checking the voltage reference seems like a good place to start looking for the problem.
What is a good way of avoiding an unknown REF voltage? Use a regulated power supply for the board?
0.16 difference on 5 V max
= 0.16/5=0.03 is 3 % wrong
as you have two meters with 2% accuracy it is well within limits.
And you first need to calibrate the uno and the meter. to get a good comparison, for now it is very good result.