RGB Panel Hookup Guide

Pages
Contributors: jimblom
Favorited Favorite 11

Hardware Hookup

Before we can get into the code portion, there's quite a bit of wiring to do. The RGB panels have a pair of 16-pin (2x8) IDC connectors, and we need to wire up to most of those pins. Conveniently, both panels have the connector pins labeled (the unlabeled pins are ground). As we're hooking up to the panel, make sure you use the connector labeled Input. The labeling may be slightly different depending on the manufacturer.

Connector labels on panel

Connector labels on a 32x32 panel. 16x32 has the same layout, except that D is a no connect (NC) instead. 32x64 has the same layout but no labels.

Note to 16x32 Panel Users: The 32x16 panel has the exact same pinout as the 32x32, except there is no "D" pin. Instead of "D", that pin (12 on the connector) is a no connect (NC), you can leave it alone.
Labels on 32x64 and 16x32 Panel Users: On top of that, some panels do not have labels on the connector pins -- instead there is an arrow (◄) indicating pin 1, in the top-left corner of the connector (it's obscured by the frame, but visible if you peek in at the right angle). That pin 1 arrow indicator points to the "R0" pin, and the pinout follows that of the 32x32 panel from there. We have also seen panels come with their pins label G1, G2, R1, R2, B1 & B2 instead of G0, G1, R0, R1, B0 & B1. The wiring will be the same for both cases by connecting to the connector on the left.

Hookup Table

Here are the pin connections between LED panel connector and Arduino:

Panel Pin Label Cable Connector Pin # Arduino Uno (Atmega328P)
Pin
Arduino Mega 2560
Pin
Notes
R0 1 2 24 Red Data
(columns 1-16)
G0 2 3 25 Green Data
(columns 1-16)
B0 3 4 26 Blue Data
(columns 1-16)
GND 4 GND Ground
R1 5 5 27 Red Data
(columns 17-32)
G1 6 6 28 Green Data
(columns 17-32)
B1 7 7 29 Blue Data
(columns 17-32)
GND 8 GND Ground
A 9 A0 Demux Input A0
B 10 A1 Demux Input A1
C 11 A2 Demux Input A2
D 12 A3 Demux Input E1, E3 (32x32 panels only)
CLK 13 11 LED Drivers' Clock
STB 14 10 LED Drivers' Latch
OE 15 9 LED Drivers' Output Enable
GND 16 GND Ground

For a more step-by-step approach, follow along below. We use male-to-male premium jumper wires to wire between the included ribbon cable and our Arduino.

Connect Data Pins: R0, B0, G0, R1, G1, and B1

These LED driver (shift register) data pins are hard-coded in the Arduino library and can't be moved. As listed in the table above, R0, G0, B0, R1, G1, and B1 go to the Arduino Uno's pins 2 through 7 respectively. If you're wiring the panel up to an Arduino Mega, these pins should be connected to pins 24-29 respectively.

For reference when wiring the pins, try looking down at the IDC connector with red wire on top. The cable connector's pin 1 is relative to the top right. If you look really closely at the molding, you may also arrow (◄) pointing to that pin. Also, note that the tab for polarity is on the right side on either end of the cable.

IDC Cable Connector Polarity.

IDC Connector Highlighted w/ Arrow Pointing to Pin 1

Once you decide what side to connect, start wiring pin 1 by connecting a red wire for R0. Then connect pin 2 by connecting a green wire for G0. After connecting pin 3 using a blue wire for B0, continue wiring the pins based on the hookup table.

Start Wiring

To help keep track of what side you are connecting to, feel free to label your connections with a marker.

Label Your IDC Conenctor with a Marker

Connecting the Clock Pin

This is the last pin that has some restriction on where it can go -- it must be connected to one of Arduino's port B pins. That means it must be either 8, 9, 10, 11, 12, or 13. The example code has it defined as pin 11 in the hookup table. Make sure to check your pin definition for the clock as it may vary with the code you are using.

Connecting to A, B, C, (D for 32x32 users), OE, and STB Pins

These five (or six if you're using a 32x32 matrix) pins can be plugged in anywhere you may have space on your Arduino. Although, there's probably not a lot of room left... We chose to stick A, B, and C in pins A0, A1, and A2 respectively. OE connects to pin 9. STB to pin 10. And, if you're using a 32x32 matrix, D goes to A3 as stated in the hookup table.

Feel free to swap those up if your application requires. Just make sure you switch it up in the example code too.

Connecting to Ground(s) Pins

Last, but certainly not least (well, maybe, if we're talking about potential) is ground. There are three unlabeled pins on the connector which should all be tied to ground.

If you don't have anything else plugged into them, there should be three ground pins available on your Arduino. If you're struggling to find ground pins, though, you should be able to get away with only plugging one of the ground pins to your Arduino. Woo color coded wires!

Cables connected from panel to Arduino

Power

Once you are finished connecting the LED panel to an Arduino, add your 5V power supply to the panel's power connector. Don't forget to add power to your Arduino!

16x32 Fully Connected to the RedBoard 32x32 Fully Connected to the Arduino Mega 2560

Connecting to 32x64 RGB LED Panels

For anyone connecting to the 32x64 RGB Panels, you will need to use an Arduino Mega 2560 with the library. Otherwise, the panels will not be able to display as expected due to the limitations of the library and the Arduino Uno.

To daisy chain two 32x32 RGB matrices together, connect another IDC cable from the output of the first panel to the input of the second panel. Then connect the second 4-pin polarized connector to the input power connector. After modifying the test_shapes_32x64.ino, the display will output as a 32x64 matrix as shown below.

Arduino Mega with two 32x32 RGB LED Matrices for an array of 32x64

Here's an example with the 32x64 matrix with 4mm pitch.

Arduino Mega with 32x64 RGB LED Matrix

When using an array higher than 32x64, another library would be a better option with a Teensy 3.0+, FPGA, or Raspberry Pi. You may need to level shift to convert 3.3V to 5V for the RGB LED panel to recognize the I/O signals. For more information, check out the links in the Resources and Going Further.

Custom Shield Adapter

If you have a prototyping shield, try making a custom shield adapter for a more secure connection. Here's an example of using an XBee shield's prototyping area with the connection specifically for the RGB LED panels. Follow the steps outlined above but solder the connection together.

Custom Shield Adapter

Magnetic Mounts

Depending on the supplier, you may receive a set of magnetic mounts. Add it to the panel's mounting holes to stick on a fridge or metal wall! They also work great as a standoff. Just make sure to secure and insulate your wires to prevent any shorts if there is metal behind the panel.

Magnetic Mounts