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
899 stars 201 forks source link

Horizontal Ghosting in bottom half of 64x64? Can PIN_E be tuned? #545

Open JingleheimerSE opened 7 months ago

JingleheimerSE commented 7 months ago

@mrfaptastic wondering if you have a suggestion for eliminate the ghosting I am seeing in the bottom half of this Waveshare 64x64 panel. I assume its an issue with the PIN_E and the extra timing needed but I cant seem to find the nob, if it exists, to tune it.

I'm only really seeing ghosting on vertical edges like the checkerboard or text. In those cases I get flickering of near by pixels. PXL_20231218_193628678 PXL_20231218_193634809

Horizontal lines are much cleaner except for the last pixel: PXL_20231218_193637967

Wiring wise, I'm using the Adafruit MatrixPortal S3 directly connected to the HUB75 header so I don't have any flexibility in my pin choice. I've played with the power supply and added a capacitor but didn't see any changes. Using this same setup on a no-name Aliexpress panel, I get nice clean lines but it uses the ICN2038S driver: PXL_20231218_193743180

The panel appears to have a SM16208SJ driver with a SM5166PS multiplexor. Given that, I've got my driver in the code set to HUB75_I2S_CFG::SHIFTREG PXL_20231218_193836011

I've been through the Common Issues page a couple of times and have tweaked the following, which helped clean up the upper half:

  mxconfig.latch_blanking = 4;
  mxconfig.i2sspeed = HUB75_I2S_CFG::HZ_8M;

Here's my changes to the example so far: image

I'm currently using the PIO example as a test bed but my primary use case is actually displaying a clock and static text using https://github.com/TillFleisch/ESPHome-HUB75-MatrixDisplayWrapper.

mrcodetastic commented 7 months ago

Try increasing the latch blanking amount.

Looks like interference to me, perhaps these LED Matrix PCBs have issues at high speeds.

Try reducing the colour depth of the library to see if that helps as well.

ergindemir commented 4 months ago

Did you toggle the clkphase? Have you tried Adafruit protomatter library? If the issue persists with protomatter, it's panel otherwise library issue.

JingleheimerSE commented 4 months ago

Did you toggle the clkphase? Have you tried Adafruit protomatter library? If the issue persists with protomatter, it's panel otherwise library issue.

Looks like it was the CLK Phase! Flipping that cleaned up all the visual artifacts I was seeing, although I bet it was a combination of the parameters that got me there.

For anyone who may find it useful and is using a similar Waveshare LED Matrix and MatrixPortalS3, this is my current config working pretty well: