Help needed with creating a new kPanelType for P5 64x32 1/8 scan!

Hello !

I’m having trouble understanding what do I need to do to create a new kPanelType to use with my 64x32 LED Display.
One of the issues is that I am not certain what row scan this display uses. I couldn’t find this model online. I received it as part of a project. It previously worked with 1/8 scan with PxMatrix using A, B, C, D, E pins.

I am using ESP32 Wrover-B DevKitV4 together with a breadboard and no Logic Level Shifters or Shields.
I believe the Display is tolerant enough to work without LLS, because I made it work with PxMatrix, but, in any case, I have a couple of those at hand.

I’ve read the MultiRowRefreshMapping.ino several times, and I have some questions regarding the test.

The test is very strange, because it requires a kPanelType value. WHY ? If this is a tool for creating a kPanelType why does it need one ?

It says

const uint8_t kPanelType = SMARTMATRIX_HUB75_4ROW_MOD2SCAN;   // Use this to reverse engineer mapping for a MOD2 panel
//const uint8_t kPanelType = SMARTMATRIX_HUB75_8ROW_MOD4SCAN;   // Use this to reverse engineer mapping for a MOD4 panel

But what do I write for my 64x32 1/8 panel ? There is nothing to write…

I understand that for 64x32 1/8 I need kMatrixHeight = 16 and kMatrixWidth = 128 but when changing to these values the display is black, because there isn’t a kPanelType value corresponding with those values.

kMatrixHeight = 8 works with kPanelType = SMARTMATRIX_HUB75_8ROW_MOD4SCAN; .

kMatrixHeight = 4; works with kPanelType = SMARTMATRIX_HUB75_4ROW_MOD2SCAN;

What is the value of kPanelType for 1/8 scan ?

Any thoughts ? Thank you !

LATER EDIT:

This is what it looks like SmartMatrix_take1 - YouTube
with the following code:

#if (SKETCH_MODE == MODE_MAP_REVERSE_ENGINEERING)
const uint8_t kMatrixWidth = 128;        // known working: 16, 32, 48, 64
const uint8_t kMatrixHeight = 8;       // known working: 32, 64, 96, 128
//const uint8_t kPanelType = SMARTMATRIX_HUB75_4ROW_MOD2SCAN;   // Use this to reverse engineer mapping for a MOD2 panel
const uint8_t kPanelType = SMARTMATRIX_HUB75_8ROW_MOD4SCAN;   // Use this to reverse engineer mapping for a MOD4 panel
#endif

It’s the same with the following code:

#if (SKETCH_MODE == MODE_MAP_REVERSE_ENGINEERING)
const uint8_t kMatrixWidth = 128;        // known working: 16, 32, 48, 64
const uint8_t kMatrixHeight =4;       // known working: 32, 64, 96, 128
const uint8_t kPanelType = SMARTMATRIX_HUB75_4ROW_MOD2SCAN;   // Use this to reverse engineer mapping for a MOD2 panel
//const uint8_t kPanelType = SMARTMATRIX_HUB75_8ROW_MOD4SCAN;   // Use this to reverse engineer mapping for a MOD4 panel
#endif

Hi Georg, I must have the same display as you (64x32 8S), because when I enter the lines of code from you, I get the same pattern.
Would you tell me your solution, would help me tremendously.
Thanks in advance

I added some documentation on how to figure out custom mapping:

If you’re working through this and need help, please post back with details

@GeorgeFlorian
I have the same pannel, i would apreciate if you could share your solution.

Hi Georg, thanks for getting in touch. I passed on the display, and am now using 64x32 with 1/32,
so it works. Thanks a lot

@GeorgeFlorian and @technikfreak is this solution available so I can include it in the library for others?

with the settings from this entry
Can't link up two(2) 64x32 displays ! Shouldn't it be "plug and play" simple? - #6 by GeorgeFlorian, it works for the 64x32-S8 display.
PanelMapping:

const PanelMappingEntry panelMapP5_2727_64x32 = _ {
{0,64,64},
{8,0,64},
{0,0,0}
}

@Louis I am in vacation right now and I don’t have access to the code.
I just made custom maps for each panel or configuration of panels I needed. It worked for me, but I don’t think this is the optimal solution, because there can be hundreds of different panels and configuration out there.

Will update this post when I get my hand on the code.

@technikfreak Thank you! This gets me started! Do you also have the settings for MatrixCommonHub75.h? That would be helpful, too. :slightly_smiling_face:

Woohoo! After trying to get my 64x64 MOD16 panel working for longer than I care to admit (~50 hours and 5000 curse words), I did it!

If anybody else is interested in this type of panel, I will be happy to embed or attach the MatrixCommonHub75.h and MatrixPanelMaps.cpp files.

I’m happy to hear this! Please share and I’ll include it in the library for others

Cool. I am using an ESP32 with direct wiring/no SmartMatrix shield.

Suggestion: I know you have just updated your “how to” of the MultiRowRefreshMapping, but there are some inconsistencies, now that you have updated the SmartMatrix libraries to v4.0.

I don’t think I can attach files, so I am just going to show you what needed to be changed/added:to get my 64x64 outdoor (4 rows displayed per scan) LED module to work:

  1. Inside the MultiRowRefreshMapping sketch, make sure this option is selected for reverse engineering:
    const uint8_t kPanelType = SM_PANELTYPE_HUB75_4ROW_MOD2SCAN;

  2. I included these two new #defines in MatrixCommonHub75.h to follow the same format you use:
    #define SM_PANELTYPE_HUB75_64ROW_64COL_MOD16SCAN 10

#define SMARTMATRIX_HUB75_64ROW_64COL_MOD16SCAN SM_PANELTYPE_HUB75_64ROW_64COL_MOD16SCAN

As others have found, the SM_PANELTYPE_HUB75_32ROW_MOD16SCAN panel type is the only setting that allows the panel to light up at all, so here is a comparison of the settings between that panel and the newly-defined panel:

#define CONVERT_PANELTYPE_TO_MATRIXPANELHEIGHT(x)   ((x == SMARTMATRIX_HUB75_32ROW_MOD16SCAN ? 32 : 0) | \
                                                    (x == SMARTMATRIX_HUB75_64ROW_64COL_MOD16SCAN ? 64 : 0))

#define CONVERT_PANELTYPE_TO_MATRIXROWPAIROFFSET(x) ((x == SMARTMATRIX_HUB75_32ROW_MOD16SCAN ? 16 : 0) | \
                                                    (x == SMARTMATRIX_HUB75_64ROW_64COL_MOD16SCAN ? 32 : 0))

#define CONVERT_PANELTYPE_TO_MATRIXSCANMOD(x)  ((x == SMARTMATRIX_HUB75_32ROW_MOD16SCAN ? 16 : 0) | \
                                                    (x == SMARTMATRIX_HUB75_64ROW_64COL_MOD16SCAN ? 16 : 0))

#define CONVERT_PANELTYPE_TO_MATRIXPANELWIDTH(x)  ((x == SMARTMATRIX_HUB75_32ROW_MOD16SCAN ? DEFAULT_PANEL_WIDTH_FOR_LINEAR_PANELS : 0) | \
                                                    (x == SMARTMATRIX_HUB75_64ROW_64COL_MOD16SCAN ? 64 : 0))

I’m not sure this will display properly in the post, so I hope it’s not confusing.

  1. Finally, I don’t recall for sure, but I don’t believe your documentation mentions the switch/case entry that needs to be added at the bottom of MatrixPanelMaps.cpp:
    const PanelMappingEntry * getMultiRowRefreshPanelMap(unsigned char panelType) {
        switch(panelType) {
            case SMARTMATRIX_HUB75_64ROW_64COL_MOD16SCAN:
                return panelMap64x64Mod16;
            default:
                return defaultPanelMap;            
        }
    }

Hope this helps others get their “outdoor” LED modules working properly with SmartMatrix!

Thanks for your detailed feedback. I just added these rows to the sketch which hopefully cover all cases now:

//const uint8_t kPanelType = SM_PANELTYPE_HUB75_32ROW_MOD16SCAN; // Use this to reverse engineer mapping for a MOD16 panel
//const uint8_t kPanelType = SM_PANELTYPE_HUB75_64ROW_MOD32SCAN; // Use this to reverse engineer mapping for a MOD32 panel

Sure enough, this was referring to the wrong file and was confusing. I updated to this:

  • Open PanelMaps.cpp
    • Add your map with a unique name
    • Add new case for your new panelType to getMultiRowRefreshPanelMap(), returning your new panelMap

I don’t see your panelMap64x64Mod16, can you please paste it so I can finish adding this panel to SmartMatrix Library?

Ha, whoops! Yes, I guess it would be helpful to have the actual panelMap itself:

const PanelMappingEntry panelMap64x64Mod16[] =
{
{0,64,64},
{16,0,64},
{0,0,0}
};

For what it’s worth, I have outdoor 64x64 (a.k.a. MOD16) LED modules from 3 different manufacturers, and they all use this scanning pattern.

I also have 64x32 MOD8 outdoor modules, and I believe I will find they have the same mapping as @technikfreak saw.

1 Like

Do you have a link to any that are easy to buy? I wouldn’t mind having a sample

I have found these guys to have several choices, good quality, have good prices, ship quickly (to the U.S.) and they don’t murder you with shipping costs:

Shipping might be more expensive than AliExpress, but you won’t wait 2 months to get the product. If you buy a few panels at a time, the overall cost beats AliExpress.

For me, the time between placing an order and actually receiving product has been only about a week to 9 days.

@MStirlingC and @matbks I pushed these new panel types if you each want to try yours. I tested enough that they compile and display content, but don’t have the panels to try

@MStirlingC thanks for the source recommendation, they have cheap shipping to where I am in the UK as well.

You’re very welcome about the source recommendation.

Sorry to be thick, but when you say you pushed the new panel types, does that mean I should see a new version of the SmartMatrix library in Arduino? I don’t… :grimacing:

First: The map test sketch did not work, same result as i was having.
Second: The Demo Worked !!!
Third: It started to smoke and melt something. I do not know if it’s the ESP32 or the Panel.

edit: that is what was melting