Skip to main content
Added emphasis.
Source Link
Nick Gammon
  • 38.9k
  • 13
  • 70
  • 126

The default behaviour is for the analog reference to be Vcc which on many Arduinos is 5V. In that case do not connect anything to AREF.

However if you have a precision voltage reference then you can connect that to AREF (and GND) and specify in your sketch, before doing an analogReadbefore doing an analogRead:

 analogReference (EXTERNAL);

I have a page about the ADC converter which may help explain, or may be too much detail. :)


or if I even have to use it while plugging analog sensor to the arduino

Unless you are planning to use some different reference voltage, don't use it at all.

For a 5V Arduino the voltage measured with the default AREF would roughly be 4.88 mV per unit of measurement (ie. 5V / 1024), but more accurately:

float voltage = ((float) rawADC  + 0.5 ) / 1024.0 * Vref;

The voltage you supply to VREF (if you supply any at all) must be between 1.0V and Vcc where Vcc would be 5V for an Arduino Uno.

The default behaviour is for the analog reference to be Vcc which on many Arduinos is 5V. In that case do not connect anything to AREF.

However if you have a precision voltage reference then you can connect that to AREF (and GND) and specify in your sketch, before doing an analogRead:

 analogReference (EXTERNAL);

I have a page about the ADC converter which may help explain, or may be too much detail. :)


or if I even have to use it while plugging analog sensor to the arduino

Unless you are planning to use some different reference voltage, don't use it at all.

For a 5V Arduino the voltage measured with the default AREF would roughly be 4.88 mV per unit of measurement (ie. 5V / 1024), but more accurately:

float voltage = ((float) rawADC  + 0.5 ) / 1024.0 * Vref;

The voltage you supply to VREF (if you supply any at all) must be between 1.0V and Vcc where Vcc would be 5V for an Arduino Uno.

The default behaviour is for the analog reference to be Vcc which on many Arduinos is 5V. In that case do not connect anything to AREF.

However if you have a precision voltage reference then you can connect that to AREF (and GND) and specify in your sketch, before doing an analogRead:

 analogReference (EXTERNAL);

I have a page about the ADC converter which may help explain, or may be too much detail. :)


or if I even have to use it while plugging analog sensor to the arduino

Unless you are planning to use some different reference voltage, don't use it at all.

For a 5V Arduino the voltage measured with the default AREF would roughly be 4.88 mV per unit of measurement (ie. 5V / 1024), but more accurately:

float voltage = ((float) rawADC  + 0.5 ) / 1024.0 * Vref;

The voltage you supply to VREF (if you supply any at all) must be between 1.0V and Vcc where Vcc would be 5V for an Arduino Uno.

Source Link
Nick Gammon
  • 38.9k
  • 13
  • 70
  • 126

The default behaviour is for the analog reference to be Vcc which on many Arduinos is 5V. In that case do not connect anything to AREF.

However if you have a precision voltage reference then you can connect that to AREF (and GND) and specify in your sketch, before doing an analogRead:

 analogReference (EXTERNAL);

I have a page about the ADC converter which may help explain, or may be too much detail. :)


or if I even have to use it while plugging analog sensor to the arduino

Unless you are planning to use some different reference voltage, don't use it at all.

For a 5V Arduino the voltage measured with the default AREF would roughly be 4.88 mV per unit of measurement (ie. 5V / 1024), but more accurately:

float voltage = ((float) rawADC  + 0.5 ) / 1024.0 * Vref;

The voltage you supply to VREF (if you supply any at all) must be between 1.0V and Vcc where Vcc would be 5V for an Arduino Uno.