Current that AREF can drive?

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

Hi!

I have just registered here, so greetings to y'all! In my spare time, I've been fiddling around with AVRs for quite some time now, and in a recent project an unused pin smiled back at me while all the other pins had already been assigned: the AREF on an AtMega16.

I don't use the A/D converter in this project and according to he docs, the analog reference, even if generated internally, is supplied to this pin. So basically, with the right config, I can switch the AREF pin to 0V (chip programmed to use external AREF) or to VCC (AREF = AVCC selected) etc.

The question is: how much current may I suck from this pin? The normal outputs can drive an LED, so 20mA are not problem. But the AREF pin? Kind of strange, I know, but has anyone done this? I guess it is common to drive a sensor from this pin, no? If the internal 2,56V reference is selected? So why not drive an LED? Even with a transistor that switches my LED, I would be pleased, because it would be a solution.

Does anyone have some experience with this idea?

Best regards!

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

Quote:

So basically, with the right config, I can switch the AREF pin to 0V (chip programmed to use external AREF) or to VCC (AREF = AVCC selected) etc.

No, you will float the pin if configured to use external AREF.

Quote:

The question is: how much current may I suck from this pin?

Very little.
Quote:

I guess it is common to drive a sensor from this pin, no?

Never.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

There were discussions some time ago about adding a small FET to the AREF pin to do what you want to do but I don't remember anyone actually doing it, maybe they did it and kept quite. :-)

Please try it and let us know.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

theusch wrote:
Quote:

So basically, with the right config, I can switch the AREF pin to 0V (chip programmed to use external AREF) or to VCC (AREF = AVCC selected) etc.

No, you will float the pin if configured to use external AREF.

Ok, of course. With an external pull-down, if could become 0V. :-) Not floating, still the switching would work with a transistor.

Quote:

Quote:

The question is: how much current may I suck from this pin?

Very little.

Do you know a rough number? With a transistor in front of my LED, I could easily go below 0.1mA.

Apart from clearly being a conceptual abuse of this pin, is there a technical reason I should not do this? I mean, would I be running the chip outside its specifications so it could be damaged?

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

Welcome to the Forum.

The main reason Aref is brought out on a pin is so that one can put a cap to ground on that pin for additional Aref filtering.

It is not intended to be used as a digital I/O.

If you upload a schematic of your project you may get some suggestions on pin usage which could free up a pin or two for you.

To do so, export your schematic to a jpg file.

After typing your reply, hit the "Preview" button, instead of the "Submit" button, and you will see the boxes to browse to your image file and attach it.

JC

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

Quote:

Do you know a rough number? With a transistor in front of my LED, I could easily go below 0.1mA.

How much work have >>you<< done? It is >>your<< project, after all. When you hook up a pot or a decade resistor box, how much does the voltage drop when you apply your desired load?

Are there differences if you use a modern AVR model? Probably. Are these differences beneficial to your needs? Perhaps.

As mentioned, there might be other ways to gain "one more pin".

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Quote:
With a transistor in front of my LED, I could easily go below 0.1mA.
..or a "small FET" like the 2N7002..the pulldown resistor would be the only current user. 100K or maybe 1M depending on how fast the switching needs to be?

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

theusch wrote:

As mentioned, there might be other ways to gain "one more pin".

Of course there might. I was just wondering. Just like as a child I was wondering how much voltage an ecap could really take. (That would be much less if AC is applied.) Today, though, I try not to break things when I am wondering, hence the question about a rough estimate of the current.

So I think I'll give the FET a try.

Thanks!

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

Quote:

Of course there might. I was just wondering.

Quote:

Today, though, I try not to break things when I am wondering, hence the question about a rough estimate of the current.


Quote:

When you hook up a pot or a decade resistor box, how much does the voltage drop when you apply your desired load?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

A FET is a poor choice because of the large, and unpredictable voltage difference between gate and source.

The common desire is to drive a sensor, such as a load cell, from the reference to provide ratiometric operation. To do this, you would use an op-amp in a unity gain non-inverting configuration. Then, you would have only the op-amp input offset voltage as a (nearly) constant difference, This should be on the order of a few millivolts, or less, depending on the op-amp. And, the op-amp would load the reference very little (bias current, only, typically well less than 1uA for a "quality" op-amp).

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

i have connected 500k to the aref and the voltage drop is only 40mv.probably a 100k resistor in series with a high brigness led could work too.A low voltage power mosfet (<100v) should not be a problem if you don't use it to drive a inductive load or high voltages.4 volts is enought for most low voltage mosfets,asuming that drain is the output.

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

erratum17 wrote:
...an unused pin smiled back at me while all the other pins had already been assigned
Gimme your schematics and i'll givya that extra pin :lol:

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.