mrcodetastic / ESP32-HUB75-MatrixPanel-DMA

An Adafruit GFX Compatible Library for the ESP32, ESP32-S2, ESP32-S3 to drive HUB75 LED matrix panels using DMA for high refresh rates. Supports panel chaining.
MIT License
929 stars 205 forks source link

Outdoor panel with 16207S driver low brightness #634

Closed jwee1369 closed 2 weeks ago

jwee1369 commented 3 months ago

Hi,

I have one 64x64 panel with 16207S, for the most part the library works and i tried with the setup below:

in the first image - when the panel is filled with blue, everything is connected and working as expected.

In the second image - However, one time i accidentally unplug my ESP32 MCU from the power source, i noticed, the 4 lines (in blue) but they happened to be brighter (this is the brightness i am trying to achieve) - works good under sunlight

Any explanation or solution to achieve the (right) brightness with four lines?

Some things I have tried:

  1. decrease increase brightness - works as expected
  2. increase refresh_rate to 100 - no effect
  3. define PIXEL_COLOR_DEPTH_BITS 12

Appreciate your help and thanks

Screenshot 2024-05-21 at 11 50 18 PM Screenshot 2024-05-21 at 11 50 47 PM

` HUB75_I2S_CFG::i2s_pins _pins={R1_PIN, G1_PIN, B1_PIN, R2_PIN, G2_PIN, B2_PIN, A_PIN, B_PIN, C_PIN, D_PIN, E_PIN, LAT_PIN, OE_PIN, CLK_PIN};

HUB75_I2S_CFG mxconfig( PANEL_RES_X2,
PANEL_RES_Y/2,
NUM_ROWS
NUM_COLS,
_pins, // Uncomment to enable custom pins HUB75_I2S_CFG::ICN2038S );

mxconfig.i2sspeed = mxconfig.HZ_20M; / mxconfig.min_refresh_rate = 10; mxconfig.clkphase = false; // Change this if you see pixels showing up shifted wrongly by one column the left or right.

dma_display = new MatrixPanel_I2S_DMA(mxconfig); if( not dma_display->begin() ) Serial.println("** !KABOOM! I2S memory allocation failed ***");

dma_display->setBrightness8(255); // range is 0-255, 0 - 0%, 255 - 100% dma_display->clearScreen(); delay(500);

virtualDisp = new VirtualMatrixPanel((*dma_display), NUM_ROWS, NUM_COLS, PANEL_RES_X, PANEL_RES_Y); virtualDisp->setPhysicalPanelScanRate(FOUR_SCAN_64PX_HIGH);

virtualDisp->fillScreen(virtualDisp->color565(0, 0, 255)); `

board707 commented 3 months ago

Any explanation or solution to achieve the (right) brightness with four lines?

Unfortunately, there is no way you can achieve this brightness. This is how the hub panel works Your matrix has 1/16 scan, it means that it divided by 16 parts, switched one after another, so every pixel lit only 1/16 part of total time. When you switch on the matrix without mcu, some random pixels lights statically and its brightness 16 times more than in normal mode.

jwee1369 commented 3 months ago

@board707 that makes sense, thanks for the explanation.

It seems like the LEDs are somehow being limited from its full brightness potential. I have tried other libraries on arduino and this seems to be the case as well. Is the limit being set at the hardware level or software level? Any way to possibly increase the brightness through other means?

Thanks!

board707 commented 3 months ago

It seems like the LEDs are somehow being limited from its full brightness potential.

It seems to me that you did not fully understand my explanation. The diodes glow dimly not because someone has limited their brightness, but because they only light part of the time. . PWM signal principle

jwee1369 commented 3 months ago

sorry I misunderstood, I assume setting the brightness sets the PWM signal pulse to 100% duty cycle.

I'm just trying to understand what is limiting the led brightness since it can technically go brighter - in the second image when the 16 scans were all output to the same row of leds 16 times. In normal operation when one row only get one scan, it is rather dim.

Is this limited by the driver current output for each of the scan, since 16 scans towards 1 row is brighter

board707 commented 3 months ago

Sorry, I don't know English well and I can't explain it more clearly Re-read my first answer

jwee1369 commented 3 months ago

No problem, thank you for your help 😊

board707 commented 3 months ago

what is limiting the led brightness

The fact that every led is lit only 1/16 part of total time. You can't change this, Try to understand.

jwee1369 commented 3 months ago

I'm still trying to wrap my head around this, but reading other libraries, there are ways around it. Any chance we could implement the same solution for this library?

https://community.pixelmatix.com/t/how-to-maximise-led-brightness/1206/2 https://github.com/hzeller/rpi-rgb-led-matrix/issues/395

board707 commented 3 months ago

Any chance we could implement the same solution for this library?

What the solution? The link to the pixelmatrix forum recommends you get an 8s panels instead of 16s - it definitely helps you to increase the brightness, but not the brightness of your current panel. The second link is about the tweaking the parameters of hzeller's library - it hardly has something to do with the current library.

Sorry by repeating the same - but the fact that the total brightness of 16s panels is only 1/16 of the nominal brightness of its leds - it is not a bug or incorrect hardware settings, it is by design and how the HUB75 panels works. There is no "solution" for it.

But you can still trying to look at "hacks" if you want.

mrcodetastic commented 1 month ago

Outdoor panels are 1/8 or 1/4 scan for this reason. They're brighter as the "on" time for each row isn't divided as much.