29828Views8Replies

# what is the AREF pin on the arduino? Answered

i have been wondering what the AREF pin on the arduino is
all i know is that the A in AREF stands for analog
thanks

PS. sorry for the led in the picture

Tags:

The forums are retiring in 2021 and are now closed for new topics and comments.

aRef defaults to 5v to compare incoming values based on an internal regulator. It compares them and outputs the ratio as a 10-bit value (1024 increments) where 5v input would be 1024 and 0v would be 0.

Say you have a sensor that only ever outputs from 2-3 volts. That means you would only ever see an analog reading of 1024/5 (1 of the 5 volts).==204 out of 1024. That's a resolution of 5v/1024 = 0.00488v

To increase the resolution of that measurement, the microcontroller can take a reference voltage, usually supplied by a 'voltage divider' (search it) to make the sample area smaller, and the resolution increases. Say you feed it a 3v aRef, you get 3/1024 = 0.00293v....that's 40ish% more precise without using a more precise sensor.

Say with both of the above examples you were using a thermometer that output 2v for 0 degrees C and 3v for 100 degreesC
at 5v reference the precision would be 204.9 steps, or .488 degrees per step
at 3v reference the precision would be 341.3 steps, or .293 degrees per step

@frollard

Excellent explanation but I have a small add to it:

a 10-bit value can represent 1024 different values but, if the first value is 0 then the last is 1023 not 1024. So, for 0V your ADC reading would be 0 but for 5V it would be 1023.

thank you so mutch it is so use full

why is the aref connected to 5V

http://www.jameco.com/jameco/workshop/jamecobuilds/arduinocircuit.html

I accidently plugged the LED into the aref instead of the GND.

Will anything happen to the board??

Hi! But what if I needed 9v calibration for just 1 Analog pin and 5V for the others?

Your means to say that aref is just to take calibration of a sensor work on low voltages like 3 to 2 volts and to make the calibrated or digital data precise we use voltage reference because the arduino board is generally of 5v Ami correct please say I just understand this about aref.