Go Down

Topic: RGB LED controll with three pots (Read 4126 times) previous topic - next topic


Hello i was wondering if it were possible to take THIS set up and use it to control ten to fifteen rgb leds


Aug 23, 2010, 06:43 pm Last Edit: Aug 23, 2010, 11:54 pm by mpeuser Reason: 1
To control more than one LED you have to use a more powerful current sink than just an output pin.
- logical level MOSFETs e.g. IRLU 024N, ..
- Darlington array , e.g. ULN2803

15 RGB LEDs will need around 200mA, times 3!
Well, maybe the MOSFETs are a little bit of overkill...

I had some 2N7000 laying around for months now... this thread brought them back to my mind.They differ from well known logic level MOSFETs in that they are truely "low power": 500mA max! And they cost practically nothing (<20 cents). They also come in a quad package: VT1000.  A true alternative to small signal bipolar transistors.


Providing they are the same type and operate at a similar current you could wire the relevant coloured LEDs in series.  This of course means you will need to drive them with a higher voltage supply, say 24 to 36 volts with a constant current controller in the supply leg.  The advantage is that your supply current is relatively low and you don't have the problem of trying to control the current through each individual LED.  There is no need to balance voltage across each LED as it's the current that does the "work"



Aug 23, 2010, 07:27 pm Last Edit: Aug 23, 2010, 07:35 pm by mpeuser Reason: 1
What jackrae describes is realized in the popular LED strips.
They consist of groups of 3 (12V) or 6 (24V) plus a small current delimiting resistor. As bright LEDs have a so called forward voltage close to 3, this is the limit.

When you want to look advantagious you can connect the end of such row of 3 LEDs plus a resistor of - say - 220 Ohms to an Arduino pin (the other end at + 12 volts!).

However take a little care when fiddling around with 12 or 24 volts near Arduino pins. The issue is not the intended circuit but some bad slip...:-)
I have to confess, that..... but no, that is not your business :-)


Aug 23, 2010, 07:33 pm Last Edit: Aug 23, 2010, 07:34 pm by mpeuser Reason: 1
Talking of slips....

The original set-up does not contain any resistor. This is fine, as the currrent is pulsed by a PWM with duty cycle < 1/4.

iT is fine only as long as the intended program is running. As soon as programming errors, hang-ups or different code enter the scene this is not without risk


so if i used that set up, i would need more power?

lets say i use 10 of these
would i be able to use a power supply of 12v? and if i did, would it still be possible to use the three pots? or would this idea be completely out of the relm of possibility?
sorry if these sound noobish but they are, i have just started with the arduino.


Looks fun.

I may have to dig around and find my rgb LEDs too.


All RGB LEDs are quite similar. Look for this:
Current: should not exceed 20mA
Forward voltage: should not exceed 3.5V
Leads: Should be 4, one is the COMMON ANODE, to connect to positive voltage. Dont buy things with 2 leads, they'll do something else than what you expect...

All this has nothing to do with Arduino, but with most elementary electronics. So please do also read one of the 1.234 tutorials in the web, covering "How to connect LEDs to a microcontroller";-)


Dont buy things with 2 leads, they'll do something else than what you expect...

I'd expect them to flash different colours... what do they really do I am intrigued.  ;)


For a demonstration I once soldered a female 2 pin connector to the tiniest 3.7 volts  LiPo could find, took it out ouf my right pocket, then one of those flashing RGB LEDs out of my left pocket and stcked them together. It worked fine for many hours and was very impressive  ;D


okay sorry, im a little new to all of this, im only just 16 as of the 22nd. im going to explain this all again and hopefully explain exactly what im trying to do.

Okay so i want my arduino to control 10 rgb leds using three 10k pots, like this example: http://www.arduino.cc/playground/Main/RGBLEDPWM  my only problem is that i would need more power than just the 5v coming from the arduino, correct me if im wrong. so in order to do this, i could use a transistor or a logic-level MOSFET correct?
if i used a transistor, connected to the three pwm pins, and connect those to the leds in parallel, i believe this should work? please correct me if i am wrong about any of these assumptions.


Aug 24, 2010, 11:28 pm Last Edit: Aug 24, 2010, 11:28 pm by mpeuser Reason: 1
Many happy returns then!
Try this first: compute how much current and how much voltage is involved at what place in your design.

It makes no sense to follow receipes or unclear commands any longer now after your 16th birthday.


Try this first: compute how much current and how much voltage is involved at what place in your design.

how might i go around doing such?


Aug 24, 2010, 11:46 pm Last Edit: Aug 24, 2010, 11:47 pm by mpeuser Reason: 1
Some hints:
- Always apply Ohm's law : V = R * I
- LEDs dont have a specific resistance, but a constant voltage drop (called "forward voltage") when they shine: This is around 2 volts, higher for blue ones (3 volts), lower for red ones (1.5 volts).
- The current through a transistor's collector-emitter path is mainly determined by the collector resistor.


im kinda stupid, couldnt i use something like this? hopefully find one cheaper on ebay or such.

Go Up