# Uno Reference Voltage of 1.1v

Hello, I am told the Reference Voltage of 1.1v exists on the UNO, but can someone please tell me which pin I need to connect my multi meter to, to read it.

thanks

http://arduino.cc/forum/index.php/topic,38119.msg282514.html#msg282514

[/quote]

Perfect, thank you. 1.071v

Follow up question: if my voltage is 1.071, and the system is expecting 1.1, does that mean I can hook up the Positive of my battery power source to A1, read the value, and get 97.36363636363636% of that value as the current voltage in my battery source?

Or would I need to get 102.7077497665733% of it, to get the current battery source voltage.

2.7% is a fair amount to be out. Aside from the above example, where else would you use a value like this? I have a triply axis gyro/accel/temp in my project (connected to A4 and A5 - https://www.sparkfun.com/products/11028) does that mean I should expect my results there are 2.7% out also?

Or is it even more complex than that, and I have to apply the 2.7% to the current battery volt. Check that against 5v (or 3.3v), and use that new ratio or 'something' against my values based on if my module is using 3.3v or 5v source from the arduino.

Its important to read the spec sheet for the Atmega328 when looking at the internal voltage referance specs. The 1.1 volt referance can vary anywhere between 1.0 to 1.2 volts, which is 20% variation. Its not a stabilised voltage referance. If you want a stabilised referance voltage for things like calibrating voltmeters, then you need something like this. http://www.analog.com/en/special-linear-functions/voltage-references/adr4525/products/product.html Voltage guaranteed to be stable within 0.02%. They aint cheap though.

mauried: Its not a stabilised voltage referance.

You are not reading the specifications correctly. The variation is due to manufacturing differences.

mauried: Its important to read the spec sheet for the Atmega328 when looking at the internal voltage referance specs. The 1.1 volt referance can vary anywhere between 1.0 to 1.2 volts, which is 20% variation. Its not a stabilised voltage referance. If you want a stabilised referance voltage for things like calibrating voltmeters, then you need something like this. http://www.analog.com/en/special-linear-functions/voltage-references/adr4525/products/product.html Voltage guaranteed to be stable within 0.02%. They aint cheap though.

I'm not sure I can agree with you that the internal voltage reference is not a stabilized voltage reference. There can be device to device variation for the nominal 1.1vdc band-gap reference, but for any specific chip it will be a stable voltage reference that will be somewhere within that stated range. And once one does actually measure the specific bandgap voltage of their specific chip then steps can be developed a calibration factor one might apply to ADC readings.

Lefty

gggggggg:
…hook up the Positive of my battery power source to A1, read the value, and get 97.36363636363636% of that value as the current voltage in my battery source?

Your “battery power source” has a voltage less than 1.071?

gggggggg: ...hook up the Positive of my battery power source to A1, read the value, and get 97.36363636363636% of that value as the current voltage in my battery source?

Your "battery power source" has a voltage less than 1.071? [/quote]

No my source is ~5v. My reference voltage is 1.071v

The spec sheet is here. http://www.atmel.com/Images/doc8161.pdf

Vint Internal Voltage Ref Min 1.0 Typical 1.1 Max 1.2 Seems pretty clear to me.

mauried: The spec sheet is here. ... Seems pretty clear to me.

In that case you should have no problem explaining when the internal reference would be 1.0 volts and when it would be 1.2 volts.

gggggggg: No my source is ~5v. My reference voltage is 1.071v

So you'll be using the technique described in that post? Using the battery voltage as a reference to measure the 1.071V bandgap?

Vint Internal Voltage Ref Min 1.0 Typical 1.1 Max 1.2

Not sure what those Atmel guys were thinking when they designed that sucker.

dhenry:

Vint Internal Voltage Ref Min 1.0 Typical 1.1 Max 1.2

Not sure what those Atmel guys were thinking when they designed that sucker.

Well to me that spec is giving the nominal band-gap voltage allowable range for any specific chip you might obtain, not the stablity spec of the band-gap voltage which is not specified in the datasheet. It's been my first hand observation that the band-gap voltage is very stable, just different nominal values for different chips.

Lefty

retrolefty:

dhenry:

Vint Internal Voltage Ref Min 1.0 Typical 1.1 Max 1.2

Not sure what those Atmel guys were thinking when they designed that sucker.

Well to me that spec is giving the nominal band-gap voltage allowable range for any specific chip you might obtain, not the stablity spec of the band-gap voltage which is not specified in the datasheet. It’s been my first hand observation that the band-gap voltage is very stable, just different nominal values for different chips.

Lefty

It is specified, data sheet page 525, and it is “quite stable”

gggggggg: No my source is ~5v. My reference voltage is 1.071v

So you'll be using the technique described in that post? Using the battery voltage as a reference to measure the 1.071V bandgap? [/quote]

Yes, it seems to be working. The value I am getting off my battery with a multimeter though is 5.28v, but the value I am getting using the second technique in that post is 3.53v (I get 5.0v if I power it off USB). Does that sound right?

Basically, I am trying to accurately log battery level for my project. But as a side, I am trying to make sure my analogue values captured are accurate.

gggggggg: The value I am getting off my battery with a multimeter though is 5.28v, but the value I am getting using the second technique in that post is 3.53v (I get 5.0v if I power it off USB). Does that sound right?

Uh, no. If you're using the correct code / method, you should be getting a value very close to 528. Even if you're using 1.1V for the bandgap voltage you should be getting much much closer to 528 than 353.

Are you planning to power the processor directly from the battery?

How do you have the battery connected?

(I'll have some software questions when I'm in front of the other computer.)

I have 4 x AA batteries connected to the barrel connector. And I have AREF connected to 5v.

Aside from that I am running a SD Logger, so I can see the values.

Here is my code:

``````const long InternalReferenceVoltage = 1071L;  // Change this to the reading from your internal voltage reference

void setup( void )
{
Serial.begin( 115200 );
Serial.println( "\r\n\r\n" );

// REFS1 REFS0          --> 0 0 AREF, Internal Vref turned off
// MUX3 MUX2 MUX1 MUX0  --> 1110 1.1V (VBG)
ADMUX = (0<<REFS1) | (0<<REFS0) | (0<<ADLAR) | (1<<MUX3) | (1<<MUX2) | (1<<MUX1) | (0<<MUX0);
}

void loop( void )
{
int value;

// Start a conversion

// Wait for it to complete

// Scale the value
value = (((InternalReferenceVoltage * 1023L) / ADC) + 5L) / 10L;

Serial.println( value );
delay( 1000 );
}
``````

Here is my output:
~350 is 4 x AA (5.28v on multimeter) connected to Barrel jack. 500 is USB connected from computer.

``````351
358
357
357
356
357
356
356

500
500
500
500
500
500
500
500
500
``````

gggggggg: I have 4 x AA batteries connected to the barrel connector.

With Vcc regulated to 5V, why aren't you: using Vcc as the reference, a voltage divider to get the battery voltage in range (I'd just cut it in half), and measuring that in the plain-ol-analogRead fashion?

The code you are trying to use was meant for a processor running directly from batteries. I don't think it functions correctly the way you are trying to use it (AREF > Vcc).

Time for a sanity check…

value = (((InternalReferenceVoltage * 1024L #) / ADC) + 5L) / 10L;

528 = (((1071 * 1024) / ADC) + 5) / 10
5280 = (((1071 * 1024) / ADC) + 5)
(5280 - 5) = ((1071 * 1024) / ADC)
ADC * (5280 - 5) = (1071 * 1024)
ADC = (1071 * 1024) / (5280 - 5)

The ADC value should be within a reasonable range. Try printing it as well…

``````void loop( void )
{
int value;

// Start a conversion

// Wait for it to complete

// Scale the value
value = (((InternalReferenceVoltage * 1024L) / ADC) + 5L) / 10L;

Serial.println( value );
delay( 1000 );
}
``````

# The correct value is actually 1024.