I've soldered some machine pins to my arduino pro mini, and have placed it on my breadboard, and am getting ready to hook up a 10 led bargraph to it.
The plan is to connect 150 ohm resistors to each of the led's cathodes, and put 20mA through them. (The forward voltage is 2.1v)
It occured to me though that this will put 200mA through my ground pin on the Arduino, which I'll be connecting to the bus on the breadboard so I can get the power over the led's on the other side.
Is that safe for the Arduino? I assume it is. But what's the limit? The arduino, for now, is gonna be powered off USB. So that's gonna limit the total current to 500mA. I plan to hook it up to a battery, but since I want to be able to test on USB, I'll be staying below that.
I should note too that I plan to run more than those 10 leds off the arduino. One project will have 11 leds and a piezo, and the one with the bargraph will have that, plus another five or six led's, all of which may be lit at once. That's what I need to know the maximum for.
I'm guessing the gnd pins just go to the gnd pin on the USB, and not through the microprocessor, so there's no problem, but I can't tell by looking at the circuit.
But what's the limit?
200mA, actually. It's in the "Electrical Specifications" section of the datasheet.
Try increasing your resistors to 220 or so: the difference in perceived brightness will probably not be bad, but the reduced current will bring you under the safe limit.
Alternatively, use a couple of ULN2003s to drive the LEDs: their pinout makes them easy to wire up for bargraphs, and you'll reduce the load on the ATMega to near 0.
Where is this datasheet? Are you referring to one for the atmega chip, or for the pro mini?
Also, am I not supposed to directly connect things between pins and the negative terminal of a battery? Do I always need to connect them to the ground pin on the arduino?
I don't understand why there would be a 200mA limit on the ground pin, when you connect the negative terminal of the battery to one of the ground pins, and presumably it's a direct connection from there to the other ground pins.
I found the bit in the Atmega datasheet on the ground pins, but I'm talking about the ground pin on the arduino pro mini board.
I guess though, it doesn't make a difference, does it? If I'm pulling 200mA out of the Arduino, then 200mA needs to go in, and that would go through the ATMega's ground pin.
Thanks for the help! :-)