# Best reference voltage

Hi,

I like to build a solution which need measurement of voltages up to 50V. So I am thinking about which external reference voltage is the best. Is there a diffrence in between 2,5V to 4,096V? Or is this the same without that I have to reconfigure the voltage dividers?

Cheers,
Nils

What Arduino board are you using? Where is the external reference coming from?

Any voltage will do as long as it's stable, and higher than the highest voltage you get out of the voltage divider of the 50V you're trying to measure.

I for one would simply use the 1.1V internal reference, and a 1:50 voltage divider, e.g. 4k7 + 240k or 10k + 470k.

Perfect, then I will use an LM4040 c25ilpr-pmic as it is available at my local shop with 2,5V.

For me the internal reference is not accurate for measuring that large voltages with 5%.

With 50V it could fluctuating with a size of 2,5V (according the data sheets).

Cheers,
Nils

You're misreading the data sheet.

The internal reference has a 10% tolerance meaning the actual voltage is 1.1V +/-10%, but the actual voltage you get is very stable. You just have to calibrate it once using a known input voltage.

Typically your calibration process will generate a correction factor which you apply to the nominal 1.1v reference to get the actual voltage.

You either store that in EEPROM or hard code it inside the program.

Ok, is this also the case for the other voltages? I read everywhere that it is better to use an external reference. And is it also the case if the input voltage could fluctuate a little?

Default Aref (5volt supply) is not stable enough to be used as reference for voltage measurements.
The supply can vary quite a lot, depending on how you power the Arduino, and what else is using it's power.

An external reference is wasted on the 10-bit A/D of an Arduino.
Just use the internal 1.1volt Aref, and calibrate the end result.

Do what wvmarle said in post#2.
A voltage divider to 1volt, with 1.1volt Aref enabled in setup().
470k between 50volt and pin, and 10k between pin and ground.
I would also add a 100n ceramic cap from pin to ground for stability.
Test sketch attached.
Leo..

``````void setup() {
analogReference(INTERNAL); // 1.1volt Aref
Serial.begin(9600);
}

void loop() {
Serial.println (analogRead(A0) * 0.05039, 1); // calibrate by changing the last digit(s) of 0.05xxx
delay(500);
}
``````

Can I use this for the other internal voltage references also? The ATmega4809 has some more available?

Yes, but the voltage divider ratio, the call for Aref in setup(), and the multiplication factor will all be different.