PWM for LEDs powered by 9V 1A coming out of VIN

Hi all,
I have an assortment of LEDs, some with a 3.2 voltage drop and others 3.6. I have some hooked up in parallel and some hooked up in series. But all are set up with current limiting resistors allowing them to take 9 volts. Currently, I'm powering them through the Vin pin (9v 1A). Yes, I'm a noob, and now I want some PWM dimming. The schematic goes like this: Vin to lights, lights to the collector of a 2NAAAA transistor, base of transistor to 1.5Kohm resistor to PWM digital output, emitter to GND next to Vin pin and digital GND. I'm pretty sure I'm burning out the transistor. Kinda poopy. Help would be much appreciated.

*Emitter to GND next to vin + GND in digital output column

Haha no sir. I'm not using them as sacrificial current limiting devices. And yes my 9V 1A power supply is powering my arduino as well as the LED's. Is this the problem? Basically each LED has its own resistors. Symptoms: My multimeter shows the proper voltage readings for PWM. I know this because I measured voltages when I used PWM successfully with a single LED. However, the voltage readings across the transistor start out erratic, like values go between 8.55, 6 something, 5 something, and 0. Then suddenly the voltage is consistently 8.55 across the LEDs. The current going through them to the collector is like 1.15A, and I'm pretty sure the max I rating on the transistor collector is like 800mA. So yeah. Should I just place a pot in front of the LEDs?

The schematic http://s776.photobucket.com/albums/yy41/electricalnoob1991/?action=view&current=IMG_0114.jpg

The current going through them to the collector is like 1.15A, and I'm pretty sure the max I rating on the transistor collector is like 800mA.

How do you get that current. From the schematic you only have 5 LEDs (in parallel) How does that add up to so much current? That transistor a 2NAAAA is that the right part number google doesn't know about it.

If you have too much current through the transistor then just split the load across two or more transistors and wire the base resistor of all to the same arduino pin.

Crappy schematic. The 9v 1A in the pic is the power supply for the arduino. And that square is the arduino. And sorry. The transistor is a 2N2222A. NPN. Thanks for the help guys. I'll try splitting the load. I have no idea why the current reading is so high. I'll try and find out what I am doing wrong.

Ahh and the schematic should show the LEDs hooked up to vin and GND...

The transistor is a 2N2222A.

That's better. That has a maximum usable collector current of 500mA not the 800mA you think. That current is the absolute maximum peak current and is a stress rating not a usable rating.

If your wiring skills match your schematic skills then I suspect you have not wired it up like you think. :wink:

I calculate the current to be 155mA. However the two LEDs in series appear to have 41mA going through them. That sounds like too much for an LED.

Those 2 LEDs actually have 137 ohms. Sorry. And they are rated at 4.0V. And the 2 LEDs rated at 3.5V have 150 ohm resistor attached.
New schematic (more accurate): http://s776.photobucket.com/albums/yy41/electricalnoob1991/?action=view&current=IMG_0118.jpg

OK learn to draw transistors correctly. The base connection should come out of the other side. Also I am not sure what the "other" ground is, it's "labled output +ve ground" which dosn't make any sense.

An LED is not 'rated' at 3.5V, it might drop 3.5V when a current is passed through it but that is a totally diffrent thing.

And the 2 LEDs rated at 3.5V have 150 ohm resistor attached.

Well that is 7V dropped by the LED from a total of 8.5V only leaves 1.5V across 150R giving a current of only 10mA. I can't see how you are getting the transistor hot if all your figures are correct.

OK learn to draw transistors correctly.

:frowning: sorry.

Well that is 7V dropped by the LED from a total of 8.5V only leaves 1.5V across 150R giving a current of only 10mA. I can't see how you are getting the transistor hot if all your figures are correct.

They are correct...
I guess the transistor isn't failing.
Also the other GND just says Arduino Analogue output GND. So I was just saying it was the GND in the analogue pin column

Just a thought but if the resistor in the base isn't 1K5 but a higher value like 150K then the transistor won't be turning on fully and so will generate more heat.

There is a 1V drop between collector and emitter when he transistor is fully on so the power dissipation in the transistor is simply 1 X current = watts. So calculate that and see how much you are burning.

HEy thanks for all the help Mike. I honestly don't know why the transistor wasn't working. Anyways, I got a MOSFET and now everything works perfectly