Controlling High Powered LEDs with the Arduino using transistors

I'm working on a project which includes the need to control the brightness of an led strip. My plan is to power the LEDs with a wall wart, and run the power supply through a transistor, which I can then attach to a PWM pin on the Arduino to control the brightness. Before I attempt this, I have a few questions-

  1. Are transistors the right option for a controllable switch here, given the voltage and current that I'm dealing with? I looked into relays, but they don't seem to be fast enough to be effective for PWM in the first place.

  2. At the voltage/ current that I'll be dealing with, can I use a solderless breadboard? I don't want to burn anything, but I don't know how else to connect a transistor to this circuit. If a breadboard isn't the right option, what would you suggest? (I have no problem soldering.)

I'll be using ~5" segments of this strip: Clearance LED Strip Lights | LED Strip Lights & LED Bars | Super Bright LEDs

Here is the power supply that I'll be using (24W): http://www.superbrightleds.com/moreinfo/power-supplies/12vdc-cps-series-power-supply/68/

Just to be clear, I've never used transistors before in my life. Trying to figure it all out!

dzaharia:
I'm working on a project which includes the need to control the brightness of an led strip. My plan is to power the LEDs with a wall wart, and run the power supply through a transistor, which I can then attach to a PWM pin on the Arduino to control the brightness. Before I attempt this, I have a few questions-

  1. Are transistors the right option for a controllable switch here, given the voltage and current that I'm dealing with? I looked into relays, but they don't seem to be fast enough to be effective for PWM in the first place.

  2. At the voltage/ current that I'll be dealing with, can I use a solderless breadboard? I don't want to burn anything, but I don't know how else to connect a transistor to this circuit. If a breadboard isn't the right option, what would you suggest? (I have no problem soldering.)

I'll be using ~5" segments of this strip: Clearance LED Strip Lights | LED Strip Lights & LED Bars | Super Bright LEDs

Here is the power supply that I'll be using (24W): http://www.superbrightleds.com/moreinfo/power-supplies/12vdc-cps-series-power-supply/68/

Just to be clear, I've never used transistors before in my life. Trying to figure it all out!

It doesn't seem to say what the current consumption of those LEDs is - also by 5" do you mean
2 segment or 3-segment portions of strip? Is each strip to be controlled by a separate transistor?

You can either use NPN BJTs or n-channel MOSFETs(logic level) for this with low-side switching.
There are examples on Arduino site for both I believe.

You'll have to find the current consumption out though to choose appropriate devices.

Hey Mark,

Thanks so much for replying. Since posting I've continued to do my research. I think I'm going to be using an n-channel MOSFET transistor. The LEDs are rated at 274mA per segment. I'm going to be using 3 segments, so 822mA for the whole strip. I don't think that the breadboard will have too much trouble handling less than an amp of current. I decided on an n-channel MOSFET just for the simplicity.

5 inch, 6 LEDs?
Or 5 feet, which is lot more LEDs?
Looks like every group of 3 LEDs draws 48mA. How did you come up with 274mA?
You will have 3 strips of LEDs, with 15 or 18 LEDs per strip?

Personally I'd double-up the high current connections at that level or use a PCB if
you want long term reliability - just to reduce the risk of corrosion gradually affecting
the high-current connections.

Make sure the MOSFET is logic-level - for that current level 0.15 ohms or less Rds(on)
would be fine. Something like 150 ohm gate resistor is normally recommended.

When you tell me to use a PCB, are you suggesting something like perfboard? Will that work? Also, @CrossRoads, you're right, I thought that the specifications were per unit, not per foot, so I'll be way closer to about ~100mA on the higher end. Either way, I want my result to be somewhat permanent, so I'll probably solder this into perfboard once I have it working.

Thank you guys so much, this was invaluable.

Yes, soldered to perfboard will be much more reliable than wires stuck in solderless breadboard.
Glad you got your current under control 8)

Hey guys. So I wired this all together as we discussed, and I'm getting a weird result. When my PWM pin is set to analogWrite(255), I'm getting what seems to be full brightness from the leds. Now, when I lower the pwm slowly to zero, I do get a dimming effect on the LEDs, but it's very slight, and I can't bring them fully down to zero. How is it possible that with my analogWrite set to zero, the LEDs are still getting power through the transistor? I tried putting 10k resistors between the pwm pin and the transistor gate, i tried putting a resistor between the arduino's ground and the wall wart's ground, and neither of these tests had any effect. Can someone help me work through this? I don't understand the problem, much less know what it is.

Thanks

Post a schematic of what you've built up.
Maybe you have transistor pins swapped around or something.

I found a burst of deermination to figure this out myself. I ended up fixing this by grounding the Arduino to the ground of the light strip before the transistor. For some reason if I ground anywhere else I get weird behavior. I don't know why this is exactly, but I have it working.

For some reason if I ground anywhere else I get weird behavior.

Sounds like it wasn't actually grounding properly. Maybe the rewiring actually grounded it.