I have a 3 color LED connected to my arduino and when I measured the total current being drawn it was 60mA. I also read in the spec sheet in the wiki that the max safe current draw from any pin was 40mA. I was wondering how do I get more then 40mA to my LED from my Arduino besides using an external power supply. I saw someone say on the forums that you can get up to 300mA from the 5v+ pin but I couldn't find anyone else to back that up.
I saw someone say on the forums that you can get up to 300mA from the 5v+ pin but I couldn't find anyone else to back that up.
Well the Arduino can be powered from two sources as designed, the USB connector or the external power connector. While in USB power mode the hard max limit is 500ma and while under external power that uses the on board +5vdc regulator the limit is more determined by the heat dissapation of that same regulator which is determined by the specific voltage value on the external power connector, but 300ma should certainly be OK for either power source.
However another 'ugly' limit is the amount of current that the I/O pins can handle both individually and the total I/O current consumption of all the I/O pins together. 200ma is a total limit and 40ma is an individual maximum limit (best to run I/O pins around 20ma max).
So the 200ma for all output pins is the limit you are mostly likely up against.
Wow thanks for the quick reply! So just to clarify so that I don't burn out my poor little Arduino :-/ when using USB or 12v from plug I should keep 300mA or under but I can go a little higher with USB (if I understood correctly thats because my computer supplied the amperage straight and with the plug it does it on board the Arduino) and the I/O pins can sink/source max 40mA but should be kept at 20mA to be safe but cannot be more then 200mA altogether for the I/O pins. I assume that is because the I/O pins are connected directly to the IC and the 5v+ is run separate from the I/C so its more a matter of what the Arduino line in connections can handle. So in conclusion I'm completely fine running my LED sucking 60mA from the 5v+ pin.
So in conclusion I'm completely fine running my LED sucking 60mA from the 5v+ pin.
Maybe, it depends on what is sinking that current on the other end of the led. If it's just wired to a Arduino shield ground pin, it's fine. The 200 ma chip max has to do (among other things) with the bonding wires for the +5vdc and ground inside the chip package.
Well right now I have it sinking to ground, but since it's a full color LED I have 1 anode and 3 cathode. With the resistors I'm using it's about 20mA per cathode which is fine to sink into the I/O pins which is what I plan to do. When I did the initial calculations for resistors I made sure each pin didn't run more then 20/25 because I was aware of the 40mA limit but I forgot about kirchoff's until i stuck a DMM in there to meausre doh! And I just took my intro to engineering class last semester!
There is no need to connect both ends of the LED to the arduino. Connecting the anode to +5 and the cathodes (through a resistor) to an output pin is fine. The 40mA limit applies equally to sourcing and sinking.