Transistors (in general. and to control LEDs)

I'm fairly new to electronics but have completed many of the tutorials here and on tronixstuff's site. I'm currently learning more about transistors but having a hard time figuring out how to choose some for my current project. I've searched and found people who said "use transistor for " but I'm not sure how they chose them. I know it partly comes down to how they're used (PNP/NPN which I understand) but when it comes to power, how do you decide without knowing all the info off the top of your head?

I'm working with some LEDs. Here are the specs:

Forward Voltage (V) : 1.8 ~ 2.2
Reverse Current (uA) : <=30
Max Power Dissipation : 80mw
Max Continuous Forward Current : 30mA
Max Peak Forward Current : 75mA
Reverse Voltage : 5~6V

They're not very exact or matched, but fine for my needs. I'm fine calculating resistor values for them individually, too.

What I need to do is control various amounts of these at once using PWM for each set of leds.

For example, I want to use 1 pin to light 3 of these at once, another pin to light 6 other leds, and another to light twelve other leds.

How would I go about choosing which transistors to order for my needs? I'm mainly at a loss on how to determine which transistors fit my needs if I can calculate my Volt/Amp needs.

Thanks

It is mainly current, at these small voltages all transistor's can handle the required voltage.
So get a transistor who's maximum current rating is at least twice what you want to use, and who's gain is arround 100 or so.
But most of all get the cheapest you can buy. That will eliminate things you don't need like high frequency responce.

Thank you for your answer. I'm wondering, is this the right way to do it?

I have catalogs (digikey, mouser, and another but I can't remember the name) and the transistors seem to be sorted by the manufacturer. I can then look for the package and current, but it seems I need to look through all of the manufacturers, narrow down by package, narrow down by the max current, and then compare prices.

Ideally i'd like to be able to just look at package and max current, then find them by price.

Is that how it's usually done or am I misunderstanding?

bitrot:
Thank you for your answer. I'm wondering, is this the right way to do it?

I have catalogs (digikey, mouser, and another but I can't remember the name) and the transistors seem to be sorted by the manufacturer. I can then look for the package and current, but it seems I need to look through all of the manufacturers, narrow down by package, narrow down by the max current, and then compare prices.

Ideally i'd like to be able to just look at package and max current, then find them by price.

Is that how it's usually done or am I misunderstanding?

Yes, that is usually how it's done. Using the parametric searches on the websites of your providers gives you the ability to search for a specific package and current rating.

For instance - here are digikey's 100 gain through-hole NPN transistors sorted by price

bitrot:
For example, I want to use 1 pin to light 3 of these at once, another pin to light 6 other leds, and another to light twelve other leds.

How would I go about choosing which transistors to order for my needs? I'm mainly at a loss on how to determine which transistors fit my needs if I can calculate my Volt/Amp needs.

This is a perfect job for the AN6884 / KA2284 (they both work exactly the same)

Think of them as a big transistor with 5 current regulated collectors.

Each one can switch 5 LEDs (or more if you put them in series), they do current regulation (no resistor needed), they don't take up much space on a PCB (they're vertical), they work great with Arduinos.

All you do is connect an Arduino PWM output to pin 7 and you can switch all five LED pins at once.

PS: Transistors: BJT H