Pages: [1]   Go Down
Author Topic: [SOLVED] Control red-green led (inverted?)  (Read 498 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a strange red-green led, with three wires:
white -> LED+
red -> LR
green -> LG
As I've seen, usually the multiple color leds have one anode (+) for each color and a catode connected to ground, and all examples of connections to arduino I've found are for this polarization.
So, how can I control my strange led? Where I have to pin the wires?
(sorry, I'm really newbie)
« Last Edit: January 27, 2012, 01:01:46 pm by pakomail » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8967
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have a "Common Anode" style of LED cluster, connect the common anode to +5.  Then connect the separate cathodes to I/O pins through the same size resistor you would use if the LED was connected to Ground.  Then when the pin is HIGH, no power will flow (both ends of the LED are at +5V).  When the pin is LOW the LED will light up (power will flow from +5V through the LED and resistor to the LOW I/O pin.

If you use PWM outputs, 0 will be full on and 255 will be full off.  Exactly the inverse of a Common Cathode cluster.

No, you can't use a single resistor on the common pin.  Each LED needs a separate current limiting resistor.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great explanation John!! Thnaks a lot!
Logged

Pages: [1]   Go Up
Jump to: