user-1: I'm using arduino for the first time and don't really understand what am I suppose to plug to the ADC refernce PIN... or if I even have to use it while plugging analog sensor to the arduino,
thanks!

user16810: Well, I think you should read the manual first before you use (and even perhaps brake it).
Generally speaking, analog reference is a voltage value between 0.00 and 5.00V, which will be used as virtual reference for all the analog inputs, you connect to your arduino board.
About analog reference is on Arduino site:
https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/

user11212: The AREF is a reference voltage input pin. 
The reference voltage is maximum voltage when you measure analog signal.
In other words, you can measure 0V ~ AREF voltage by using ADC port.
Be aware that the minimum voltage of AREF is 1.0V.

user10794: 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.

user13226: The AD converter in the ATMega microcontroller (as used in Arduino) converts an input voltage to a number.
This ADC happens to be 10 bit that means 2^10 states which is 1024.
The number 0 (zero) means 0 Volt input voltage.
The number 1023 means the maximum input voltage.
Since 0 is also a value the scale runs from 0 to 1023 making 1024 values.
The scale is linear so 511 means half of that maximum voltage.
What is this maximum input voltage?
That is the ADC Reference voltage. By default the power supply voltage is used so if you run your Arduino on 5 V, then 1023 = 5 V. But if you run your Arduino on 3.3 V, then 1023 = 3.3 V.
There is also in internal reference of 2.56 V (or 1.1 V depending on your Arduino), if you use that then, you guessed it, 1023 = 2.56 V (or 1.1V).
You might have a very fancy external reference voltage already available and if you want to use that, use the external setting and connect that reference voltage to the AREF pin.
If your analog sensor gives 0 to 5 V and your Arduino is also powered by 5 V then you should use the default setting so that the VCC is used as ADC reference.
If your sensor gives a voltage between 0 and 1 V then you could use the internal reference so that more of the 0 to 1023 range is usable. Giving you get better resolution.

-1: <p>I'm using arduino for the first time and don't really understand what am I suppose to plug to the ADC refernce PIN... or if I even have to use it while plugging analog sensor to the arduino,
thanks!</p>
 16810: <p>Well, I think you should read the manual first before you use (and even perhaps brake it).</p>

<p>Generally speaking, analog reference is a voltage value between 0.00 and 5.00V, which will be used as virtual reference for all the analog inputs, you connect to your arduino board.</p>

<p>About analog reference is on Arduino site:
<a href="https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/" rel="nofollow noreferrer">https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/</a></p>
 11212: <p>The AREF is a reference voltage input pin. <br />
The reference voltage is maximum voltage when you measure analog signal.<br />
In other words, you can measure 0V ~ AREF voltage by using ADC port.<br /><br /></p>

<p>Be aware that the minimum voltage of AREF is 1.0V.<br /></p>
 10794: <p>The default behaviour is for the analog reference to be Vcc which on many Arduinos is 5V. In that case <em>do not</em> connect anything to AREF.</p>

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

<pre><code> analogReference (EXTERNAL);
</code></pre>

<p>I have a <a href="http://www.gammon.com.au/adc" rel="nofollow noreferrer">page about the ADC converter</a> which may help explain, or may be too much detail. :)</p>

<hr>

<blockquote>
  <p>or if I even have to use it while plugging analog sensor to the arduino</p>
</blockquote>

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

<p>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:</p>

<pre><code>float voltage = ((float) rawADC  + 0.5 ) / 1024.0 * Vref;
</code></pre>

<hr>

<p>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.</p>
 13226: <p>The AD converter in the ATMega microcontroller (as used in Arduino) converts an <strong>input voltage</strong> to a <strong>number</strong>.</p>

<p>This ADC happens to be 10 bit that means 2^10 states which is 1024.</p>

<p>The number 0 (zero) means 0 Volt input voltage.</p>

<p>The number 1023 means the <strong>maximum</strong> input voltage.</p>

<p>Since 0 is also a value the scale runs from 0 to 1023 making 1024 values.</p>

<p>The scale is linear so 511 means half of that maximum voltage.</p>

<p><em>What is this maximum input voltage?</em></p>

<p>That is the <strong>ADC Reference voltage</strong>. By default the power supply voltage is used so if you run your Arduino on 5 V, then 1023 = 5 V. But if you run your Arduino on 3.3 V, then 1023 = 3.3 V.</p>

<p>There is also in internal reference of 2.56 V (or 1.1 V depending on your Arduino), if you use that then, you guessed it, 1023 = 2.56 V (or 1.1V).</p>

<p>You might have a very fancy external reference voltage already available and if you want to use that, use the external setting and connect that reference voltage to the AREF pin.</p>

<p>If your analog sensor gives 0 to 5 V and your Arduino is also powered by 5 V then you should use the default setting so that the VCC is used as ADC reference.</p>

<p>If your sensor gives a voltage between 0 and 1 V then you could use the internal reference so that more of the 0 to 1023 range is usable. Giving you get better resolution.</p>
