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:

LEDs, with coordinates of 0-index <code>(row, column)</code>. Black is cathode, red is red color anode, and blue is blue color anode.

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

enter image description here

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.

  • \$\begingroup\$ There's no pin 0 shown. \$\endgroup\$ Jul 25, 2018 at 13:35
  • \$\begingroup\$ 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. \$\endgroup\$ Jul 25, 2018 at 13:36
  • \$\begingroup\$ see this .... wiring.org.co/learning/basics/rgbled.html \$\endgroup\$
    – jsotola
    Jul 25, 2018 at 16:02
  • \$\begingroup\$ 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 \$\endgroup\$ Jul 25, 2018 at 18:36

2 Answers 2


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.