Help required in a project

Hello everybody,
I need some assistance, because I'm new in the Arduino world, so I'm not expert :frowning:
I've been involved in a school project that consists in a RGB LED DNA model. The model consists in two colummns of LED for a total of 20 LED. Then a programm generates a DNA string (e.g. A G C T A ...), a second step, finds the complementary one (e.g. A T G C the complementary is T A C G) and then the third one will set the colors for every single led in the model (e.g. for the T sets the red, for the A sets blue and so on). My problem is: 1 How can I connect the LEDs so that with 4 wires I can power the LEDs, but with different colors( I mean, if i have to attach every single pin of the 4 pin LED, I'll have a total of 40 wires for only 1 side and my Arduino has only 13 Digital pins...) and 2 I guess that i'm going to need some special componentsto make this work; so What do I need as components?
P.s. In another project that I found ( A 4x4x4 RGB LED Arduino cube) he used some TLC5940 PWM IC: I'm going to need those?
Hope that someone can Help me, I'll be waiting for news soon. Bye for now. :wink:

Take RGB LED strips with a chip like the WS2801 for every LED. This way you can control an almost arbitrarily long strip with just 4 wires (ground, Vcc, clock and data).

Ok thanks, but now I have to make this question. My LEDs have 4 pins (1 for the green, 1 for the red, 1f or the blue and the last one is the common one) If i want to put 2 LEDs turn on 1 red and 1 blue with only four cables that goes in my arduino, can I do that? If not, how can I do that?

If you have 20 LEDs each with 4 connections that means a total of 80 connections - and it's the equivalent of having 60 separate LEDs. If you want to be able to light each one separately you will need some additional ICs between the Arduino and the LEDs - something that can select the correct LED based on an address generated on the Arduino pins. For example a 74HC151 will select one of 8 lines when fed with a 3bit address. However I'm not suggesting that is the ideal chip for the job - it's just to give you an idea.

You will also need to take account of how many LEDs you wish to light at the same time.

...R

Ok thanks, but now I have to make this question. My LEDs have 4 pins (1 for the green, 1 for the red, 1f or the blue and the last one is the common one) If i want to put 2 LEDs turn on 1 red and 1 blue with only four cables that goes in my arduino, can I do that? If not, how can I do that?

That's actually pretty simple. And you'll only need two pins from the arduino.

Exactly how depends on whether your RGBs are common cathode or common anode. If they're common cathode, you can just ground the cathodes. Then you run each anode through a resistor to a digital output pin on the arduino.

I think standard way of doing lots of LEDs is to multiplex them. You can reduce the number of pins needed if you know some patterns for the colors. If there are certain LEDs that only go red or green, for example, or certain groups of LEDs that are always the same color.