I have searched on google and am still very confused about this, none of the sites do a very easily understandable job of explaining this. I have an arduino mega 2560, and would like to control a 12V LED strip with a TIP122 transistor. Could you please show me a circuit diagram, and explain how to control the strip with an arduino? I have heard that i connect the Base pin to something like D9, the Collector to the positive lead of my power supply, and my LED strip, and the Emitter to the led negative and GND on my arduino. This doesn't work, a digitalWrite on and off makes no difference. Could you please explain simply how to use one of these transistors, both for this project and in general. Thanks in advance
Read this first, then come back with questions. Leo..
I think Wawa’s subtle message to you is to use a MOSFET instead. But, you can do this with a TIP122, but you might need to throw a heatsink on it – depends on how much current that 12V LED strip requires. Also, I think Wawa assumed this is an RGB strip, but I don’t see any mention of RGB or color, so, I will assume this is a monochrome strip.
Have a look at this schematic:
The R1 resistor value [820Ω] is for around 1A through the LED strip. You can calculate that value using the following formula:
R1 = (3.5V * 250) / I[sub]strip[/sub] where: Istrip is the current required by the LED strip.
Where did I get that voltage of 3.5? The voltage at the Base-Emitter junction [based on the datasheet] is estimated to be 1.5V [with around 1A at the Collector], so
5V - 1.5V is 3.5V
Be aware, though, because of the voltage drop from the Collector, to the Emitter [VCE(sat)], the LED strip will not glow as brightly as it would if connected directly to 12V. I can’t say for sure what the expected VCE(sat) will be, because there is no mention of the amount of current this LED strip requires. But for an LED strip that takes around 1A, the typical VCE(sat) is estimated to be 0.8V to 0.6V. That means only around
12V - 0.8V or 11.2V will reach the LED strip, and that might be significant. But, on the plus side – by not driving the LEDs as hard as they would be driven at the full 12V, might, actually, extend their lifespan
If it is 0.8V, then, for an LED strip that requires 1A of current, that’s a Power Dissipation [in the transistor] of:
P[sub]D[/sub] = 0.8V * 1A = 0.8W
So, the transistor will get a little hot. This gets worse as the amount of current goes up.
Using a MOSFET, as Wawa seems to be suggesting, will, if the correct one is selected, get rid of all of these issues.
There are different kinds of LED strips... Does it light-up when you connect 12V (and ground) without the transistor?
You can test the setup (with the transistor or MOSFET) with a regular LED (with a ~1K current-limiting resistor). And if it's not working, you can check the Arduino's digital output with an LED (and resistor). Do you have a multimeter?
...If the transistor overheats and dies, it will usually short-out so it will be stuck-on and won't shut-off.
A TIP120 (121, 122) bjt darlington is ok for a short piece of LED strip. Up to 60 LEDs or so. And if you don't mind them being a bit dimmer. A TIPxxx can drive a longer strip, but will get hot and needs a heatsink. If you're serious about your LED strip, then use logic level mosfets.
TIP120: emitter to ground, collector to LED strip negative, 220ohm resistor between base and Arduino pin.
Mosfet is almost the same. Source to ground, drain to LED strip negative, 220ohm resistor between base and Arduino pin. Wise to also add a 10k resistor from Arduino pin to ground, to stop the mosfet from turning on when the Arduino is still booting. Leo..