# Bicolor/RGB 2x2 LED Matrix?

I'd like to make a bicolor/RGB LED matrix, for this example I'll use 2x2 in size.

Suppose I have this matrix arrangement, without any wiring yet, only the LEDs:

I want to make each LED programmable. I have this in mind:

I tried to turn 0,0 to red and 1,1 to red too. For only 0,0, I can easily connect the pin 0 and pin 5 to the power source, but when I tried to add 1,1 with connecting pin 2 and pin 6, every LED is on.

Where is my mistake in the circuit? Thank you very much, I'd appreciate any answers given.

• There's no pin 0 shown. – Richard the Spacecat Jul 25 '18 at 13:35
• What you need to do is multiplexing - that is not applying power to all LEDs at once, but only to one set of LEDs at a time, but only for a short period, so the whole array still seems as if it were lit at the same time. – Richard the Spacecat Jul 25 '18 at 13:36
• see this .... wiring.org.co/learning/basics/rgbled.html – jsotola Jul 25 '18 at 16:02
• Is it bicolor/ or tricolor/RGB ? You only have 3 pins so that implies bicolor not RGB, also by convention + is red not - on protoboard it is reversed – Tony Stewart Sunnyskyguy EE75 Jul 25 '18 at 18:36

As you are sharing the control signals, you need to investigate multiplexing, whereby you quickly cycle thru each LED and turn on the one you want lit, and leave off those you do not want lit.

Or, just use a shift register, they have 8 outputs and then you can control each LED individually. Are these common anode or common cathode dual LEDs? MIC2981 would be good for common cathode, and TPIC6C595 would be good for common anode.

Don't forget current limit resistors for each LED, 270 ohm to 1K would be good generally.

Alternately, you can make a matrix using WS2812B RGB LEDs. Power & Gnd goes to all LEDs. Each LED has Data In and Data Out, the control signal is passed from LED to LED to minimize wiring. Adafruit.com carries SMD LEDs, and SMD LEDs on little circuit boards. Sparkfun.com carries thru-hole versions of the LEDs. Adafruit has a Neopixel library for driving them with an Arduino, and there is another library called FastLed.h for driving them also.