A 64x64 LED panel and an ESP32 look like an easy weekend project. Then you plug in the ribbon cable and get a black panel, half an image, or colours in the wrong places.
I build Frame, a 64x64 LED frame that shows photos sent from a phone. Inside there's an ESP32-S3 driving a HUB75 panel with the ESP32-HUB75-MatrixPanel-DMA library, on a board I designed myself. This guide is the wiring I wish I'd had at the start: the pins I use, where they come from, how to power the panel, and what each typical failure usually means.
The short answer
- A 64x64 panel needs the E line. It's a 1/32 scan panel, and many tutorials for 64x32 panels don't connect E at all.
- On an ESP32-S3, I use R1 4, G1 5, B1 6, R2 7, G2 15, B2 16, A 18, B 8, C 3, D 42, E 38, CLK 41, LAT 40, OE 2. Those are the library's S3 defaults, plus E on GPIO 38.
- On a classic ESP32, the library defaults are R1 25, G1 26, B1 27, R2 14, G2 12, B2 13, A 23, B 19, C 5, D 17, LAT 4, OE 15, CLK 16, and E is not assigned: you have to pick a free pin and set it.
- Power the panel from its own 5 V supply, never from the 5 V pin of an ESP32 board running on USB, and join the grounds.
- Most "it doesn't work" cases are a missing or wrong E pin, power, or swapped colour pins in the config.
What a 64x64 HUB75 panel is
HUB75 is the name of the 16 pin connector on the back of most indoor RGB LED panels. The panel has no memory of its own: you shift in one row of colour data, latch it, light it, and move to the next row, fast enough for your eye to see a steady image.
A 64x64 panel with 1/32 scan lights two rows at once, one in the top half and one in the bottom half. That's why there are two sets of colour pins: R1, G1 and B1 feed the top half, R2, G2 and B2 the bottom half. To choose which of the 32 row pairs is lit, the panel needs five address lines, A, B, C, D and E (2⁵ = 32). A 64x32 panel only needs 16 row pairs, so it uses four lines and leaves E out.
The panel in Frame is a 64x64, 1/32 scan panel with Chipone ICN2037BP driver chips. The library README lists the ICN2037 among the standard shift register drivers it works with, so I didn't need any special driver setting.
The HUB75 pins and the ESP32 GPIOs

This is an illustration, not a photo of my board. The pin order on the physical connector changes between manufacturers, so always go by the labels printed next to the connector on your panel, and plug into the input (there's usually an arrow showing the direction).
| HUB75 signal | What it does | ESP32-S3 (Frame v2) | Classic ESP32 (library default) |
|---|---|---|---|
| R1, G1, B1 | Colour data, top half | 4, 5, 6 | 25, 26, 27 |
| R2, G2, B2 | Colour data, bottom half | 7, 15, 16 | 14, 12, 13 |
| A, B, C, D | Row address | 18, 8, 3, 42 | 23, 19, 5, 17 |
| E | Fifth row address (64 rows) | 38 | not set (-1) |
| CLK | Clock for the colour data | 41 | 16 |
| LAT | Latch: copies the shifted row to the LEDs | 40 | 4 |
| OE | Output enable, active low: LEDs on when it's low | 2 | 15 |
| GND | Ground | GND | GND |
Where these numbers come from:
- The ESP32-S3 column is the pin map of Frame's current hardware (v2, an ESP32-S3-WROOM-1), straight from my firmware. When I checked it against the library, it turned out to be the library's own S3 default map, except for E, which the library leaves unassigned. I put E on GPIO 38.
- The classic ESP32 column is the default map in the library source,
src/platforms/esp32/esp32-default-pins.hpp, as of version 3.1.1 (the current one when I'm writing this). E is-1there, with a comment saying you must change it for a 64x64 panel. My first board (v1) used a classic ESP32 with these defaults and E on GPIO 18.
On the S3, don't move pins around at random: some GPIOs are taken by the flash and PSRAM on many modules. The library's S3 defaults already avoid them, and the S3 folder of the library includes a picture of the reserved pins.
Where the E pin is on the connector
On 64x32 panels, pin 8 of the connector is usually a ground. On many 64x64 panels that same position carries E, and on some it's pin 4 instead. The rpi-rgb-led-matrix wiring guide says E is "typically on Pin 4 or 8", and Adafruit's HUB75 boards for the Raspberry Pi have a jumper or a switch to choose between the two. So if you reuse an adapter or a cable made for 64x32 panels, check that E really reaches the panel and isn't tied to ground.
Power: the part that bites later
An LED panel can draw far more current than an ESP32 board can pass through. Some figures from manufacturers of 64x64 panels:
- Adafruit says on its 64x64 panel page that you may need up to 4 A per panel, and suggests a 5 V 4 A adapter.
- Waveshare lists its P3 64x64 panel at 5 V, 4 A input and 20 W or less, and warns that an underpowered supply can cause IO malfunction.
If your panel has no datasheet, you can estimate. With 1/32 scan only two rows are lit at any moment, so the peak is roughly 128 pixels at full white times the current of one pixel. Adafruit's guide for its matrix bonnet says each pixel can briefly draw up to 0.06 A at full white, which would give about 7.7 A in the absolute worst case. The manufacturers above rate their 64x64 panels at 4 A, so real panels stay well below that worst case; how far below depends on the current the driver chips are set to. Treat 4 A at 5 V as a reasonable figure for one 64x64 indoor panel, and if you want to be sure, measure the current on the 5 V line with the panel showing full white at full brightness.
What I'd do on any build:
- A separate 5 V supply for the panel, rated for the current above, connected to the panel's own power connector with short, thick wires. The thin wires of jumper kits aren't made for several amps.
- Never power the panel from the 5 V pin of an ESP32 board that runs on USB. That pin comes from the USB port, which can deliver a small fraction of what the panel asks for.
- A common ground. The ESP32 GND must be connected to the panel's ground, or the data lines have no reference.
- A big capacitor at the panel. The library README recommends soldering 1000 to 2000 µF across VCC and GND on the back of each panel. My panel already carries 220 µF capacitors on its power input; for the next version of my board I've written down at least 1000 µF next to the panel.
What happened to me
The v2 board of Frame powers the ESP32-S3 and the panel from the same supply, and that supply runs close to its limit. It's close enough that my firmware disables the brownout detector on v2 on purpose, as the first line of setup().
On one unit, with poor Wi-Fi and heavy animation downloads, the frame chained crashes of different kinds: a spinlock assert inside the Wi-Fi interrupt, a LoadProhibited, an exception with a corrupted stack, and watchdog resets with no trace. I decoded the backtraces and none of them went through my own code, and the same firmware ran for hours without a crash on a good network. That pattern points to memory corruption from voltage drops, not to a software bug. I still have to confirm it by repeating the test with a stronger supply, so take it as a strong suspicion, not a proven cause.
What I've written down for the next board, and what I'd suggest if you design your own:
- A 3.3 V regulator just for the ESP32, not shared with the panel.
- 1000 µF or more next to the panel, and 220 to 470 µF at the regulator.
- Wide 5 V traces or a plane, with the panel's return current not passing under the ESP32 module.
- The antenna away from the HUB75 ribbon and with no copper under it.
- The brownout detector back on once the supply is solid.
The library README also warns that the fast DMA signals can interfere with Wi-Fi on some board designs, so keeping the ribbon away from the antenna helps on both fronts.
Starter code
This is the minimum to light a 64x64 panel with the library on an ESP32-S3, with the same pins as the table. The field names are from the library source (HUB75_I2S_CFG in ESP32-HUB75-MatrixPanel-I2S-DMA.h).
#include <ESP32-HUB75-MatrixPanel-I2S-DMA.h>
#define PANEL_RES_X 64
#define PANEL_RES_Y 64
#define PANEL_CHAIN 1
MatrixPanel_I2S_DMA *dma_display = nullptr;
void setup() {
HUB75_I2S_CFG mxconfig(PANEL_RES_X, PANEL_RES_Y, PANEL_CHAIN);
mxconfig.gpio.r1 = 4; mxconfig.gpio.g1 = 5; mxconfig.gpio.b1 = 6;
mxconfig.gpio.r2 = 7; mxconfig.gpio.g2 = 15; mxconfig.gpio.b2 = 16;
mxconfig.gpio.a = 18; mxconfig.gpio.b = 8; mxconfig.gpio.c = 3;
mxconfig.gpio.d = 42; mxconfig.gpio.e = 38; // E: required for 64x64
mxconfig.gpio.clk = 41; mxconfig.gpio.lat = 40; mxconfig.gpio.oe = 2;
mxconfig.clkphase = false; // what my panel needs; try true if the image is shifted
// mxconfig.driver = HUB75_I2S_CFG::FM6126A; // only for panels with that chip
dma_display = new MatrixPanel_I2S_DMA(mxconfig);
dma_display->begin();
dma_display->setBrightness8(64); // 0 to 255; start low while testing
dma_display->clearScreen();
dma_display->drawRect(0, 0, 64, 64, dma_display->color565(255, 255, 255));
dma_display->drawPixel(0, 0, dma_display->color565(255, 0, 0)); // top left: red
dma_display->drawPixel(63, 63, dma_display->color565(0, 0, 255)); // bottom right: blue
}
void loop() {}
A few notes:
- On an ESP32-S3 with these pins you could skip every line except
mxconfig.gpio.e = 38, because the rest are already the defaults. I write them all out so it's obvious what goes where when you rewire. - On a classic ESP32 with the default wiring, the only line you need is
mxconfig.gpio.e = ...with the free pin you chose for E. - The white border and two coloured corners are a quick test: if the border is complete and the red dot is top left, the wiring and the orientation are right.
clkphaseistrueby default in the library. My panel works withfalse; if yours shows the image shifted by one pixel or ghosting, flip it.driverisSHIFTREGby default, which is right for standard driver chips like mine. Some panels use chips such as the FM6126A that need an init sequence; the enum hasFM6124,FM6126A,ICN2038S,MBI5124andDP3246. Check the chip markings on the back of your panel.i2sspeedis 10 MHz by default. In Frame I runHZ_20M, but with loose jumper wires I'd start at the default.
In PlatformIO, the library is mrfaptastic/ESP32 HUB75 LED MATRIX PANEL DMA Display in lib_deps, together with adafruit/Adafruit GFX Library. In the Arduino IDE, search for "ESP32 HUB75 LED MATRIX PANEL DMA Display" in the Library Manager.
Common problems and how to fix them
The panel stays black
- No power, or not enough. Check that the panel has its own 5 V and that the supply can deliver the current. A panel powered only through the data ribbon won't light.
- OE not connected or on the wrong pin. OE is active low: if it never goes low, the LEDs never turn on.
- Plugged into the output connector. Panels have an input and an output for chaining; use the input.
- Brightness at zero or
begin()failing. Print the return value ofbegin()and check the serial log.
Only half the panel lights, or the image repeats
This is almost always the E line. Either E isn't set in the config (it's -1 by default on the classic ESP32), it's wired to the wrong pin of the connector, or your adapter ties pin 8 to ground because it was made for 64x32 panels. Set mxconfig.gpio.e, follow the wire to the pin labelled E on your panel and check it with a multimeter.
If several rows light up at the same time and E is correct, your panel may use a different row decoder. The library README has a line_decoder setting for that (TYPE138 by default, TYPE595, TYPE_DIRECT, SM5266P).
The colours are swapped
Red shows as blue, or green as red. Some panels are wired internally with a different colour order. You don't need to resolder anything: swap the numbers in the config (for example, give gpio.r1 and gpio.b1 each other's pins, and the same for r2 and b2) until a pure red pixel shows red.
Noise, flickering pixels or ghosting
- Long or loose cables. Keep the HUB75 ribbon short. The ESP32 outputs 3.3 V signals, and the library README notes that some panels need 5 V logic and a level shifter if 3.3 V isn't read reliably.
- Clock edge. Flip
clkphase. - Too fast a clock. Lower
i2sspeed(toHZ_8MorHZ_10M) and see if the noise goes away. - Pixels repeated horizontally. The README suggests adjusting
latch_blanking(1 to 8).
If the panel looks fine to the eye but shows bands or flicker when you film it with your phone, that's a different problem with a different fix. I wrote a whole guide on it: why your HUB75 LED panel flickers on camera.
The ESP32 resets when Wi-Fi connects
Wi-Fi transmission causes current spikes, and if the ESP32 shares a weak supply with the panel, the voltage drops and the chip resets, or worse, keeps running with corrupted memory, which is what I suspect happened on my v2 board. Power the panel separately, add the capacitor, use thick wires and a common ground, and test with a dark image and a bright one: if the resets only happen with a bright image, it's power.
The panel flashes with garbage when it boots
The panel lights whatever its pins say at every instant. From reset until the library takes control, the pins float, the row lines pick a row from noise, and OE (active low) lets it show. On Frame this showed up as a couple of white lines for a few seconds on every boot.
The first fix is in software: the first thing my setup() does is set OE high and the other panel pins low, before anything else.
pinMode(OE_PIN, OUTPUT);
digitalWrite(OE_PIN, HIGH); // OE is active low: HIGH keeps the LEDs off
On my board that took the flash from about 3.3 seconds to about 0.3 seconds. What's left happens in the bootloader, before any of your code runs, so software can't fix it. The real fix is a pull-up resistor on OE, which keeps the panel off from the moment of reset. It's on the list for my next board.
If you don't want to solder
I enjoy all of this, but I know most people who want a 64x64 panel at home don't want to debug a ribbon cable. That's why I build Frame: a frame with a 64x64 LED panel where the people you love send photos from a free app (iPhone and Android, no subscription), and they show up on your Frame wherever they are. I'm building it on my own, and you can read the whole story here.
You can't buy Frame yet. It launches on Kickstarter on February 1, 2027. Reserving a Founders spot costs 1 € and gets it for 75 € ($85 in the US and Canada).
If you're building your own panel, you might also like my guides on what to draw on a 64x64 canvas, converting a photo to 64x64 pixel art and Tidbyt alternatives.
Summary
- 64x64 HUB75 panels are 1/32 scan and need the E line, usually on pin 8 of the connector, sometimes pin 4.
- On an ESP32-S3, the library defaults plus E on GPIO 38 are what Frame uses.
- On a classic ESP32, the defaults leave E unset: pick a free pin and set
mxconfig.gpio.e. - Power the panel from its own 5 V supply (plan for about 4 A), join the grounds, use thick wires and a big capacitor.
- Black panel: power or OE. Half the image: E. Wrong colours: swap pins in the config. Noise: shorter cables,
clkphase, slower clock. - Resets on Wi-Fi are usually power; a pull-up on OE stops the boot flash.
And if you'd like a 64x64 panel at home that lights up with photos from the people you love, without wiring anything, leave your email below. People on the list get the link on launch day, and whoever reserves gets it for 75 € ($85).
Best,
Álvaro M.

