voltmeter 0-5 volt

I have set up a voltage divider across a 5volt supply. With a voltage input of 2.5v to an analog pin, the analogread value is 780 give or take 3 due to fluctuation. I would expect around 511 for a voltage input of 2.5v.

I need to measure accurately to one decimal point if possible, but it seems that the ADC in the AT chip is not very precise. Is this true?

I am having difficulty coming up with code to accurately measure voltage at an analog input. Any ideas? I am googled out.

Thanks! Duane

What voltage does a multimeter register when connected to the voltage divider input to the arduino input pin, and at the same time what is the voltage on the arduino +5v pin?

I have 5 volts at the +5v pin and 2.5v from the voltage divider which is 2 10k resistors ( tried different values) across a separate 5v power supply.

I just can’t seem to get a consistent analogread value that correlates with the reading on a multimeter. I have tried other chips and other analog pins.

I have also tried using the same power supply for both the Arduino and signal.

Assuming the voltages you state are multimeter measured (not just calculated or assumed), then you might try a capacitor across the voltage divider input to the analog pin and ground to help filter possible noise on the signal line. The arduino and signal source also need a common ground if there isn't one.

I am actually wanting to measure 3-12 volts. I am using 0-5 volts just to try and get familiar with the functionality of the Arduino for this purpose.

I will have to try the capacitor thing. The readings are consistent on all the analog pins. and I have tried different chips.

I guess my real concern is that I would think a voltage of 2.5v should produce 511 from an analogread command.

If I use the map function, I get 3 volts for the 2.5 but the map command is working as integer, so I can't get the decimal point precision either.

I am starting to believe that it has something to do with the impedence issue as I will be measuring voltage of RC receiver batteries using 2 10ohm resistors as a voltage divider and load for the battery.

I only have a couple of multimeters and expanded scale voltmeters. The 10-20 ohm resistors are typically used for load testing RC receiver batteries. The batteries being tested will typically be between 1000mah and 2100mah. Voltage readings are consistent with the different voltmeters, just can't get the arduino to read the voltage correctly. Even an lm3914 display circuit that is calibrated for voltage monitoring is pretty accurate.

If you plug your numbers into the ADC calculation then you either have 6.5 volts as your Vref (probably not since you would probably damage the chip) or your voltage divider is only measuring 3.8 volts.

When using the DEFAULT analogReference the supply voltage will fluctuate a little and will not be exactly 5 volts so if you're looking for precision and more stability you'd probably be better off using the INTERNAL reference (1.1v) and adjust the voltage divider to keep the voltage in that range.

I will give the reference idea a try. Probably won't be working on this project anymore this week, but I will get back on it. It is just something I am toying around with.