# Unstable AREF?

**URL:** <https://forum.arduino.cc/t/unstable-aref/233763>\
**Category:** General Electronics\
**Created:** [May 14, 2014, 10:02pm UTC](https://forum.arduino.cc/t/unstable-aref/233763 "2014-05-14T22:02:58Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![JChristensen](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@JChristensen](https://forum.arduino.cc/u/JChristensen)\
**Post date:** [May 14, 2014, 11:35pm UTC](https://forum.arduino.cc/t/unstable-aref/233763/13 "2014-05-14T23:35:45Z")

</div>

> retrolefty:  
> Shame on you, even after you went through the whole mega1284P update process, of posting a sketch that is device specific. What about running it on a mega, micro, etc?

I know, I'm soooo embarrassed 😊

> Here is one I'm always playing with. Wrote it on top of blink just for grins:

Works very nice, on a 328P or on a 1284P. The internal reference voltage does indeed have about a 9% tolerance according to the datasheet. But like a lot of things with these MCUs, I find that they're usually a lot closer than the advertised worst-case scenario. I did a little experiment to compare (see results below), without tweaking the constant in the calculation. If I assume the Fluke meter is correct, then I have a 328P with a very close internal reference voltage, and a 1284P that is not as close, but not too bad either. 2% or 3% error is probably good enough for a lot of battery monitoring applications. Still probably worth checking and maybe calibrating because there are no guarantees.

![Untitled.png](https://europe1.discourse-cdn.com/arduino/original/4X/7/b/b/7bb1674ce36f53706187286c79337a7f6255c54a.png)

---

_[View the full topic](https://forum.arduino.cc/t/unstable-aref/233763)._
