MCU current out?

Thread Starter

#12

Joined Nov 30, 2010
18,224
I was working on some universal output drivers for MCU's and I wish to know, what is the worst case (lowest) current capability I can expect from a micro controller chip?

Which family? All of them.

And, can MCU's sink current? And how much, worst case?

For a 3.3V chip?
For a 5V chip?
Did I miss any?
I expect they can't output right to the rail under load. How about a criteria of "failure to output the full rail voltage by, say, 1/2 volt"?
 

spinnaker

Joined Oct 29, 2009
7,830
This will be found in the datasheet. You need to first pick a chip. For the microchip mcus I have used around 20 ma @ 5v.
 

Thread Starter

#12

Joined Nov 30, 2010
18,224
We get questions at AAC every week about, "How can I connect an MCU to a relay" or some other similar thing. I'm trying to make a group of UNIVERSAL output drivers for MCUs that I can present to the noobies. I can't look up every datasheet for every MCU in the world.

How about this: Can I reasonably bet that any MCU will output 1 milliamp?
Do MCU's also sink current?
Are they good at outputting the rail voltage or do they always miss by a little bit?
 

takao21203

Joined Apr 28, 2012
3,702
4mA is OK for most.

There are tiny 3.3V relays I have some here for reference.

Some controllers with high-current outputs can drive them.

Yes voltage can go off considerable when you load with 50mA.
So the LEDs get less current. There is a point where it stabilizes.

Atmel controllers should not be shortened they give 70mA and more.

They also may need small resistors at 5V for LEDs.
I measured with a micro Arduino- 60mA for a single LED.
 

Brownout

Joined Jan 10, 2012
2,390
The PIC 18f45k20 I/O's I am using source 3mA at VCC-.7V. They sinc no appreciable current - uA range. I'm interfacing the I/O's via SN7407n I had on hand. It requires only 40uA input current ( good for any uC ever made, I'm sure ) and can sinc 40mA and are up to 30V output voltage tolerant. Those specs should be good enough for a wide variety of applications, relays, LED's, etc. More current requirements can be met by connecting the output of the 7407 to a power FET.
 

ErnieM

Joined Apr 24, 2011
8,377
The PIC 18f45k20 I/O's I am using source 3mA at VCC-.7V. They sinc no appreciable current - uA range.
Untrue. They are specfied to sink up to 8.5 mA with a 0.6V output voltage rise. (See Table 26.9 DC Characteristics: Input/Output Characteristics, PIC18F2XK20/4XK20, parameter D080.)

Thus they will sink over twice the current they source (which sounds appreciable to me).


#12: If I was attempting to design some "universal" buffer I would make it so the input current was extremely minimal or "zero" to a first approximation.
 
Is it worthwhile to suggest some sort of signal isolation between the MCU and the uP? Or are the MCU inputs already isolated from any spikes and nasties you catch from motors? Just a thought.
 

Papabravo

Joined Feb 24, 2006
21,227
We get questions at AAC every week about, "How can I connect an MCU to a relay" or some other similar thing. I'm trying to make a group of UNIVERSAL output drivers for MCUs that I can present to the noobies. I can't look up every datasheet for every MCU in the world.

How about this: Can I reasonably bet that any MCU will output 1 milliamp?
Do MCU's also sink current?
Are they good at outputting the rail voltage or do they always miss by a little bit?
There is no such thing as a universal output driver and your attempt is doomed. Anybody that would use such a circuit without consulting the datasheeet will get as much as they deserve. What do you take us for anyway? Sheesh!

Teach the noobs to fish and they can design their own output drivers.
 

Thread Starter

#12

Joined Nov 30, 2010
18,224
I see we have a candidate for the place Audioguru used to hold.
What can I say? Be careful not to use any of these circuits because they can't be used to provide more current when driven by the output of a microcontroller? Be careful not to show these to beginners and hobbyists because they should figure them out by themselves?
 

Attachments

Last edited:

GetDeviceInfo

Joined Jun 7, 2009
2,196
as a general rule, you'll find sinking capacities substantially higher than those sourced. My guess would be the most universal driver would then have variable, or select-able voltage sourced inputs, which could be sunk by the mcu.
 

russ_hensel

Joined Jan 11, 2009
825
A universal driver, in my opinion, is not a good idea: it will be over engineered for most uses and more expensive and complicated than it should be. Why not do a small family of drivers for some common tasks that are compatible with some common mcu's?
 

takao21203

Joined Apr 28, 2012
3,702
LCX244 could be used. It is even possible to parallel outputs, if you parallel the same inputs.

This is an octal buffer, 2x 4bit

HC543 or F543 is a bi-directional buffer with latch and output enable.
 

Thread Starter

#12

Joined Nov 30, 2010
18,224
A universal driver, in my opinion, is not a good idea: it will be over engineered for most uses and more expensive and complicated than it should be. Why not do a small family of drivers for some common tasks that are compatible with some common mcu's?
That's exactly what I'm doing. See circuits in post #10.
 

Thread Starter

#12

Joined Nov 30, 2010
18,224
Is it worthwhile to suggest some sort of signal isolation between the MCU and the uP? Or are the MCU inputs already isolated from any spikes and nasties you catch from motors? Just a thought.
I actually don't know the difference between an MCU and a uP, or why you would have both of them on the same circuit board. What I do know is that a lot of people want their Arduino, or a PIC, or some other small processor to provide more current than an LED needs. There are (at least) a dozen ways to do this when you consider bipolar, mosfet, inverting, not inverting, open collector, open emitter, etc. Now you have brought up the idea of using an opto-isolator, which I think is an absolute must when driving a 120V or 240V line powered load.

Consider AN-31, the op-amp circuit collection. It goes on for pages and still doesn't have all the possible circuits. As Papabravo said, it's a guaranteed fail, but thousands of people have used it successfully.
 

Attachments

Top