Help with LEDS

Hello guys! (This is my first forum post and not sure if this is in the right subsection. And yes, I have read other forum posts but I feel like they didn't quite answer what my question is.) So I've been messing around with LEDs and time and time again I've wished I could/knew how to connect multiple LEDs to one PWM pin (is that the right term for it?) So I have 7 pairs opposite of each other on the breadboard, (these are not RGB by the way) and I would like each one pair to connect to pin 2 another to pin 3 etc. (so that the pairs act as one and to have enough pins.) My two questions are: can you? And if so how? I didn't want to "cook my board" (other forum posts say multiple LEDs on one pin will), so I haven't experimented much.

Hey, and welcome to the forum! I made a quick Google search and found this. Hope it was useful.

Marco

Yes, you can run multiple LEDs from one pin using a separate current limiting resistor for each LED, and making sure that the total current doesn't exceed 20mA, and that the total currents of all the pins that you do that with, doesn't exceed another total for all the pins (I think it's 250mA but you should check the datasheet).

Most modern LEDs are bright enough that you can drive 2 from one pin in this way, without using a transistor as found in the above link (which lies and states that you can obtain 40 mA from the pins, which is an absolute maximum that may damage the chip).

aarg:
( … states that you can obtain 40 mA from the pins, which is an absolute maximum that may damage the chip).

Really? That’s good to know. That definitely wasn’t the first place I read that you can obtain 40 mA from the pins. I didn’t know 40 mA was a breaking point… :o

Don't design to the maximums, keep output pin currents limited to 20ma total.

Partial quote from @Crossroads :
"The limit is 200 mA Absolute Maximum per VCC & Gnd pin, then the current limit per port and per pin.

'328P in a DIP package has 1 VCC pin, thus 200mA limit.
'328P in a surface mount package, thus a 400mA limit.
The Notes in Section 29 show the limits per port, totalling 300mA:

ATmega48A/PA/88A/PA/168A/PA/328/P [DATASHEET] 304
8271G–AVR–02/2013
Notes: 1. “Max” means the highest value where the pin is guaranteed to be read as low
2. “Min.” means the lowest value where the pin is guaranteed to be read as high
3. Although each I/O port can source more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state
conditions (non-transient), the following must be observed:
ATmega48A/PA/88A/PA/168A/PA/328/P:
1] The sum of all IOH, for ports C0 - C5, D0- D4, ADC7, RESET should not exceed 150mA.
2] The sum of all IOH, for ports B0 - B5, D5 - D7, ADC6, XTAL1, XTAL2 should not exceed 150mA.
If IIOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current
greater than the listed test condition.
4. Although each I/O port can sink more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state
conditions (non-transient), the following must be observed:
ATmega48A/PA/88A/PA/168A/PA/328/P:
1] The sum of all IOL, for ports C0 - C5, ADC7, ADC6 should not exceed 100mA.
2] The sum of all IOL, for ports B0 - B5, D5 - D7, XTAL1, XTAL2 should not exceed 100mA.
3] The sum of all IOL, for ports D0 - D4, RESET should not exceed 100mA."
If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater
than the listed test condition.hl

Thanks to: Amtel via @Crossroads :
The 200mA is the absolute maximum current rating of the power supply pin. Whatever may be the power supply voltage (The power supply voltage should be within the specification), the current through the Vcc pin should not exceed 200mA.

Also the 200mA specification under the absolute maximum rating is for individual Vcc pin. And the AVCC pins should not be considered along with the VCC pins for the total absolute maximum rating. Hence, for the device ATmega1284P, for the DIP package, the maximum current rating will be 200mA, whereas for the TQFP package, the max. current rating will be 600mA.

For 328P, the max current rating is 400mA for the TQFP package. For ATmega2560, the max current rating is 800 mA. Also, please note that this is absolute maximum rating and exposing the device to absolute maximum conditions for longer duration of time could possibly cause damage to the device.

.

Red LEDs have a forward voltage drop of ~2V.
Current, 20ma for a pin therefore 10ma for each LED.
R = (Vcc-Vf)/10ma = (5 - 2)/.01 = 300 ohms
Use a standard 330 ohms for each series resistor on each red LED.

2016-07-02_20-02-37.png
.

Common LEDs have a Vf (forward voltage) of ~1.8 to 2volt.
That means you can connect two in series (on a 5volt Arduino).

Two LEDs and one 100ohm resistor in series will draw ~10mA.

High-brightness and blue LEDs have a higher Vf (2.4 to 3.3volt), so that trick doesn't work with them.
Leo..

LarryD:
Red LEDs have a forward voltage drop of ~2V.
Current, 20ma for a pin therefore 10ma for each LED.
R = (Vcc-Vf)/10ma = (5 - 2)/.01 = 300 ohms
Use a standard 330 ohms for each series resistor on each red LED.

2016-07-02_20-02-37.png
.

Thanks guys! (Sorry if this is a stupid question,) but what about yellow LEDs? are they different? (And I only have 10k and 330 resistors anyways.)

Yellow = ~2.2 volts

Try your 330 to see the light intensity.