Go Down

### Topic: Can Mega board handle this... (Read 514 times)previous topic - next topic

#### moses1592

##### Jun 21, 2016, 02:13 pm
I want to use a Mega board to directly power 17 LED's. Each LED will be on its own dedicated I/O pin. As far as I know they are 'standard' LED's. If I use, say, a 680-ohm resistor on each LED, will the Mega board be able to adequately power all 17 LED's at once without current overdraw (assuming at times all 17 LED's will be on at the same time)? Or, do I need to externally power the LED's and use the I/O pins strictly for logic to turn external circuits on and off? I'd prefer to power them directly from the Mega board if its safe.

Thanks!

-Brian

#### PaulRB

#1
##### Jun 21, 2016, 04:52 pmLast Edit: Jun 21, 2016, 05:01 pm by PaulRB
Brian, you need to learn how to apply Ohm's law to this situation. Leds don't obey the law, but resistors do. I guess you don't know the forward voltage of these LEDs, so let's assume it's 1.8V. That's the lowest it's likely to be. The led will consume that much, and the resistor will consume the rest of the 5V the pins put out (in practice it will be a little less than 5V but we will ignore that). So the resistor will use (or "drop" ) 5-1.8=3.2V. Ohms law says I=V/R=3.2/680=5mA. This means your 17 leds will use 85mA in total, which sounds pretty safe.

You can confirm this with your multimeter. If you don't have a multimeter, get a multimeter. Just a£10 one is fine for the first few years of your hobby.

The atmega's ports each have a total current limit of 50 or 100mA I think (someone please confirm). As a port is 8 pins, at 5mA per pin, you will be under the limit.

Paul

#### moses1592

#2
##### Jun 23, 2016, 01:55 pm
Thank you for the info!

Go Up