Pages: [1] 2   Go Down
Author Topic: RGB LED controll with three pots  (Read 1574 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...


Edit:
----
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.
« Last Edit: August 23, 2010, 04:54:13 pm by mpeuser » Logged

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1376
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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"

jack
Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 :-)

« Last Edit: August 23, 2010, 12:35:09 pm by mpeuser » Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: August 23, 2010, 12:34:12 pm by mpeuser » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 209
Office meets Adruino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks fun.

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

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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";-)
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33314
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.  smiley-wink
Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: August 24, 2010, 04:28:50 pm by mpeuser » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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?
Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: August 24, 2010, 04:47:32 pm by mpeuser » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1] 2   Go Up
Jump to: