Author Options:

Arduino RGB room lighting help!? Answered

I have been looking around for what kind of transistor, mosfet, what have you, that could take in the power from the power supply of 12V 3A, and take in the PWM signal from an arduino to adjust the brightness for RGB led lighting I have in my room.

I know there are a few ways, but I would like to know what the basic parts I would need, transistors, resistors, capacitors, to get this going.

Any and all input would be awesome. Thanks!



Best Answer 8 years ago

What you need is a logic-level MOSFET. These handy devices can be switched on and off directly by a microcontroller or other logic-level (ie. 5V) signal. They can easily handle 5,10, 15A of current due to their low internal resistance. Depending on your circuit, you will choose either a P-channel or N-channel MOSFET. I think it your case it won't really matter though. Of course, you'll probably also want to get one that is a though-hole component simply for ease of use. Drop by www.digikey.com and search for "MOSFET" - narrow the search results from there!

Wow... there's a lot to look through in the mosfet area. Im getting very close to getting my work bench set up and Im curious what your suggestion of a mosfet I could use for this.

One like this would do the trick. http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=IRLZ14PBF-ND

Thank you very much. When I can get my paypal fixed, Ill purchase a few and go from there. Now I remember I was told Id need a small capacitor somewhere on each channel to compensate for the shock of each channel switching too fast.

Hmmm, possibly. Depends on a lot of things. A capacitor would definitely change the waveform from a sharp on/off to more of a ramp. But if the capacitor is too large then the LEDs may never fully turn on or off. So, if you do use caps, choose the value carefully.

Thanks, Ill take a look through there!

Sounds like you already have most of the idea down -- you just need the correct power transistor. Any TTL logic input mosfe should work. You want to run strands of series leds as close to input (12V ish) to minimize waste in the resistor. Each strand then needs a current limiting resistor, then you can run as many strands as you want in parallel after that (so long as it stays in the current limit of your power supply). Lastly, on the power supply side of the transistors, its good to run some heavy duty electrolytic capacitors to absorb the 'shock' of flashing the leds, and even some smaller caps to absorb the noise of the khz flicker that can create some whining in some circuits.

Hmm, well this is a lot more info than Iv gotten before on all this. :P Now, the exsisting led lighting system had a controller for it that ran these led bars. Each bar had a set number of red green and blue led's with resistors soldered onto the boards. The power supply came with these sets as well when I got them from the good will for cheap. Only reason Im re making a new controller is that I burnt out the transisters on the little hand held controller. :P Im wanting to make one of my own with an arduino as the controller. I can work on providing some pics and more info on the parts Im working with if it can help nail all this down better.

Even easier -- treat each channel (r g or b) as a 'strand' I mentioned above, then simply run those off the outputs of the power transistors. Like steve says, make sure to only use pwm, don't use them as 'dimmers' or they will cook. (on = very little heat, off = very little/no heat. halfway conducting = burning half the power off, and on such a small part that means a HIGH temperature!

Exactly. I was originally going to use the three main PWM channels on the arduino and use scripts to control them each on there own strands. All I need to know now is what parts to build onto a proto shield if this sort of thing has not yet been made for such a project.

Along with what frollard said, I think that a fade value for each strand would be nice, too. It could give a slight saturation value.

You'd be MUCH better creating a switch mode power supply for your LEDs, than use them in a linear way, because that transistor is going to have to dissipate close to 36W in some conditions, unless its operates as a switcher.

Well how these light bars were set up before, they had a controller that changed the different light displays on it. I burnt it out from adding a few extra light bar's to it. Im wanting to re-create this controler, but use the arduino as my controller so I can access and write my own effects into it.

Post some pictures of the original controller and we can help better. Steve

That controller is long gone. I do remember seeing what looked like three surface solderef transistor like parts on it though.