Take the 2-minute tour ×

I am constructing a 5x5 LED grid that has an RGB LED under a plastic cover, and a piezo sensor that changes the RGB LED to one of 8 colors when pressed.

So as far as I can tell I need 75 outputs for the RGB LEDs, plus 1 more to power everything that can be daisy chained between the 25 RGB LEDs. I will also need another 25 inputs for the piezo sensors and 1 ground that can be daisy chained together.
The Arduino has nowhere near enough I/O pins on it but I have heard of a thing called multiplexing. However, I am not sure if you can run RGB leds with multiplexing.

If this helps at all I am using a led strip that I can cut into 3 LED sections to put under each square.

I hope I was not to vague with my question, thanks for your help.

share|improve this question
Huh? It is difficult to tell what is being asked here. This nonsensical stream of words without sentence structure is not worth trying to decipher. –  Olin Lathrop Jan 13 '12 at 19:47
@Goldentp - since this is your first question I took the liberty of editing it for you to improve readability. –  Oli Glaser Jan 13 '12 at 21:11
@Oli: You just taught this guy and everyone else watching that you can dump a mess on us and some do-gooder will come along and fix it for you. This site is worse off now because of that. I also don't like the fact that this guy now might get positive results with the "eh, who cares, these weenies aren't worth the trouble" contempt he has shown us. I think we should insist on minimum standards and demand a minimum of respect. –  Olin Lathrop Jan 13 '12 at 21:31
@Olin - I agree somewhat, but thought I'd give someone a break this time. It's hard to tell whether it's not a language issue that's the cause of some messily presented questions, so I think a little leeway is in order sometimes. I'm not trying to be a "do-gooder" (I'm far from that, trust me :-) ) it was more to give an example of what is expected here. If it was not the OP's first question (on any of the stack sites) I wouldn't have bothered. –  Oli Glaser Jan 13 '12 at 21:47
@OliGlaser People with very broken English still have a sentence structure that makes sense. But there are sometimes it can be helpful to just edit to improve grammar. –  Kellenjb Jan 13 '12 at 21:54

2 Answers 2

I can see two ways of achieving this.

1-Using a technique called Charlieplexing to control your leds. With 10 output pins you would be able to control 90 normal leds. The main disadvantage with this technique is that the leds are not always on. They flash really fast, causing a reduction in the brightness of the leds. It's also a bit complicated to code and I'm not 100% certain that you could make it work on RGB leds.

2-Using Shift registers. Like this one. With shift registers you can ouput data in a serial fashion and output it in parallel. Depending on the number of pins you are willing to use, you'll have to buy more or less Shift registers. The main idea is something like: output the new states of the leds, one by one (separating your signals by outputting HIGH to the SRCLK) and then "applying changes" by outputing HIGH to RCLK. If you think about it, you can basically cascade to an infinite number of outputs. You'll need a lot of shift registers though and the response time will probably be slow.

share|improve this answer

If I were you I would use something like this:


These are 25 12mm RGB LEDs that you can drive through a simple serial interface. Just two general purpose IO pins can drive the entire strand. You get 256 intensity levels per component (24 bits per LED in total) and the built-in PWM driver makes them pretty much "set and forget". You can also connect multiple strands together, and address 50, 75, 100 or more LEDs. Just beware of the power requirements.

enter image description here

share|improve this answer

Your Answer


