5 LEDs in one pin with a transistor

Hi,

I know this has been brought up before...but the answers don't seem to make much sense for me.

Basically I just want to be able to control about 5 LEDs in one arduino pin. Just be able to turn them on and off. I can power the LEDs not from the arduino. I have an unregulated power supply...(12v but the multimeter says 20v) I can get a regulated one...but anyway...I know I can do this with a transistor. I just can't find any schematics that make sense to me. I found this one: How Many LED'S on one Arduino Pin? - adafruit industries
but I don't understand how to wire everything up. So if I have an NPN transistor...the arduino goes in pin 2 (base), pin 1 (emitter) goes to cathode in the 5 LEDs, pin 3 (collector) goes to ground through a resistor. the 12V (or 20V) goes in the anode of the LEDs. I would also need resistors on the LEDs, correct? Wouldn't I also need a resistor from base pin of the transistor to the arduino? I tried 1k, 10k, etc and still...the LEDs just light up very bright and the transistor gets very hot. I also tried this with a TIP120 transistor with the same result.
Do I need a diode somewhere?
The Vf of the LEDs is 3.5. I don't know how much mA they take...I just got a bag of them from a friend....he told me they were "12v LEDs"...

thanks so much for any help...I hope that I am being clear with everything...

if you want to turn them on and off independantly using only one pin then you will have to use a multiplexer

if you want to turn them on and off from one pin at the same time then that is easier

you may be able to wire them in parallel using the correct power supply and switch them on and off using a power mosfet

the arduino would switch the gate on the mosfet

Hi thanks for much for the help,

I always try to be as specific as possible...but I guess I always forget some detail...sorry about that....but yes...I want 5 LEDs in one pin and to control them all together...NOT independently. It's just something as simple as turning all 5 off at once and all 5 on back again.

Running the arduino blink sketch, I tried switching the transistors around with emitter and collector...when I did that two lights were very dim and one was half as bright...I tried a TIP 120 (wiring everything a little different because the pin configurations are different) and same thing...just very bright lights but no HIGH to LOW, I also tried a PNP as well...the NPN I was mostly messing around with was, I believe a 2N4400 or something like that...I don't have it with me at the moment...

so with a mosfet...do you mean something like this?: N-Channel MOSFET 60V 30A - COM-10213 - SparkFun Electronics

why don't they use a mosfet in that adafruit tutorial? or are they? they make it seem easy with just a normal transistor...

thanks so much for any other ideas...

Running the arduino blink sketch, I tried switching the transistors around with emitter and collector...when I did that two lights were very dim and one was half as bright...I tried a TIP 120 (wiring everything a little different because the pin configurations are different) and same thing...just very bright lights but no HIGH to LOW, I also tried a PNP as well...the NPN I was mostly messing around with was, I believe a 2N4400 or something like that...I don't have it with me at the moment...

The universal language for electronics is the schematic drawing, English is a poor but often attempted replacement. :wink: Without such a drawing I can only guess of why your results were poor:

You wired the leds in parallel between a voltage source and the collector of the transistor, but failed to have series current limiting resistors wired is series for each led. That would also account for a hot transistor. Not having a properly sized series resistor between the transistor base terminal and the arduino output pin can also damage the transistor and the arduino output pin.

Again just throwing out things we've seen other beginners do and short of a drawing it's all speculation anyway.

Lefty