I made a circuit that controls a regular 5mm RGB led and it works perfectly - but i wanted to add more LEDs (simply). So, I had an analog RGB strip laying around and decided to use that....
The problem is I already had the circuit made and have limited board real estate to "add things" and didn't have room for the recommended MOFSETs (the voltage regulator was already pushing it!) So I added 3x 2n2222 transistors and 3x 10K resistors to the base...then things got funky. I couldnt figure out why the strip was a different color than the 5mm led...tested them both separately on a different breadboard and they work just fine...
I came up with the transistors weren't killing the strip. (see pictures)
does anyone have a solution for this? (sitting here staring at the screen waiting for an answer)
10k base resistor? 150 ohm perhaps... You need to saturate a BJT when used
to switch. The load must be on the collector side too (ie a common-emitter circuit).
Expect Ib = Ic / 20 for saturation, so for 30mA Arduino pin output don't expect
much more than 600mA to the load without losing saturation and cooking the
transistor.
Perhaps you confuse a darlington with a normal BJT? Darlingtons have a
gain of 10,000+ and saturate at Ib = Ic/1000
I'm using the attiny85 the LEDs. The problem is the LEDs stay on even when all the pins are HIGH (common anode). My goal is to turn off the 12v analog rgb led strip (control it as a normal led)
My second problem is there is only a max of 8.3 volts getting to the LED strip. Not nearly bright enough.
I'm not too familiar with transistors and have only recently been inter grating them into my circuits. They work great on a 5v circuit, but this is my first attempt at a 12v circuit and a 5v (4.8v) base.
MarkT:
Lets check you have the 2N2222 in the right place:
emitter to ground (shared ground between 12V supply and Arduino).
base via 150 ohm resistor to Arduino pin (should be 0V when off, 0.7V or
so when on).
collector to negative terminal of the strip,
positive terminal of the strip to +12V.
And then only expect to switch 0.5A per 2N2222 (and you need a separate
Arduino pin per 2N2222 to supply its base current).
I have the collector connected to GND (where both the 12v and 5v sources share,
I have the base connected to a 10Kohm resister going to the output of the attiny85 (4,1,2)
then the emitter is going to the RGB strip (to the corresponding color - common anode).
Gerry48:
I don't fully understand your circuit. The transistor may not be in saturation. You need more base drive. Change the base resistor (10k) to 1k.
Aren't these NPN i which case collector needs to be to the LEDs and the other side of the LEDs is 12V
emitter is to GND
Base goes to Arduino via resistor
rogerClark:
Aren't these NPN i which case collector needs to be to the LEDs and the other side of the LEDs is 12V
emitter is to GND
Base goes to Arduino via resistor
I don't know how we can help you without a schematic. Draw one and post a photo of it.
As already mentioned, you may have blown your transistors. If you have a multimeter we can walk you through a transistor test.
rogerClark:
Initially wiring them up backwards may have destroyed them
At 12V its almost guaranteed, the emitter-base reverse voltage rating for
transistors is about -5V and even large power transistors are trivally destroyed
by exceeding this.
Sadly, there are so many examples of how to do this correctly by using just a simple Google search. Heck, I even have an example lying around... http://pwillard.com/files/LED.JPG or http://pwillard.com/files/LED2.JPG and in this configuratoin, the supply voltage (in my case 5V) could be anything that won't fry the LED's or Transistor.
It was not said that you applied 12V to the base. It was implied that you exceeded the Emitter to Base breakdown voltage by applying 12V to the Emitter when you should have attached the Led Strip and 12V to the Collector pin and instead connected the Emitter pin to GND. (as shown in my examples)