Unable to manage multiple RGB LED matrix panels as a single display

Hello everyone!

I’m new to the forum and this is my first post, so I hope I got all the forum’s rules right. :slightly_smiling_face:

I’m stuck with a project and hope someone can help...

I have an Arduino Mega 2560 Rev3 board and three 64x64-pixel RGB LED matrix panels of an unknown Chinese manufacturer which are connected to the board and are latched to each other via the HUB75 protocol. The board and the panels have independent power supplies. The panels receive a supply of 5 volts and 10 amperes. There is no other hardware.

I need to display text (custom-made by me using graphics primitives) and a still image on the panels as they were one single display. This display has to be made by the three panels placed in a row forming a rectangular display 192x64 pixels big.

I tried, as a test, to use only one panel as the display and everything is working well. I tried each panel individually so I know they aren’t defective.

Then I tried to use three panels together as the display but I can’t make them work.

I tried with two different libraries to manage the panels.

The first library I used for my tests is DFRobot_RGBMatrix 1.0.1 (the latest available version) which I installed via Arduino IDE.

This is the sketch which uses this library:

#include <DFRobot_RGBMatrix.h>

DFRobot_RGBMatrix display(A0, A1, A2, A3, A4, 11, 10, 9, false, 192, 64);

void setup() {
  display.begin();
}

void loop() {
}

As you can see, the sketch is very simple: it only creates the display object and initializes it with the .begin() method without doing anything else.

Despite this, when I run the sketch the panels switch on random pixels.

The second library I used for my tests was downloaded by a panel manufacturer’s website (not my actual panel manufacturer).

As far as I can tell (I’m only a junior programmer! :slightly_smiling_face:), this is a modified version of Adafruit’s RGBmatrixPanel library: the original library doesn’t have a constructor method for creating objects handling 64x64-pixel panels so such a constructor was added in the modified library. I guess there are other variations though...

This is the sketch which uses this library:

#include "RGBmatrixPanel.h"

RGBmatrixPanel display(A0, A1, A2, A3, A4, 11, 10, 9, false, 192);

void setup() {
  display.begin();
}

void loop() {
}

Also in this case, the sketch does nothing special but only creates an object for the display and initializes it.

And also in this case, when I run the sketch the panels start flickering.

Since the library I used is not available via Arduino IDE, I tried to attach it (and all its dependent files) to this post but this action is not available for new users so I can’t provide you with its code in case you want to inspect it and I can’t copy the code inline as it’s very long. Please let me know how to do in case you need it.

I did other tests running both sketches with only two panels latched, instead of three, and modifying the code accordingly but the result is the same.

Any help would be vastly appreciated.

Thank you very much in advance.

Let the fun begin!

Your power supply is not the right size and not connected correctly. Show your circuit diagram (hand drawn if you wish) labeling the hardware you are using.

Not uncommon with (other) addressable LEDs.
Did you try a "clear" command, right after display.begin().
Leo..

Example from DFRobot

void setup() {
  matrix.begin();
  // fill the screen with 'black'
  matrix.fillScreen(matrix.Color333(0, 0, 0));
}

These are the circuit diagram and a picture of the panels’ back which shows their power supply:
Circuit diagram

As per Wawa’s suggestion, I added a “clear” command to both sketches, which now are as follows:

#include <DFRobot_RGBMatrix.h>

DFRobot_RGBMatrix display(A0, A1, A2, A3, A4, 11, 10, 9, false, 192, 64);

void setup() {
  display.begin();
  display.fillScreen(display.Color333(0, 0, 0));
}

void loop() {
}
#include "RGBmatrixPanel.h"

RGBmatrixPanel display(A0, A1, A2, A3, A4, 11, 10, 9, false, 192);

void setup() {
  display.begin();
  display.fillScreen(display.Color333(0, 0, 0));
}

void loop() {
}

This didn’t resolve the issue. The first modified sketch yelds a slightly different output than the original sketch and the second modified sketch gives about the same output as the original sketch.

The sketches’ outputs aren’t still but change in what appears to be a cycle so I’d have liked to include videos of them (not a perfect solution as cameras making videos of refreshing display devices naturally introduce artifacts which alter the final videos but, anyway, better than nothing :slightly_smiling_face:) but as a new user I’m not allowed to upload videos, so here are two still images of the two sketches’ outputs (I had to put them in one single file as new users aren’t allowed to upload more than three files in a post, so the upper image is the first sketch’s output and the lower image is the second sketch’s output).

The first sketch does something really odd and unexpected. Maybe it was also in the original sketch without “clear” command but it wasn’t apparent then.

Before loading these sketches, the board was running a demo sketch from one of the libraries’ examples and it looks like my first sketch is still executing that demo sketch’s instructions.

It seems to me my sketch is recalling that demo sketch or is re-executing the content of the demo sketch which somehow persisted in the board’s memory or elsewhere.

This doesn’t make any sense and really baffles me as my sketch doesn’t have any instructions from the demo sketch and all memory (including buffering) is supposed to be erased when running a new sketch...

Anyhow, the panels still don’t work as desired.

Any idea?

Thank you!

Nothing to do about being a new user, the forum won't let anyone post videos.

What you can do is post a video on a hosting site like Vimeo or YouTube (other tubes are available) then post a link to that. But your power supply has way too little current capacity to power that many. Can you measure the voltage on the last panel and see how much it has dropped.

I noticed in some previous tests that, if I create an object for a 64x64-pixel display while leaving all three panels latched, both sketches replicate the same content on the three panels.

With that in mind, in order to provide a reference, I ran both sketches with all pixels switched off (which I assume leads to the lowest consumption) and then with all pixels switched to white (which I assume leads to the highest consumption) and measured each voltage. These are the results.

  1. Sketch 1, 64x64-pixel display, all pixels switched off
#include <DFRobot_RGBMatrix.h>

DFRobot_RGBMatrix display(A0, A1, A2, A3, A4, 11, 10, 9, false, 64, 64);

void setup() {
  display.begin();
}

void loop() {
}

Measured voltage: 5.46 volts

  1. Sketch 1, 64x64-pixel display, all pixels set to white
#include <DFRobot_RGBMatrix.h>

DFRobot_RGBMatrix display(A0, A1, A2, A3, A4, 11, 10, 9, false, 64, 64);

void setup() {
  display.begin();
  display.fillScreen(0xFFFF);
}

void loop() {
}

Measured voltage: 3.43 volts

  1. Sketch 2, 64x64-pixel display, all pixels switched off
#include "RGBmatrixPanel.h"

RGBmatrixPanel display(A0, A1, A2, A3, A4, 11, 10, 9, false, 64);

void setup() {
  display.begin();
}

void loop() {
}

Measured voltage: 5.47 volts

  1. Sketch 2, 64x64-pixel display, all pixels set to white
#include "RGBmatrixPanel.h"

RGBmatrixPanel display(A0, A1, A2, A3, A4, 11, 10, 9, false, 64);

void setup() {
  display.begin();
}

void loop() {
}

Measured voltage: 3.57 volts

Lastly, as requested, I’m giving the voltage measurements of the two sketches which try to manage a 192x64-pixel display (without success).

  1. Sketch 1, 192x64-pixel display
#include <DFRobot_RGBMatrix.h>

DFRobot_RGBMatrix display(A0, A1, A2, A3, A4, 11, 10, 9, false, 192, 64);

void setup() {
  display.begin();
}

void loop() {
}

Measured voltage: 5.33 volts

  1. Sketch 2, 192x64-pixel display
#include "RGBmatrixPanel.h"

RGBmatrixPanel display(A0, A1, A2, A3, A4, 11, 10, 9, false, 192);

void setup() {
  display.begin();
}

void loop() {
}

Measured voltage: about 5.18-5.30 volts (it keeps changing)

Please let me know if you need other measurements.

Thank you.

Thanks for that.

Given that the voltage can drop down into the 3V region means that you should be having a resistor between the LED drive pin and the input to the first panel. This will protect the display electronics, 470R should do it.

Also have you any capacitors on the panel's input voltage, this can prevent random turning on of LEDs. Start off with about 1000uF on each panel.

The Arduino Mega board does not have enough memory to work with three 64x64 RGB panels.

Each 64x64 RGB led panel needs a 6Kbyte RAM buffer to work. The Arduino Mega has 8Kbyte RAM in total, therefore it can control only one panel.

To work with three panels you need a board with much more memory than Mega - i.e. ESP8266, ESP32, RP2040 or STM32

1 Like

I’m a bit confused because somebody is suggesting the problem could be due to the power supply while somebody else is saying the board can’t manage three panels as a single display since it doesn’t have enough RAM.

To Grumpy_Mike
I’m not an expert in electronics so your suggestion isn’t very clear to me.

  1. Which one is the LED drive pin? Could you provide with its name according to HUB75’s or board’s labelling?
  2. What kind of resistor should I use? The kind put in-line between the pin and the HUB75 cable or the kind which is connected to ground?
  3. More in general, what is the relationship between the voltage drop and the opportunity/necessity to use a resistor? Could the problem be solved by simply upgrading the panels’ power supply to 40 amperes or are the things totally unrelated?
  4. Are you suggesting the pixels randomly switching on could be due to some parasite current or other form of “noise” which can be stopped using capacitors?
  5. Can you confirm you are suggesting to use electrolytic capacitors?
  6. You mean I should use 1000uF capacitors as a start and, if the issue still persists, keep using stronger and stronger capacitors until the issue is fixed?

To b707
If the only issue is memory, I could change the board to Arduino Due instead of choosing a totaly different platform like ESP32 of Raspberry Pi. This way I’d stay on a platform I’m already familiar with. Is the issue only a matter of memory so that it should be instantly resolved as I switch to a board with enough RAM? Since I only need to show text and a still image on the display and Arduino Due and this platform seems to have enough resources for that, what are the disadvantages to opt for Ardunio Due compared to a more powerful platform like ESP32 or Raspberry Pi?

Thank you.

64 x 64 x 3.
I wonder what the idle current is on such a rig. Any idea?

(2812's would be 'tremendous'.)

Such panels uses dynamic indication, so at any moment only 1/32 of the total number of leds are lits.

I don't think that it is a power issue. These three 64x64 panels require approximately 15-20 A when filling all pixels with white at full brightness. In most cases, however, not all pixels are lit and the brightness is less than maximum, so your 10A power supply will be enough in most cases.
I tried to power two such panels from a power supply of only 2A - everything worked (with reduced brightness, of course).

Why do you think that Arduino Due is a more "similar platform" to the Arduino Mega than ESP32 or RP2040?
In fact, this is not true at all. Arduino Due uses a controller SAM3X8E ARM Cortex-M3 - it is a controller from a completely different family than Mega's Atmega2580.
In addition, I don't know the library for RGB LED matrices running on Arduino Due, while such libraries exist for ESP32 or RP2040.

I think your problem here is that you don't actually know what you have. This is leading you to all sorts of conclusions that are anecdotal rather than technical. I also assume that you don't have an oscilloscope to allow you to look at signals. As a start I would read this in order for you to get an idea of what has worked. Not necessarily what to do but as a learning process.

Now clearly @b707 is correct in saying you haven't got enough memory, Which is why I gave that post a like. However, you yourself made measurements where the measured voltage was

That can only happen if you are drawing too much current from your power supply. This then can cause issues with the safety of the module, and the classic way of curing this is to put a series resistor in the driver pin (or pins) to make sure you are not driving the module with a signal larger than the power supply. This can cause damage to the module.

I don't know because I can't find any information about this panel.

I did say

So not one that goes to ground.

If the bigger power supply stops the voltage drop then you will not need the resistor.

No.

Yes. Often in beginners circuits they totally ignore the need for power supply decoupling. Read this tutorial I wrote on the topic.

Yes because there are no other sorts of capacitor that you can use to get values this high.

No. In the case of 1000uF capacitors being not big enough (note the word strong is incorrect) then I would use a capacitor this size on each of the panels, along with a 0.1uF ceramic capacitor in parallel with the big one to handle high frequencies like my tutorial shows..

I see. I’ll have a try with an ESP32 and have a look at the electronics tutorial put to my attention, then. Thank you very much for your help. Very appreciated.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.