SmartMatrix with 1/4 scan hub75 panels


#1

Hi everybody,
I’m trying get the library working with an hub75 1/4 scan matrix, but with no luck so far.
I modified the SmartMatrix.h file like this:

#define SMARTMATRIX_HUB75_32ROW_MOD16SCAN             0
#define SMARTMATRIX_HUB75_16ROW_MOD8SCAN              1
#define SMARTMATRIX_HUB75_16ROW_MOD4SCAN              2

#define CONVERT_PANELTYPE_TO_MATRIXPANELHEIGHT(x)   ((x == SMARTMATRIX_HUB75_32ROW_MOD16SCAN ? 32 : 0) | \
                                                    (x == SMARTMATRIX_HUB75_16ROW_MOD8SCAN ? 16 : 0) | \
                                                    (x == SMARTMATRIX_HUB75_16ROW_MOD4SCAN ? 16 : 0))

#define CONVERT_PANELTYPE_TO_MATRIXROWPAIROFFSET(x)   ((x == SMARTMATRIX_HUB75_32ROW_MOD16SCAN ? 16 : 0) | \
                                                      (x == SMARTMATRIX_HUB75_16ROW_MOD8SCAN ? 8 : 0) | \
                                                      (x == SMARTMATRIX_HUB75_16ROW_MOD4SCAN ? 4 : 0))

#define CONVERT_PANELTYPE_TO_MATRIXROWSPERFRAME(x)   ((x == SMARTMATRIX_HUB75_32ROW_MOD16SCAN ? 16 : 0) | \
                                                     (x == SMARTMATRIX_HUB75_16ROW_MOD8SCAN ? 8 : 0) | \
                                                     (x == SMARTMATRIX_HUB75_16ROW_MOD4SCAN ? 8 : 0)) 

Does someone has already managed to get a 1/4 scan matrix working ?

Thanks,

Guillaume


64x64 LED Matrix?
64x64 LED Matrix?
#2

ps: I’m using this panel : http://fr.aliexpress.com/item/RGX-P10mm-outdoor-rgb-led-module-p10-full-color-led-module-p10-led-module-rgb-size/2031436062.html

Guillaume


#3

Hi Guillaume,

A couple modifications:
(x == SMARTMATRIX_HUB75_16ROW_MOD4SCAN ? 4 : 0)
should be
(x == SMARTMATRIX_HUB75_16ROW_MOD4SCAN ? 8 : 0)
(I believe the rows are still spaced 8 apart, e.g. what gets shifted through RGB channel 1 is 8 rows away from RGB channel 2)

(x == SMARTMATRIX_HUB75_16ROW_MOD4SCAN ? 8 : 0)
should be
(x == SMARTMATRIX_HUB75_16ROW_MOD4SCAN ? 4 : 0)
(there are four rows shifted out per frame)

After thinking about it a bit more, I think you will need to change more than these #defines, but you can give it a try and see what happens. Post some pictures or videos if you’re getting some output but it’s garbled. I don’t have any spare time to work on this right now, but I will take a look at the aliexpress link you sent and might order a panel to try.


#4

Hi Louis, thanks for the quick answer.

Here is a link to a video of what I get with your modifications: MATRIX_1_4.mp4

This is supposed to be a blue dot scanning every row pixel by pixel over a red background.
It’s hard to describe what’s happening, I hope the video talk by itself.

And here is the code :

void loop() {
  static unsigned char x = 0;
  static unsigned char y = 0;

  SM_RGB color = CRGB(CHSV(200, 255, 255));
  backgroundLayer.drawPixel(x,y, color);
  backgroundLayer.swapBuffers();

  x++;
  if (x >= kMatrixWidth) {
    x = 0;
    y++;
    if (y >= kMatrixHeight) {
      y = 0;
      backgroundLayer.fillScreen(defaultBackgroundColor);
    }
  }
  delay(100);
  digitalWrite(ledPin, !digitalRead(ledPin));
}

Here a picture of a simple grey background : LINK

Do you understand what’s going on ? If you can give me a hint of what I can modify in the main library code, I can give it a try.

Regards,

Guillaume


Row / collum mixup for new matrix
#5

It looks like the library is writing overlapping data to the panel. I don’t have an easy answer on how to fix this. I tried ordering the panel you linked and the supplier is out of stock. I won’t be able to look at this any time soon.


#6

@guillaume.s I ordered a 1/4 scan panel, not the same one you have but probably similar refresh. I looked at the code and it’s not setup to write multiple more than two rows per latch to the panel. A 1/4 scan panel needs four rows written at a time (and a 1/2 scan panel which I also bought needs eight rows written at a time). No promises on when I can get this improvement added to the code, but I do have a panel and have started on it.


#7

That’s a great news ! Tell me if you need me to do some test on my 1/4 scan panel.


#8

A quick update, I didn’t want to hack this feature into the code, and realized there’s no easy way to add it in as it requires reworking some fundamental parts of the SmartMatrix Library. I do have a plan for how users can define generic panels that may contain multiple rows per address (e.g. a 1/4 scan panel), that will apply to using LED strips or APA102 matrices as well as multiplexed panels. I’ll start work on that sometime in 2017. I’m hoping its in early 2017, but I haven’t had much time to dedicate to this project recently.


#9

Hi Louis,

Any update for 1/4 panels?

I’d GLADLY donate or whatever to show my appreciation to get this supported since I’m planning a project with displays with 1/4.

I can also send displays for you to try if needed.

Regards,
Crowbar


#10

Hi Crowbar,

I’m wrapping up a port of SmartMatrix Library to the ESP32, and 1/4 scan support is high on my list after I get the port to a point where I can release a mostly-functional library and get some hardware on order. I also have a project in mind for 1/4 support, so that feature is pretty high on my list. PM me about a donation, maybe that could motivate me to accelerate this feature.

Can you post a link to the panels you’re buying, so I can give my best opinion on if they’ll be supported? I recently learned about “AB” scan panels that have only 2 ADDX lines so it looks like they’re 1/4 scan, but they’re actually 1/32 scan with a separate shift register for scanning in the address lines. I don’t see these panels being supported by the SmartMatrix Library in the future, due to hardware incompatibility with the way I’m externally latching the ADDX lines.

Thanks,
Louis


#11

Actually what would really help accelerate this feature is to discuss some ideas on how to specify in the sketch the geometry of the panels. Right now you specify display height, display width, panel height, and the number of rows to scan through on each panel, and that’s enough for the SmartMatrix Library to put the pixels in the right order. For /4 scan panels, there’s an additional wrapping of pixels within a panel, so the SmartMatrix Library needs an additional piece of information: the panel width. That could be encoded into the existing kPanelType variable. For the panel linked above, kPanelType could be SMARTMATRIX_HUB75_32COL_16ROW_MOD4SCAN

Are there multiple types of wrapping done on these /4 panels? I skimmed through hzeller’s RPi matrix driver’s Readme, and it seems like there might be multiple methods handled by his “Multiplex Mappers”. I was considering coming up with a mapping method that would support more arbitrary (but still rectangular) layouts of pixels for both chained HUB75 panels as well as chained LED strips or APA102 matrices as the library is hopefully going to support driving APA102 LEDs in the future. Trying to come up with a generic mapping method that will work for a lot of different layouts seems like a challenging and time consuming problem. Perhaps just coming up with a one-off for handling a limited number of /4 panels is the better solution for the short term.

Thoughts?


#12

Hi Louis and thank you for your fast replies,

Exactly which displays I will use is right now not decided. However I will tell you that they are 32x16 or 32x32 DIP RGB P10 LED modules and the vast majority of these displays seems to run 1/4.

Here are two links


Any thoughts?

I might add that that I plan to make displays that measure 960x640mm(96x64 pixels), shouldn’t be a problem with the new V4 shield and Teensy 3.6, right?

I’ll pm you about the donation.

/Andreas


#13

As for your second reply, I’d love to be able to answer your questions but I’m simply not qualified to do so. All I know is that I need help with a solution for 1/4 displays, how it’s implemented is not (for me) important.

Sorry!

Once again, thank you for taking your time!


#14

After searching around on Google I found this thread:

https://forum.arduino.cc/index.php?topic=503416.0

Could this possibly shed some light on some of your questions Louis?


#15

Hi Andreas,

Both those panels don’t have complete specs, and the pictures aren’t very high resolution, so it’s hard for me to tell without having access to more details or the panels themselves to know if they will be supported. On one of them I can see at least the shape of the silkscreen letters around the input connector, and it looks like “HUB08” not “HUB75”. HUB08 has only half of the signals of a HUB75 panel, and I believe a different pinout of HUB75. You’ll probably need an adapter to take the HUB75 output from the SmartLED Shield and split it into two HUB08 signals to go to two panels. Something like this. I have a HUB08 panel, something like this one, but I’ve never used a HUB75-HUB08 adapter and don’t have one of those.

The 32x32 panel has two sets of connectors on it. I’m not sure if there are two separate 16x32 HUB08 panels combined into a single 32x32 panel, or if there is something else going on.

The panels I have are similar to this one, which uses thinner SMT LEDs instead of the individual THT LEDs on the panels you linked to. They are spec’d to the same brightness as at least one of your panels (7500cd/m2), but who knows if those specs are accurate. In addition to the LEDs being thinner, the panel frames are likely thinner. The 32x32 panel you linked to has two boards stacked on top of each other, one for the THT LEDs, the other for the SMT driver parts, and it’s likely pretty thick. Can you use panels similar to the 16x32 panel I linked to?

96x64 should be fine with the Teensy 3.6, but there are tradeoffs in color depth, refresh rate, and overall brightness as the panel size grows. If you already have a Teensy 3.6 and SmartLED Shield and a supported panel, you can try to get a sense for how it will behave by increasing the size of matrixWidth/Height until it matches your intended panel size, and just look at what you see on the one panel you have hooked up.