The folks at Little Bird Electronics have a nice tutorial about how and why to use the analog reference input on a microcontroller to improve analog voltage measurements.
Their tutorial focuses on the AREF input for the Arduino, however the technique is applicable for almost every micrcontroller with analog inputs. In fact, we’re doing something similar in the Make It Last build series, by using a fixed 2V reference to have consistent readings while using batteries that are continuously draining.
ADVERTISEMENT