What happens if AREF exceeds Vcc by a tiny bit? How to raise Vcc (hack the reg)?

If I hook a 12V supply up to my Arduino and then measure the 5V line, I get a fraction under 5V - around 4.96V. It seems to vary a little, depending on what the Arduino's doing. There aren't any huge loads; main thing is an nRF24L01+ transceiver that grabs 100mA-odd for a few milliseconds each second.

That's 1% error, though, which I want to reduce. I thought I'd hook up a precision 5V from a proper voltage reference chip (Analog Devices REF02CPZ).

Two questions:

  • given that my Arduino is powered by less than 5V, that means the AREF pin is going to be higher than Vcc - not enough (I'd think) to hurt it, but will the AREF pin be clamped down to Vcc?
  • if so, I need to bump the voltage from the Arduino's regulator by a bit. I understand you can stick a diode on the ground pin of a linear regulator to raise its output by the diode's voltage drop, so a 0.2V-drop Schottky should be enough, right?

Thoughts?

Assuming you are using an Arduino with the ATmega328p, according to the data sheet AREF may not exceed AVcc (the supply voltage for the ADC) under any circumstances. However, both may slightly exceed Vcc (absolute maximum Vcc+0.3 V). But this requires access to the AVcc pin, which seems unlikely without cutting circuit traces.

You would be better off powering the radio with external power, so that the MCU voltage does not fluctuate so much, or use a lower AREF, for example 4.096 volts. TI makes such a precision regulator.

All pins are clamped to the rails with protection diodes, but they won't conduct
significantly until 0.4V or so outside of the supply range.

The datasheet says that all pins except reset must be limited to GND-0.5V to Vcc+0.5V,
there is no mention of other limits for AREF. AVcc and Vcc are meant to be the same.

Without seeing the transistor-level schematic of the ADC block of the chip I can't
say if the ADC will work with AREF 0.2V higher than AVcc - it might, it might not.

Adding your own schottky protection diode externally is a good idea to prevent any
chance of damage.

Do you need the full 5V? 4.096V references are available...

Boosting the regulator with a schottky may work, its not going to take the chip out of
spec, they are happy to 5.5V, abs max 6V

jremington:
Assuming you are using an Arduino with the ATmega328p, according to the data sheet AREF may not exceed AVcc (the supply voltage for the ADC) under any circumstances.

Can't see any mention of that in the datasheet I have (I've got the 22.5MB datasheet covering
ATmega44 to 328P) - just the 0.5V protection diode limits for all pins except reset - is there another datasheet?

You can also get 4.5V +/-2% references that run from >= 4.75V.
Use that for Aref. LSB will then represent 4.5/1023 = 4.399mV.

I don't really like using VCC for the reference voltage. Subject to noise and spikes, drift over time/temperature, etc.

You can use the internal reference voltage, on most Arduinos it is 1.1V. Much more stable, then just scale inputs accordingly.

The MEGA also has an internal 2.56V reference, in addition to the 1.1V reference. Don't forget to bypass the AREF pin, no matter which source you use. For that matter, AVCC is supposed to have an RC or LC noise isolation circuit, but most Arduinos just wire it direct to VCC. The Freeduino PCB is fairly simple to modify to add this, most others not so much. It'll help just adding a bypass capacitor of 0.1uF (100nF) from AVCC to the closest ground.

Hi, Folks:

Because there seems to be some confusion, for reference, doc8161.pdf from Atmel (the most current datasheet for the ATmega328p) defines the electrical characteristics of the ADC. Table 28.8 on page 323 gives the absolute maximum value for AVcc as Vcc + 0.3 V, and the absolute max value of AREF as AVcc. Other data sheets may be less complete.

Cool - thanks for the ideas and advice.

I think I'm going to go for a lower voltage reference and then scale my inputs down accordingly. Learnt lots, ta :slight_smile:

jremington:
Hi, Folks:

Because there seems to be some confusion, for reference, doc8161.pdf from Atmel (the most current datasheet for the ATmega328p) defines the electrical characteristics of the ADC. Table 28.8 on page 323 gives the absolute maximum value for AVcc as Vcc + 0.3 V, and the absolute max value of AREF as AVcc. Other data sheets may be less complete.

Ah, searching for AREF doesn't find that table - its named Vref rather than Varef

Why not just current-limit the aref input, and let it clamp to the Vcc rail? That will ensure it NEVER gets higher than Vcc / AVcc until something goes wrong badly enough to blow your protection diodes... (By that point, you've got bigger problems.) Doesn't require precision regulators and all that...

SirNickity:
Why not just current-limit the aref input, and let it clamp to the Vcc rail?

Because it must be driven from a low impedance source for stable ADC readings... Low
impedance sources and current limiting resistors don't reconcile!

I'd just assume that the ADC won't work within spec if AREF goes above Avcc, but no
damage is caused till AREF exceeds Avcc or Vcc by ~0.5V... Certainly can't think of any
mechanism of damage in a CMOS circuit other than burning out a protection diode /
inducing latchup / puncturing gate oxide with over-voltage.

MarkT:
Because it must be driven from a low impedance source for stable ADC readings... Low
impedance sources and current limiting resistors don't reconcile!

Uh.. well.... fine! Why else ? :sweat_smile: