This HAT uses a lot of pins to drive the RGB Matrix. You'll still have a couple left over but just be aware a majority are in use by the matrix.

Unused GPIO pins include: RX, TX, 25, MOSI, MISO, SCLK, CE0, CE1, 19.

Pin 24 is free if you are not using a 1/32 scan (i.e. 64x64) matrix.

Pin 18 is free if using the “convenience” (vs “quality”) setting during installation.

The 1-Wire interface as enabled by raspi-config will interfere with the operation of the matrix! By default it uses pin 4. If you are connecting any 1-Wire devices, specify a different pin (any of the above) in /boot/config.txt, for example:

dtoverlay=w1-gpio gpiopin=19

I2C / RTC pins

The DS1307 Real Time Clock soldered onboard is connected to the I2C pins SDA and SCL - these can still be used for other I2C sensors and devices as long as they are not on address 0x68

To use the Real Time Clock, a CR1220 3V lithium battery is required.

5V protection circuitry and backpower diode

LED matrix panels require 5V power and a lot of it! 5V 2A at a minimum and you can easily need a 5V 4A or 5V 10A supply for big stretches of panels!

Each matrix has 64 pixels (16x32 or 32x32 panels) or 128 pixels (for the 32x64 panels) lit at one time. Each pixel can draw up to 0.06 Amps each if on full white. The total max per panel is thus 64 * 0.06 = 3.95 Amps or 128 * 0.06 = 7.68 Amps

That's if all the LEDs are on at once, which is not likely - but still, its good to have at least half for the power supply in case you get bright!

5V power from a wall plug goes into the DC jack on the HAT which then goes through a fancy protection circuit that makes sure the voltage is not higher than 5.8V - this means that if you accidentally grab a 9V or 12V plug or a reverse polarity plug you will not damage the HAT, Pi and panels.  (Please note, this does not protect against extreme damage, if you plug in a 120VAC output into the DC jack or continuously try to plug in the wrong voltage you could still cause damage so please do be careful!)

We recommend powering your driving Raspberry Pi from the Pi's microUSB port but we do have a 1A diode on board that will automatically power the Pi if/when the voltage drops. So if you want, just plug in the 5V wall adapter into the HAT and it will automagically power up the Pi too!

The green LED next to the DC jack will indicate that the 5V power is good, make sure it is lit when trying to use the HAT!

Matrix Drive pins

The matrix does not work like 'smart' pixels you may have used, like NeoPixels or DotStars or LPD8806 or WS2801 or what have you. The matrix panels are very 'dumb' and have no memory or self-drawing capability.

Data must be constantly streamed to the matrix for an image to display! So all of these pins are always used when drawing to the display

All these pins go thru a 74AHCT145 level shifter to convert the 3.3V logic from the Pi to the 5V logic required by the panels

Matrix Color Pins

  • Pi GPIO #5 - Matrix R1 (Red row 1) pin
    This pin controls the red LEDs on the top half of the display
  • Pi GPIO #13 - Matrix G1 (Green row 1) pin
    This pin controls the green LEDs on the top half of the display
  • Pi GPIO #6 - Matrix B1 (Blue row 1) pin
    This pin controls the blue LEDs on the top half of the display
  • Pi GPIO #12 - Matrix R2 (Red row 2) pin
    This pin controls the red LEDs on the bottom half of the display
  • Pi GPIO #16 - Matrix G2 (Green row2) pin
    This pin controls the green LEDs on the bottom half of the display
  • Pi GPIO #23 - Matrix B2 (Blue row 2) pin
    This pin controls the blue LEDs on the bottom half of the display

Matrix Control pins

  • Pi GPIO #4 - Matrix OE (output enable) pin
    This pin controls whether the LEDs are lit at all
  • Pi GPIO #17 - Matrix CLK (clock) pin
    This pin is the high speed clock pin for clocking RGB data to the matrix
  • Pi GPIO #21 - Matrix LAT (latch) pin
    This pin is the data latching pin for clocking RGB data to the matrix

RGB Matrix Address pins

  • Pi GPIO #22 - Matrix A (address A) pin
    This pin is part of the 1->16 or 1->8 multiplexing circuitry.
  • Pi GPIO #26 - Matrix B (address B) pin
    This pin is part of the 1->16 or 1->8 multiplexing circuitry.
  • Pi GPIO #27 - Matrix C (address C) pin
    This pin is part of the 1->16 or 1->8 multiplexing circuitry.
  • Pi GPIO #20 - Matrix D (address D) pin
    This pin is part of the 1->32, 1->16 multiplexing circuitry. Used for 32-pixel and 64-pixel tall displays only
  • Pi GPIO #24 - Matrix E (address E) pin
    This pin is part of the 1->32 multiplexing circuitry. Used for 64-pixel tall displays only. Present on newer “Rev C” HATs only. Requires minor soldering, explained on next page.

This guide was first published on Jan 16, 2015. It was last updated on Mar 08, 2024.

This page (Pinouts) was last updated on Mar 08, 2024.

Text editor powered by tinymce.