1

what is the analog reference, I know that it can be used as a voltage reference, but not exactly what it is all about please someone help.

3

It is the reference voltage against which all other analog voltages (analog inputs) are measured against.

By default it is the same as the chip supply voltage (5V on most Arduino boards), so the analog inputs can measure between 0 and 5V.

If you connect the AREF pin to a lower voltage, say to the 3.3V pin (for convenience) and set the analog reference to EXTERNAL, you can then measure between 0 and 3.3V.

This is good if you are measuring a smaller voltage and want to get as much resolution in the analog reading. If you leave it at 5V and are measuring only up to, say, 3.3V, you're wasting all the analog reading values between 3.3V and 5V that could go to getting you more sensitivity.

  • When the EXTERNAL is not selected, the first analogWrite selects the internal voltage reference. That voltage can be measured at the AREF pin with a multimeter. The Arduino Uno has inside the chip a voltage reference of 1.1V, that can be useful when the 5V is not exactly 5.0V, for example when the Uno is powered via the usb cable. Reference: arduino.cc/en/Reference/AnalogReference – Jot Jul 4 '17 at 17:59
  • @Jot You mean analogRead, not analogWrite ... – Majenko Jul 4 '17 at 19:01
  • Oops, sorry, yes I ment analogRead. – Jot Jul 4 '17 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.