what is the AREF pin on the arduino?

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

PS. sorry for the led in the picture

Picture of what is the AREF pin on the arduino?
sort by: active | newest | oldest
frollard6 years ago
AnalogRead compares a voltage on the analog in pin to 'aref'.

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


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.

thegriffy100 (author)  frollard6 years ago
thank you so mutch it is so use full
loptica6210 months ago

why is the aref connected to 5V


AnjneyM1 year ago

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

Will anything happen to the board??

D4MR1 year ago

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.

caarntedd6 years ago
Analogue reference.