Go Down

### Topic: Difference between cathode and anode RGB LEDs ?????? (Read 2973 times)previous topic - next topic

#### steven1995

##### May 12, 2015, 09:51 amLast Edit: May 12, 2015, 10:01 am by steven1995
Hey Guys....I just started a traffic light project, where i am using couple of hundreds RGB LED's....First of all i want to know whats the difference between 'common cathode RGB LED' and 'common anode RGB led'....which one would be easiest to use in this traffic light project. My second question will be how to connect each RGB LED to the Aurdino board and what does each RGB LED need ??

Thanks for the help!

#### Paul__B

#1
##### May 12, 2015, 02:39 pm
Firstly we want to know just what sort of project this is - what you mean by "couple of hundreds RGB LED's"?

Do you propose to have these all showing the same pattern?  Or in groups, all in each group showing the same pattern?

Why would a RGB LED be suitable for a traffic light where the colours are separately mounted?  There are some "single aspect" railway indicators, which is a different matter.

#### steven1995

#2
##### May 12, 2015, 02:57 pm
The project is attached below, and i have calculated to use around 400-600 RGB LED
These RGB led will be run in three different colors as the photo, green, yellow and red.
and all in different timing. So therefore i will be showing it in different pattern. ??

Do u have any good ideas to do this on, through RGB LED
I want to use RGB LED's 100 %, but

#3
##### May 12, 2015, 03:45 pm
So you need to individually control all the RGB LEDs then.
400-600 = 1200-1800 control pins, unless you have some way to multiplex them.
I count 506 LEDs there, so 1518 elements to control.
The problem with RGB is the awkwardness of manipulating them.
If you had RGBs that were 3 separate LEDs in a package, that would make life a lot simpler.
For example,
http://classic.superbrightleds.com/moreinfo/surface-mount-smd/rgb-5050-smd-led-120-degree-viewing-angle/322/1254/#
Then we could work some math: say you were using MAX7219 to control the LEDs, which can control 64 LEDs each: 509/64 = 7.95, so 8 MAX7219s for each color. You wouldn't have to deal with multiplexing to make yellow, just turn on blue & green at the same time. Similarly, only red, or only green.
MAX7219 turns on 8 LEDs at a time and needs 160mA or more at 20mA/LED (depending on brightness), Green+Blue = 16 * 160mA = ~3A power supply. Say you used 40mA (the output is pulsed at 800 Hz), then a 6A supply.

Another option would be WS2812B, which are RGB LEDs with a controller built in. You send it 3  bytes of serial data, it takes care of turning on the appropriate color, 8 bit PWM per color.  Be a lot easier to wire them all up, just one long string of daisy chained parts.
Each one will need 20mA for Red or Green only, and up to 40mA for Blue+Green.
.04*509 = 5V, 20A power supply.

www.adafruit.com for an arduino library to control them. Send out 3 bytes x 506 LEDs once a second or whatever your display change time is.

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### ieee488

#4
##### May 12, 2015, 03:58 pm
The project is attached below, and i have calculated to use around 400-600 RGB LED
These RGB led will be run in three different colors as the photo, green, yellow and red.
and all in different timing. So therefore i will be showing it in different pattern. ??

Do u have any good ideas to do this on, through RGB LED
I want to use RGB LED's 100 %, but
It seems that you don't need RGB LEDs.
You need red, yellow/orange, and green.

#### steven1995

#5
##### May 13, 2015, 03:09 pm
Tanks for your full help and for your time you using for me

You gave me good advice and i think i will be buying the 5050 SMD Led if they can run the three color green, red and yellow as you are saying. Can these SMD led run on my arduino board and can u show me any website i can bye these SMD LEd's from ebay or something cheap places....because i need a lot and can u also please show me any videos of how to connect them and run it as a system with arduino program?

I appreciate your fully help with me

#6
##### May 13, 2015, 03:15 pmLast Edit: May 13, 2015, 03:25 pm by CrossRoads
This will be a large project. Besides the 506 SMD LEDs, you will chips to control them, a Printed Circuit Board to mount them on, and then a microcontroller board to be programmed to control the drivers. No one video is going to show that.
I take it you have no hardware design or software design experience?
I'd have to recommend the WS2812B approach for you, connect them in one long string on a custom PCB
http://www.dipmicro.com/store/WS2812B
A 17 x 41 PCB, each part ~5.5mm x 5.5mm, would need at least a 93.5mm x 225.5mm PCB.

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### steven1995

#7
##### May 13, 2015, 03:19 pm
Yeah maybe it will....and i don't want it to be a large project just small project running with the arduino program....so what about using RGB led strip will that be easier ??

#8
##### May 13, 2015, 03:28 pm
Yes, the WS2812B approach would be easier. If you layout premade strips
http://www.dipmicro.com/store/index.php?searchStr=ws2812&act=viewCat&Submit=Search
41 strips of 17 LEDs, or 17 strips of 41 LEDs, that'd be another workable approach.
Or cut them to smaller lengths as for the narrow waistline of the middle.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### steven1995

#9
##### May 13, 2015, 03:39 pm
Yeah thats it i will do that then...buy a 5 m and cut them as the size i want...

How do i connect them together and connecting it to the Arduino any ideas ?

#10
##### May 13, 2015, 04:23 pm
Connect all Vdds to the 5V power supply. 506 LEDs with 2 full on to make bright yellow (Blue + Green) = 40mA * 506 = 20A power supply. Might need two 10A supplies. Plan for that, or run them at reduced brightness.
Connect all Gnds to the 5V power supply and to Arduino.
Connect Din of first strip to Arduino.
Connect Dout of first strip to Din of next strip, repeating for all strips.

See www.adafruit.com for Neopixel library for controlling them and for which Arduino pin to use.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### steven1995

#11
##### May 13, 2015, 04:52 pm
Thanks a lot for your help and i appreciate each individual that have helped me out of my issue.

Thanks a lot again....all your help was excellent

#### bperrybap

#12
##### May 14, 2015, 12:04 am
It seems that you don't need RGB LEDs.
You need red, yellow/orange, and green.

I agree with this.
All you need is dual color LEDs, Red and Green. To get yellow you turn them both on.
To save lots of time and probably money I'd go look for a large red/green matrix and use that  or a combination of several to build up a larger matrix instead of trying to do it discreetly.
Also, many of the LED matrix out there have libraries already written to drive them.
Just put a mask layer over the matrix to cover up the LEDs if that matters but having a full matrix also would give you other options in the future if say you then wanted to change the visuals or even have text.

--- bill

Go Up