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.
1 Answer
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– JotCommented Jul 4, 2017 at 17:59
-
-