standard 5mm led

how many standard leds can be atached to 1 arduino pin? Thanks

1 with a suitable resistor, if the current doesn't exceed 20mA (40mA if you're living dangerously). If you up the resistor value so the LEDs arent at full brightness, as many as will fit in the above figures. You can run more by using a transistor to 'amplify' the current from the arduino.

I'm not sure there is such a thing. (a standard LED, that is)
Could you be more specific?

some 5mm red led, i have no datasheet but i thought i could connect more than one of then but i dont want to take risk.
i have no idea about how to use diodes in order to put 3 or 4 of then on a pin, because i have no idea in analog electronic, i have more idea of digital one.

Thanks again

Not as simple a question as it might appear. First you have to know the actual voltage drop ratings of the specific leds you are using. Also different color leds have different voltage drop values.

Then you have to decide if you are going to wire the LEDs in series or parallel. So more specific information is needed to actually size the current limiting resistor(s) you are going to need. I wouldn't plan on being able to power more then two LEDs per Arduino output pin, unless you are willing to drive them at lower then the nominal 20ma that most are rated at.

Lefty

I was posting as you were posting. Most standard red leds have a 1.5vdc voltage drop, so I would guess that the max number you could drive is three if you wired them all in series and added a 25ohm resistor in series also.

As others have said, if you use external power and external switching transistor there is really no limit on how many leds you can turn on and off with a single output pin.

Lefty

do you know anywhere can i document in order to learn how to wire 4 or 5 leds?

Thanks

P.D: i want to use PC power source the power molex that give me 12 or 5v.

do you know anywhere can i document in order to learn how to wire 4 or 5 leds?

That would require external switching device (a NPN transistor, say a 2N2222) and knowing what value of external voltage you have to work with. If you wish to use the Arduinos +5vdc power pin then you would need four or five 175 ohm resistors and one NPN switching transistor rated at 500ma or high collector current, and one 1k resistor to wire from the output pin to the base of the transistor. The emitter of the transistor would wire to a Arduino ground pin. The collector lead of the transistor would wire to all the cathode pins of the four or 5 LEDs. Each LEDs anode lead would wire to each 175 ohm resistor. All the other ends of the resistors would then wire to the +5vdc Arduino power pin. Sorry I have no drawing for you.

Lefty

thanks, as i told i want to use a PC Power source.

They are perfectly OK running them a long way below their nominal rating. Most "standard" LEDs will light using a 1K resistor which with worst case scenario is little over 3mA on 5 volts. I currently have a 5mm 3.4V 50mA High Brightness White job running on 5V through a 1K resistor, whilst not exactly dazzling, there is no doubt it's actually turned on. 20mA should be good for about 8 or more at that rate.

thanks again for your help

Really quick and dirty 5 * 5mm LEDs on one arduino pin : 5 wired directly in parallel though one 1k resistor. Absolutely no risk to either the Arduino or the LEDs :smiley:

A tad on the dim side perhaps but still lit ............

thanks

i want to use PC power source the power molex that give me 12 or 5v.

If you want to use the 12V you will have to regulate it down to 5V before the arduino.

You can't just take the number of LEDs per pin and expect to run that many LEDs on all the pins. There is a total current output of 200mA for the chip, so if you are running each pin at 20mA you can only load up 10 pins like this.

then how can i use a external power supply and interface it with the leds and arduino? as i have told you i'm going to use a 500W PC power source.

As others have said, if you use external power and external switching transistor there is really no limit on how many leds you can turn on and off with a single output pin.

Lefty

so you only have half the puzzle

yes i know i have half puzzle but i cant do the other half xD

i will be very pleased if i can receive where to document about transistor and arduino usage.

i will be very pleased if i can receive where to document about transistor and arduino usage.

Reply #7 (retrolefty) in this thread would be a good place to start. Heres a clue on the Pinout of the 2N2222 :

Or the original T0-18 can housing :

which pin should be connected to arduino? the base pin?

and one 1k resistor to wire from the output pin to the base of the transistor.