P4(1921)-80x40-10S-V20 matrix and the SmartMatrix library

Does anyone have experience with the P4(1921)-80x40-10S-V20 matrix and the SmartMatrix library?

I am using an ESP32 without an external latch and custom pinout to HUB75 with another similar matrix - P4-2121-80x40-20S-HT1.0, for this I needed to add a new linear SM_PANELTYPE in MatrixCommonHub75.h file with the parameters:
MATRIX_PANEL_HEIGHT 40
ROW_PAIR_OFFSET 20
MATRIX_SCAN_MOD 20
COLS_PER_PANEL 40

With these parameters, this module worked well, but I need to connect the aforementioned P4(1921)-80x40-10S-V20, instead (in all likelihood, MATRIX_SCAN_MOD should be 10 for it). It is built on SM16208SC chip.
I’ve tried iterating through all the options, but I can’t seem to find a working set of options.

Please help me choose the right parameters.

Thanks in advance

I’m experiencing something very very similar with my 96*48 panel running on a 6124D chips and a Teensy 4.1 & V5 shield.

I’m hoping someone sees this soon.

SOLVED!
For my matrix P4(1921)-80x40-10S-V20 in MatrixCommonHub75.h file added new SM_PANELTYPE - SM_PANELTYPE_HUB75_40ROW_80COL_MOD10SCAN with parameters:
MATRIX_PANEL_HEIGHT 40
ROW_PAIR_OFFSET 20
MATRIX_SCAN_MOD 10
COLS_PER_PANEL 80

And in file MatrixPanelMaps.cpp for SM_PANELTYPE_HUB75_40ROW_80COL_MOD10SCAN case added map:

const PanelMappingEntry panelMap80x40Mod10 =
{
{0, 7, -8},
{0, 23, -8},
{0, 39, -8},
{0, 55, -8},
{0, 71, -8},
{0, 87, -8},
{0, 103, -8},
{0, 119, -8},
{0, 135, -8},
{0, 151, -8},
{10, 8, 8},
{10, 24, 8},
{10, 40, 8},
{10, 56, 8},
{10, 72, 8},
{10, 88, 8},
{10, 104, 8},
{10, 120, 8},
{10, 136, 8},
{10, 152, 8},
{0, 0, 0}
};

All works well

Regards

P.S.
For the matrix P4-2121-80x40-20S-HT1.0, a new SM_PANELTYPE - SM_PANELTYPE_HUB75_40ROW_80COL_MOD20SCAN has been added to the MatrixCommonHub75.h file with the following parameters:
MATRIX_PANEL_HEIGHT 40
ROW_PAIR_OFFSET 20
MATRIX_SCAN_MOD 20
COLS_PER_PANEL 80 //here is my mistake in the main post - sorry please

And in the MatrixPanelMaps.cpp file for SM_PANELTYPE_HUB75_40ROW_80COL_MOD20SCAN case has been added:

const PanelMappingInput PanelMap80x40Mod20 =
{
{0, 0, 80},
{0, 0, 0}
};

P4(1921)-80x40-10S-V20 is an outdoor module, when P4-2121-80x40-20S-HT1.0 is indoor, the first one is built on 60 pcsSM16208SC chips, and the second one is built on 30 pcs FM6124 chips, these chips seem similar, but the first matrix makes 2 times more scans, and as a result, it is brighter. Therefore, the architecture of the modules is different, which requires different pixel mapping.

Good luck to all!

1 Like

Please recall where the format of such a lookup table is described?

In example MultiRowRefreshMapping

hello @Irakli_Jibladze i have P4 84*40 panel and want connect to esp8266 can use same libary that u use ,can you share your code and wiring

can you share your code, because i have some problem when connecting esp32 with P4 80x40 RGB Led Panel with smart matrix library.

Sorry for the delay,
Unfortunately I don’t know P4 84*40 modules, and I haven’t worked with esp8266, so I can’t give specific recommendations.
In any case, you can try to modify the libraries described in my post, I think the principles will be similar.
But in any case, you need to know how your modules are organized - in particular the scanning mode, which driver chips and decoding chips are used, and most importantly, you need to know how the logical pixels are distributed in the physical matrix, the so-called Pixel Mapping, and rework the library accordingly.

My project is very large, there is an Ethernet module and a web application, and requests, etc., and only a small part of the project is related to LED matrix. If I post the whole project to you, it will confuse you more, so it’s better in parts.

As a test, you can use the FeatureDemo.ino sketch from SmartMatrix examples, everything works there. I will give it in already modified form - SmartMatrix_test_all_Features_HUB75.ino.

The rest of the files that I post, you should find in your system and replace with mine, I had them in C:\Users\my_name\Documents\Arduino\libraries\SmartMatrix-master\src

In the MatrixHardware_ESP32_V0.h file you find the ESP32 → HUB75 layout. Here is also schematic with latch.

In the MatrixCommonHub75.h file, I added my modules (at different times I came across 4 types of modules of different architectures), all of them are at the beginning of the list.
The MatrixPanelMaps.h file is related to the previous one, and describes the pixel mapping for each matrix type.

You can modify these files as you need.

But you should know the pixel mapping (how the logical pixels are distributed in the physical matrix), sometimes you can get it from the module supplier, and sometimes I had to find it myself, for this I used the C-Power controller from “Shenzhen Lumen Electronics”. With its “LedCenter” software it allows you to find the pixel mapping.

If your module uses 138-type chips for decoding lines (these are ordinary multiplexers-decoders), then everything should work for you thanks to the above, but if shift registers are used for decoding, for example DP32020, then you will need to add a device for converting line selection signals. It can be made on an Arduino Nano, for this following post will be useful.

You can download my files from this link

I wish you good luck,
Write if anything, I will try to help.

The conversion easily can be done by software, as it used in PxMatrix, ESP32-HUB75-MatrixPanel-DMA library or in my code in DMD_STM32 lib

Can you show what exactly to change in SmartMatrix library?

no, I am not familiar with SmartMatrix code.
I could show a shift matrix decode function from the my library. The function have been tested with DP32020 decoder (and many others of 595 type)

void set_mux(uint8_t curr_row) override {
		byte pin_DMD_A = this->mux_pins[0];
		byte pin_DMD_B = this->mux_pins[1];
		byte pin_DMD_C = this->mux_pins[2];
		// Just shift the row mux by one for incremental access
		digitalWrite(pin_DMD_B, HIGH);
		digitalWrite(pin_DMD_C, (curr_row == 0)); // Shift out 1 for line 0, 0 otherwise
		digitalWrite(pin_DMD_A, HIGH); // Clock out this bit
		digitalWrite(pin_DMD_A, LOW);
		digitalWrite(pin_DMD_B, LOW);
	}

Thank you very much )))