Hi, I have „re-done” all of my tests and will reiterate the information here. I have swapped the matrix for an older but similar one, red LEDs this time, swapped the ESP32 board and set up the wiring again.
Unfortunately the links for buying either of this panels are not up anymore, but I have the specifications of the seller claimed they are saved.
LED Matrix Panel specs |
|
Pixel LED |
SMD |
Pixel Configuration |
1 Red |
Module Size |
320mm × 160mm |
Drive Mode |
Constant Current drive 1/4 scan |
Drive IC |
74HC595 |
I searched for these parameters on Aliexpress (the original source for my modules) and found this - https://www.aliexpress.com/item/32958466621.html It is not the listing or seller that I bought from but they seem identical. |
|
This particular matrix is tested as being 3.3v input signal tolerant as it has been properly driven by rpi-rgb-led-matrix with the custom mapping described here - Monochrome 32*16 P10 HUB12 LED matrix control with ESP32 - #10 by BodoMinea
It is also usable with the DMD2 library, at least with the older Arduinos, albeit those output 5V so it doesn’t really help as an arguent - GitHub - freetronics/DMD2: Beta release of a new Dot Matrix Display Arduino library
Picture of the panel’s back side
Chip namings correspond to what the seller listed.
Wiring
Please note that the sides of the connector as I see them are flipped because I am doing the wiring to the ribbon connector.
ESP32 |
|
HUB12 |
|
ESP32 |
GPIO5 |
A |
1 - 2 |
OE |
GPIO25 |
GPIO18 |
B |
3 - 4 |
GND |
GND |
GPIO19 |
C |
5 - 6 |
GND |
NC |
GPIO22 |
CLK |
7 - 8 |
GND |
NC |
GPIO26 |
SCK |
9 - 10 |
GND |
NC |
GPIO2 |
R |
11 - 12 |
GND |
NC |
NC |
E |
13 - 14 |
GND |
NC |
NC |
D |
15 - 16 |
GND |
NC |
Various test sketches
All of them start like this:
const uint16_t kMatrixWidth = 32;
const uint16_t kMatrixHeight = 16*2;
#define USE_ADAFRUIT_GFX_LAYERS
#include <MatrixHardware_ESP32_V0.h>
#include <SmartMatrix.h>
#define COLOR_DEPTH 24
const uint8_t kRefreshDepth = 36;
const uint8_t kDmaBufferRows = 4;
Also, all of them use the mono layer:
SMARTMATRIX_ALLOCATE_BUFFERS(matrix, kMatrixWidth, kMatrixHeight, kRefreshDepth, kDmaBufferRows, kPanelType, kMatrixOptions);
const uint8_t kGFXMonoLayerOptions = (SM_GFX_MONO_OPTIONS_NONE);
SMARTMATRIX_ALLOCATE_GFX_MONO_LAYER(backgroundLayer, kMatrixWidth, kMatrixHeight, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kGFXMonoLayerOptions);
#define BLACK 0x0000
#define RED 0xF800
The following test results are different attempts to understand what’s going on by displaying different things with different kMatrixOptions. kPanelType is always SMARTMATRIX_HUB12_16ROW_32COL_MOD4SCAN
.
backgroundLayer.setTextSize(2);
backgroundLayer.setTextColor(RED);
backgroundLayer.println("123");
with
SMARTMATRIX_OPTIONS_HUB12_MODE
:
same with
SMARTMATRIX_OPTIONS_HUB12_MODE | SMARTMATRIX_OPTIONS_ESP32_INVERT_CLK
:
same with
SM_HUB75_OPTIONS_INVERT_DATA
:
same with
SM_HUB75_OPTIONS_INVERT_OE
:
for(int j=0; j<kMatrixHeight; j++) {
for(int i=0; i<kMatrixWidth; i++) {
backgroundLayer.drawPixel(i,j,RED);
backgroundLayer.swapBuffers();
delay(250);
backgroundLayer.fillScreen(BLACK);
}
}
with SMARTMATRIX_OPTIONS_HUB12_MODE
:
same with SMARTMATRIX_OPTIONS_HUB12_MODE | SMARTMATRIX_OPTIONS_ESP32_INVERT_CLK
:
backgroundLayer.drawLine(0,0,kMatrixWidth,kMatrixHeight/2,RED);
with either SMARTMATRIX_OPTIONS_HUB12_MODE
or SMARTMATRIX_OPTIONS_ESP32_INVERT_CLK
:
Changing the clock speed only affects the extent of flickering and ghosting on the panels which tend to vary a bit between panels, but the bottom line is that no matter what I change - matrix options, the matrix itself, the esp32 etc. the stray/incorrect pixels are still there. However, the same ESP32 can correctly drive HUB75 panels using this library and these panels can be controlled with a Raspberry Pi. So I am at a loss, I cannot seem to isolate the issue.
Do you have any other ideas? Would you like to have one of these modules arranged to be shipped to you?
Thank you again for your time and work.