Jump to content

Dimming RGB LEDs HELP!

Hey guys, DIY electrical project in mind only a bit stumped when it comes to varying intensity of LEDs.
I recently purchased a 5m RGB LED strip which came with an included control circuit to change the colours and other features such as decreasing the brightness. Now since the strip only comes with one control circuit (which I am already using with part of the strip) I am quite limited when it comes to any projects I want to make with the remainder. Basically I want to construct my own control circuit that operates in the most effective and efficient way.

The LEDs are common cathode so there are four leads in total: 1 for each colour (Red, Green and Blue) and one common lead as shown below.

My question is what is an effective and efficient way to dim LEDs so I can have some control over the colour (as in if I can dim each colour individually and independent of one another then it would be theoretically possible to make any colour in the visible light spectrum)? So far I have brainstormed the following:

  1. [simplest method] Using a potentiometre in series with each anode lead
    Problem with this is the potentiometre consumes a lot of power when higher currents are applied to it and is therefore not as efficient as desired
  2. [Ghetto method] Place a switch in line with each anode lead so that each colour is either on or off
    Want to avoid this one as much as possible. Also only provides a maximum of 7 colours (ewww)
  3. [Not fully researched method] Using pwm (pulse width modulation) to vary the intensity of each LED.
    By far seems like the most reliable method only unsure how to set up the circuit
  4. [Again not fully researched] Somehow incorporating MOSFETs into the control circuit to vary LED intensity (this is similar to the one used on the control circuit that came with the strip)

Any ideas on which method would be most effective and how to proceed in setting up the circuit and also what electrical components would be required? Right now I am mostly leaning towards using pwm.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque euismod suscipit est, non placerat turpis vestibulum sed. Phasellus et faucibus odio. Donec a nisi at purus porttitor ullamcorper auctor a nibh. Integer id neque a nisi laoreet ultrices id ac augue. Nulla facilisi. Nullam purus elit, dictum quis euismod vitae, mollis non dui. Morbi vehicula neque eu mattis bibendum. Curabitur sed odio tortor. Sed euismod mi in diam volutpat, vitae convallis ipsum mattis. Praesent eleifend faucibus pulvinar. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vestibulum velit nunc, fermentum a libero a, venenatis tempus lectus.

Link to comment
Share on other sites

Link to post
Share on other sites

Use PWM. You have to use the MOSFETs (or another type of transistor, whichever you prefer) anyway because a microcontroller could easily get fried if you tried to power them directly.

 

So do the following: Write a small piece of software for, say, an Arduino, that'll do the color and effects you like (you can do breathing and everything you like. A standard Arduino Uno can do hardware PWM on 6 of its pins), and connect the desired output pins to the gate pins (look up a datasheet for your particular part to see which pin is which) of N-channel MOSFETs (be careful to only handle a MOSFET by its metal tab. Touching the gate pin could kill it with ESD quite quickly) Also connect them through a high-value resistor (100k should do) to ground. Connect the sources to ground also, and connect the drains to the corresponding LED colors. Connect the common cathode to the appropriate voltage. And you're done!

I cannot be held responsible for any bad advice given.

I've no idea why the world is afraid of 3D-printed guns when clearly 3D-printed crossbows would be more practical for now.

My rig: The StealthRay. Plans for a newer, better version of its mufflers are already being made.

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks for the very elaborate answer. So Just to clarify all pwm is controlled through the arduino and the transistors are an added safety measure to not burn out the controller right? Additionally, with some modifications how would I be able to control the circuit with an infrared remote? Obviously would need to make changes to the programming but how would I connect the infrared receiver?

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque euismod suscipit est, non placerat turpis vestibulum sed. Phasellus et faucibus odio. Donec a nisi at purus porttitor ullamcorper auctor a nibh. Integer id neque a nisi laoreet ultrices id ac augue. Nulla facilisi. Nullam purus elit, dictum quis euismod vitae, mollis non dui. Morbi vehicula neque eu mattis bibendum. Curabitur sed odio tortor. Sed euismod mi in diam volutpat, vitae convallis ipsum mattis. Praesent eleifend faucibus pulvinar. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vestibulum velit nunc, fermentum a libero a, venenatis tempus lectus.

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks for the very elaborate answer. So Just to clarify all pwm is controlled through the arduino and the transistors are an added safety measure to not burn out the controller right? Additionally, with some modifications how would I be able to control the circuit with an infrared remote? Obviously would need to make changes to the programming but how would I connect the infrared receiver?

Well, the transistors are partly there to amplify the signal coming off the Arduino, but also because the switching is done on the negative side of the LED, not on the positive side. If you use MOSFETs you need to put a resistor (100k as said earlier) between the gate and ground, if you use regular transistors the resistors (1k should do) go between the arduino and the base pins. Use collector instead of source, emitter instead of drain.

 

I'm not well versed in hooking up remote controls to an Arduino. I think you'd best look up a tutorial for that, but it's doable, for sure.

I cannot be held responsible for any bad advice given.

I've no idea why the world is afraid of 3D-printed guns when clearly 3D-printed crossbows would be more practical for now.

My rig: The StealthRay. Plans for a newer, better version of its mufflers are already being made.

Link to comment
Share on other sites

Link to post
Share on other sites

I also experimented with rgb led strips after wasting alot of money on components that didnt really do what i wanted i found this

http://m.ebay.com.au/itm/271455470522?nav=SEARCH

THE RIG 

CPU: i7 3770K @ 4.9 COOLER: Kraken X61 MOBO: Z77 Sabertooth RAM: Vengeance 16gb @1600 GPU: ASUS ROG Strix GTX 1080 PSU: EVGA Supernova G2 850w SSD: 850 Pro 256Gb    CASE: B/W phantom 410 AUDIO: Kraken 7.1 Chroma MOUSE: Death Adder Chroma KEYBOARD: Black Widow Chroma MONITOR: Triple 23" Apple Cinama Displays   VR: HTC Vive & Oculus Rift DK2 

Link to comment
Share on other sites

Link to post
Share on other sites

I also experimented with rgb led strips after wasting alot of money on components that didnt really do what i wanted i found this

http://m.ebay.com.au/itm/271455470522?nav=SEARCH

Yea I have the same controller (one that came with the strip), however, I'm more interested in building my own mainly for the fun of it as well as learning how to do this kind of stuff for other applications  :)

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque euismod suscipit est, non placerat turpis vestibulum sed. Phasellus et faucibus odio. Donec a nisi at purus porttitor ullamcorper auctor a nibh. Integer id neque a nisi laoreet ultrices id ac augue. Nulla facilisi. Nullam purus elit, dictum quis euismod vitae, mollis non dui. Morbi vehicula neque eu mattis bibendum. Curabitur sed odio tortor. Sed euismod mi in diam volutpat, vitae convallis ipsum mattis. Praesent eleifend faucibus pulvinar. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vestibulum velit nunc, fermentum a libero a, venenatis tempus lectus.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×