# How can there be not enough current?

I am new to the Arduino world. I have a question regarding current that the Arduino outputs over its 5V port. Why is the current in the Arduino too weak for current hungry circuit when the only thing that changes in this equation `V=IR` is the current itself.

For instance, the voltage in an Arduino is restricted to 5 volts. Assuming that the resistance of the current stays the same, shouldn't the current also increase (following Ohm's law) over its 5V port? More specifically, I am talking about powering ESP8266 with an Arduino.

• Are you talking about the microcontrollers pins or the 5V power point, the reason why the later would be restricted would be because of the type of regulator not being designed for current hungry applications. – RSM Mar 16 '16 at 6:26
• When I enumerate my Arduino using USB I see this: `MaxPower 100mA` - so it is only requesting 100 mA from the USB port. Can you clarify what you mean by: `Assuming that the resistance of the current stays the same ...` – Nick Gammon Mar 16 '16 at 9:09
• `Why is the current in the arduino too weak for current hungry circuit ...` there isn't "current in the Arduino" in the first place. – Nick Gammon Mar 16 '16 at 10:43

## 2 Answers

The problem is not that "there is not enough current", but that you can't dissipate enough power.

Let's assume you are powering the board from an external 12V supply. Now, the 5V are obtained from 12V with a resistive regulator: this means that the regulator (see this image if you are interested in knowing what component it is) simply behaves like a variable resistor, dissipating the power in excess. Now, let's assume you want to draw 4A from the 5V rail, since you want to turn on a lot of LEDs and other stuff. Since P=VI, the regulator (that very little component) has to dissipate (12V-5V)*4A = almost 30W. This means that it becomes a little heater and.. Puff! it breaks.

Now, 4A is a really high current, but that regulator can withstand very little power dissipations. According to the datasheet, and estimating a 1cm x 2cm heatsing under it, we can estimate a 25 K/W thermal resistance, which means that each watt you dissipate raises the internal temperature by 25K (=25°C). You can't go beyond 150°C without damaging the component, which means that if your room is at 25°C you can dissipate AT MOST 5W. In practice, never go beyond 3W. Anyway even 5W mean that, at 12V, you can't get more than 5W/7V=0.7A.

By the way, the regulator is rated 0.8A, so you should never go beyond that value in any case.

Now, this was the external regulator. As for the usb, you can't get more than 500mA from that power supply. That's written in the specs. For this reason, a 500mA fuse is on that rail, so going beyond 500mA will blow that one, interrupting your power. Well, that's a self-healing fuse, so after some time (maybe hours?) it will operate again, but.. Don't try that.

In the end, the digital pin current. The atmega datasheet says that

1. The absolute maximum current per I/O Pin is 40.0mA
2. The absolute maximum current inside VCC and GND Pins is 200.0mA

This means that from each single pin you can get at most 40mA (but I suggest you never go beyond 20mA), and the sum of all the currents (and the internal peripherals) should never exceed 200mA. So if you need to power 2 leds, you can give each of them 20mA, if you need to power 15 of them you can't (you are limited to, let's say, 10mA). If you need more, use transistors to separate the current paths.

• More than likely, the reason for the 20ma/40ma safe/absolute limits per pin is not a current cutoff, but as your first sentence states, the inability to dissipate enough power - specifically, heat - to exceed them without eventual damage. They probably would pass more than 40ma, briefly, but fail, doing so. – JRobert Mar 16 '16 at 12:00
• The per pin limits are of course due to the thermal design of the IC. Probably because of the wire bonding diameter, or the IC traces width, or the parasite resistor, or... Whatever, the Atmel characterized the IC and stated that you should not exceed it, otherwise you COULD damage it. Of course, maybe getting 10A for 1ps can leave you with a sane IC, but.. Hey, no guarantee ;) – frarugi87 Mar 16 '16 at 12:27
• Could you explain how you would use a transistor to separate the current path? I have tested some things with PNP and NPN transistors but I did not know you could use that to separate the current path. I just used them as logic gates. – steven Mar 16 '16 at 18:14
• @steven well, if you attach an NPN base to an arduino output through a resistor (usually in the range 10k-47k), emitter to ground and the load to the collector you just separated the two current paths, since now the load discharges through the NPN instead of the arduino. So.. using an NPN as switch actually "separates" them. Personally I tend to prefer nMOSs instead of NPN (and pMOS instead of PNP) because they behave more "ideally" in my mind ;) – frarugi87 Mar 17 '16 at 18:23

A very simple answer: The Arduino is limited to an absolute 40mA per pin, because within the controller chip (ATMega328 usually) the path the current follows is very small. More current can destroy the tiny transistors in the chip. Best case, you burn out that pin.

If you have a problem that requires more than 40mA (and really, as other posters point out, 20mA!) you should be using a transistor, mosfet or relay controlled by the Arduino, rather than directly power the end device.