AREF internal reference, and absolute max ratings

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

(This is mostly a heads-up. I did post design change inspection on a high volume product and found something that made me uneasy)

I had to decide on a decoupling capacitor on AREF, and 1.5uF seemed to be a reasonable initial choice; Then I put a scope on it. When the ATMega16 turns on the internal 2.5V reference it looks like this (I'm using 10x probes the scope doesn't recognize):

Now some basic math: 2V/50us * 1.5uF = 60mA.
Thus, M16 actually exceeds the absolute maximum ratings for the AREF pin when the code turns on internal reference.

When I reduce the capacitor to 220nF the current remains in excess of absolute maximum ratings, only the exposure time drops to 9us.

If one is silly enough to have 100 ohm in series with AVCC for filtering it looks like this instead:
Here AVCC hangs in the internal protection diodes between AVCC and VCC, drawing ~40mA. Not pretty.

So:
Beware of decoupling AREF, and if your power supply can't provide 100mA extra, provide 20x more VCC decoupling than AREF decoupling.

I wonder if the newer devices are even worse? And has anyone else observed this?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Somehow, this does not seem surprising.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you look at it as an equivalent time constance circuit (T = RC) and solve for R you get 33.3333 ohms (using your 50 us value as the time). This bears out I = E/R or 2 / 33.3333 = 60 ma. However, this is actually a charge applied over time and the apparent resistance from the capacitor gets smaller as the charge increases. Given that the reference voltage attempts to maintain a steady voltage, at full charge the capacitor would theoretically only draw current because of its leakage or the self discharge rate of the capacitor (ignoring any AC noise effects). If you measured the actual initial instantaneous current flowing into the capacitor, the initial inrush in the first microsecond probably exceeds or wants to exceed 60 ma. At this initial point it behaves more like a short circuit. The instantaneous current flow will fall off rapidly as the capacitor charges.

However, your scope display looks more like a linear charge transfer with a fairly constant delta V and not a theoretical capacitor charge curve with a more varied delta V. The AVR AREF pin could be current limiting the capacitor charge rate? The scope has not gathered enough information or perhaps not displayed it well enough to tell what is really happening on the AREF pin with respect to current flow. I think this math is too simple to explain how this pin actually behaves or at least reconcile it with the scope waveform.

However, common sense may suggest the AVcc pin should make one of its bypass capacitors a somewhat larger value than the AREF capacitor, to help act as a local current reservoir for charging the AREF pin capacitor.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The mega8 datasheet says that Vref is a high impedance source. Electrical characteristics gives Rref as 32K Ohm so presumably a capacitor of any size tied to the Vref pin will take a long time to charge when switching reference voltages. The internal circuit diagram shows the Vref pin connects to either the bandgap voltage or AVcc through a FET and they tell you not to connect and external voltage to the Vref pin and use one of the internal voltage sources. Since the suggested circuit for connecting AVcc to Vcc is with a 100nf capacitor to ground, the capacitor on the Vref pin should be smaller than that according to Mike.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have given up on the old single 100 nf capacitor approach a long time ago. This is why I suggested at least one bypass capacitor on the AVcc pin be larger value than the AREF capacitor.

I use at least two capacitors of different values in parallel, with the smallest value being as close as practical to the device pins and the larger value right behind it on all the device positive power pins. The smaller capacitor has lower internal inductance and the smallest practical PC trace inductance path to the pins it is bypassing. This overall lower inductance promotes improved high frequency bypassing. The larger capacitor handles more current and should also be very close to limit the physical length of its current loop path.

For a tiny glimpse of this black art :), look at the AT90CAN32/64/128 data sheet section 27 Decoupling Capacitors. This is a very simplified approach to using multiple parallel bypass capacitors. It gets allot more complicated than what the data sheet covers and there is some controversy about the effects of self resonance making things worse or better.

I am not recommending using an AREF capacitor smaller than 100 nf (as in limited by the AVcc bypass value). I would increase the value of one of the AVcc bypass capacitors. But, this is one of those so called “common sense” suggestions that may or may not work out when actually testing for noise compliance.

Still, the scope display does not look like a 32 K ohm source or like any simple resistance related time constance charge curve.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Mike:
It is a constant-current charge. The output fet inside the AVR goes into the saturation region, and thus isn't acting like a resistor. If the capacitor was charging to 5V it would be a linear ramp up to around 3V and then continue with an RC characteristic.

No, it certainly doesn't behave like a weak driver.

magno_grail:
The 32k specification is the input impedance, useful to know when using an external reference. It says nothing about the internal reference output impedance.

Jim:
No, I had just expected a smaller figure, one that, by design, didn't go into "Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device" territory.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Indeed something to keep in mind. I didn't expect the current to be 60 mA :( Atmel mentions in the datasheets that a "passive switch" is used in the AVR to connect Vref to AVCC. That "passive switch" has a pretty low impedandance it seems.

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does this only occur on power up or also when changing Vref from AVcc to the internal bandgap voltage? Power up is not a problem, but I had planed upon using the analog comparator with the internal bandgap reference to check power supply voltage, the switching to AVcc and the analog/digital converter to measure sensor values. The datasheet says to throw out the first value but from this it looks as though the output can be erroneous for longer than that.
Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It occurs on change.
If you plan on switching often, I'd recommend not having a capacitor on AREF.

Kasper