Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P3 Matrix RGB LED 64x32 HUB75E #746

Open
vmisiek opened this issue Jan 5, 2019 · 92 comments
Open

P3 Matrix RGB LED 64x32 HUB75E #746

vmisiek opened this issue Jan 5, 2019 · 92 comments

Comments

@vmisiek
Copy link

vmisiek commented Jan 5, 2019

Hello
I bought such a panel P3 64x32 HUB75E, I connected it so in the picture https://imgur.com/a/GWmf2iA and I have a problem with the display I tried also to connect the pin E but without improvement https://imgur.com/a/MgHxff2 please help , the panel is on FM6126A chips. https://www.aliexpress.com/item/P3-RGB-pixel-panel-HD-display-64x32-dot-matrix-p3-smd-rgb-led-module/32728985432.html?spm=a2g0s.9042311.0.0.41ff4c4dVj3G0P

@manuelgorman
Copy link

This seems to be the same as my issue #745 - it's exactly the same panel and I'm seeing the same issue as you.

@vmisiek
Copy link
Author

vmisiek commented Jan 7, 2019

Thank you, I wrote to the seller, I will send the second panel with a different chip.

@shades66
Copy link

Hi,
I got those same panels from that seller and had the same issue with nothing being displayed, Using the smartmatrix library I just got a noisy display with bits of the demo application appearing occasionally.

After lots of messing around I found out that by default FM6126 settings are the outputs are all disabled, I've been messing around with the attached script to try and work out what the various registers do, it's set to use the pinout used by the adafruit matrix hat without the RTC so see if it works for you, Just run it before the demos to configure the 2 configuration registers

For info what i've found so far is register 12 controls brightness/gain settings and appears to be made up of three 6bit values, as follows aaaaaabbbbbbcccccc a= darkness? mainly seems to add red to the background when the leds are off, b=main brightness c=finer brightness control (i'm not sure if b & c are actually as 12 bit value but with b set to all 1's the value in c doesn't seem to make much difference)

register 13 i'm not sure what it's doing yet, just that 1 specific bit within seems to be an overall enable function.

set all the values at the top to the same value for each of register 12/13 to get the same settings across the panel, the current code loads different settings into each 32 columns.

clocking in the register is simply clocking in the value (i've 2 panels so 128bits of data) and for the last 12/13 bits depending on the register setting the latch to high. the final drop of latch to low clocks in the configuration. this is done by sending the same value to r1/r2/g1/g2/b1/b2 at the same time to load the config into all the FM6126 chips

Hopefully this will help you get these panels working for you.

resetmatrix.py.txt

PS, The code is not going to win any competitions for quality, this is my first attempt to learn a bit of python along with trying to work out how to use these panels.

@2dom
Copy link

2dom commented Jan 14, 2019

Hi @shades66...I am the author of PxMatrix (https://github.com/2dom/PxMatrix) and users have an issue that is probably related. I messed about with theses panels myself however did not try to write the configuration registers yet.

With the configuration you supplied above can you run the startdard library without any problems/changes? The Chinese pdf mentions something about three clock edges to pipe data into the registers - is that still necessary for display data?

@DaveDavenport
Copy link

I dug up an old rbpi from work, installed raspbian and hooked up the panel.

I changed the above script to support single panel and the default wiring mode and it worked. (yay)

I need to re-run the script on power cycle, so not sure if I can easily load this, then connect to pxmatrix and test. If I find some time (not sure when), I will see if I can reproduce the above script in pxmatrix init code.

(Also noticed that the brightness setting on the demo apps do not work anymore.)

@manuelgorman
Copy link

I managed to get my panels "working" too using this script, but unfortunately it's not quite 100%... 50%, to be exact - my panel is lighting up brightly on the left hand side (away from the input connector) and really dimly on the right (Image). I played around with multiplexing options and rows/cols but no luck. Anyone seen this? It's doing it on both my panels, whether they're connected separately or together.

@DaveDavenport
Copy link

DaveDavenport commented Jan 15, 2019

That is easy enough to fix, the script sets this explicitly.

Change:

b12a="0111111111111111"
b12b="0111100000111111"
b12c="0111111111111111"
b12d="0111100000111111"

to

b12a="0111111111111111"
b12b="0111111111111111"
b12c="0111111111111111"
b12d="0111111111111111"

Those 'b' bits are brightness (see description above).

Video of it working: https://filebin.pw/sJD/

@shades66
Copy link

Hey, sorry I should of set it all to ones when I posted the script. It was just left with the last settings I was playing with trying to work out how the last 6 bits change the brightness.

I see @2dom has added the script to PxMatrix so going to give that a go too at the weekend.

@patrickhirsh
Copy link

patrickhirsh commented Jan 17, 2019

Thanks to this thread, after hours trying to figure out what I had done wrong, I FINALLY realized that I too had ordered these P3 64x32 panels with HUB75E. The above script worked for me as well! (Thank you shades66!). I'm hoping to develop some software using this library to control my panels - I'll keep an eye on this thread and update if I find a nice way to integrate this little script into my project!

Massive thanks to all of you in this thread. You can't possibly understand my relief after all this troubleshooting!

@lucasParis
Copy link

Had the same problem with those same p3 modules.
The script worked for me also,
I also changed the pin mapping for it to work with the rpi-rgb-led-matrix active pcb (on output 0 top row)

And I modified it so it can activate 4 p3 pannels instead of 2.

You can get even more in a chain by multiplying max at line 56 (2 = 4 panels)

@lucasParis
Copy link

Oups couldn't upload the script for some reason, let me know if anyone needs it

@vmisiek
Copy link
Author

vmisiek commented Jan 17, 2019

Oups couldn't upload the script for some reason, let me know if anyone needs it

Please send :)

@lucasParis
Copy link

Here it is (github doesn't want python files, had to add .txt extension)
resetmatrix.py.txt

@schnibel
Copy link

schnibel commented Jan 19, 2019

Hi all,

I exactly have the same problem, and I also connected my system like in the picture https://imgur.com/a/GWmf2iA as shown by @vmisiek. So my Raspberry PI3B+ is directly connected to the Panel's HUB75 input (without using Adafruit hat), and the Panel's HUB75 output is not connected.

I bought my panels like many of you in SRYLED Display Store and it has FM6126A chips.
So I wanted to apply @shades66's patch (with b12a, b12b, b12c, b12d values for brightness management as @DaveDavenport explained)...

The problem is that I'm not sure I correctly applied the patch (I'm only "playing" with rpi-rgb-led-matrix" for 2 days).
I just wrote sudo python3 resetmatrix.py and I got the following result :

pi@raspberrypi:~ $ sudo python3 resetmatrix.py 
 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 01111*11111111111
 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111111111111111 0111*111111111111

When I launched the following command, the panel sadly stayed black, without any led powered on :(

pi@raspberrypi:~/rpi-rgb-led-matrix/examples-api-use $ sudo ./demo --led-rows=32 --led-cols=64 --led-chain=1 -D0
[sudo] Mot de passe de pi : 
Size: 64x32. Hardware gpio mapping: regular
Press <CTRL-C> to exit and reset LEDs

I'm quite sure I didn't correctly applied the patch !
Edit: I say I'm quite sure, because it now works using a nodeMCU ESP8266 after applying the patch explained by @DaveDavenport and @2dom in (2dom/PxMatrix#53). This patch is dealing with the same fix you explained in this thread.

Sorry for the total newbie question, but does anyone could tell me how I should proceed ?

Thanks in advance, and sorry again for the level of the question !

@Shemham
Copy link

Shemham commented Jan 20, 2019

At this point I’d like to weigh in, I’ve had massive success with these panels off ebay:
https://www.ebay.co.uk/itm/RGB-P5-HD-led-screen-display-module-64x32-dots-led-display-module-matrix-32x16cm-/272157114633
So I decided to try my luck with the panels everyone on here are having issues with, (I didn’t know there were issues until I bought them).
https://www.amazon.co.uk/gp/product/B07D5RFGMF/ref=ask_ql_qh_dp_hza
After banging my head against a wall for over a day (I’ve only been messing with these panels for a couple of weeks and I’m an absolute noob with the code etc) This thread has helped me out massively.
I have 4 of these panels and realise now that the resetmatrix.py file thanks too @shades66’s hard work (which I then updated to get full panel brightness thanks to @DaveDavenport) needs to be ran on each panel individually first before you push any data to them, I then ran some demos using the sudo ./led-image-viewer image.png –led-rows=32 –led-cols=64 –led-chain=2 works great also you can use the –led-pixel-mapper=U to use 2 panels as one 64x64 panel.

Just tried to run these in a chain of 4 panels but for some reason the last two panels always remain off, still scratching my head.

Thanks for everyones hard work on here, what a great community.

@schnibel
Copy link

I have 4 of these panels and realise now that the resetmatrix.py file thanks too @shades66’s hard work (which I then updated to get full panel brightness thanks to @DaveDavenport) needs to be ran on each panel individually first before you push any data to them, I then ran some demos using the sudo ./led-image-viewer image.png –led-rows=32 –led-cols=64 –led-chain=2 works great also you can use the –led-pixel-mapper=U to use 2 panels as one 64x64 panel.

Hi @Shemham, could you tell me how you applied the resetmatrix.py patch please (what is the command ??) : sudo python3 resetmatrix.py ?

@Shemham
Copy link

Shemham commented Jan 20, 2019

I have 4 of these panels and realise now that the resetmatrix.py file thanks too @shades66’s hard work (which I then updated to get full panel brightness thanks to @DaveDavenport) needs to be ran on each panel individually first before you push any data to them, I then ran some demos using the sudo ./led-image-viewer image.png –led-rows=32 –led-cols=64 –led-chain=2 works great also you can use the –led-pixel-mapper=U to use 2 panels as one 64x64 panel.

Hi @Shemham, could you tell me how you applied the resetmatrix.py patch please (what is the command ??) : sudo python3 resetmatrix.py ?

Yes that's exactly how I applied it, sudo python3 resetmatrix.py I'm using the Adafruit Matrix Bonnet though, If I have 2 panels connected it seems ot apply to both panels, however if I have 4 panels connected in a chain the first two panels output OK but the last two in the chain display garbage, I'm still scratching my head.

@patrickhirsh
Copy link

@schnibel for my own setup, all I had to do was run sudo python3 resetmatrix.py once on rebooting the pi before running any demos. My output looked identical to yours. I'm using an Adafruit HAT, however.

@patrickhirsh
Copy link

@Shemham have you tried the modified script that @lucasParis wrote?

And I modified it so it can activate 4 p3 pannels instead of 2.

@Shemham
Copy link

Shemham commented Jan 20, 2019

@Shemham have you tried the modified script that @lucasParis wrote?

And I modified it so it can activate 4 p3 pannels instead of 2.

If I run @lucasParis's code as it is (I believe he's already modified it to support 4 panels) then I only get the below output.

image

@Shemham
Copy link

Shemham commented Jan 20, 2019

Ok making inroads, I had to use the original code from @shades66 with the fix from @DaveDavenport then update lines 56 to include max = 128 *2 also I needed to change line 57 to for x in range(max): same for line 94 for x in range(max): & line 124 if(x==(max-13)):
I now get the below image (all 4 panels on ) but the last two are dim and glitchy.

image

@depili
Copy link

depili commented Jan 20, 2019 via email

@schnibel
Copy link

schnibel commented Jan 20, 2019

Thanks @Shemham and @patrickhirsh , it works... actually I used @DaveDavenport patch instead of @lucasParis patch... it's the only thing I changed...
This afternoon I'll chain 2 panels and I'll test if it works, and then I'll test with Adafruit Hat...
Great !!!!

@Shemham
Copy link

Shemham commented Jan 20, 2019

Quick update, I now have all 4 panels working together, no glitches or dimming, @depili turns out it was a bad cable, once I replaced the cable linking boards 1&2 to 3&4 it works perfect, thanks for everyone's help. couldn't have done it without you. Video attached is rubbish quality thanks to my mobile camera but the real image is much deeper and no screen tearing.

https://www.youtube.com/watch?v=mhRATxvTEyY

@schnibel
Copy link

Great @Shemham !
Same thing for me, it works perfectly... Couldn't have done it without you too !

@Shemham
Copy link

Shemham commented Jan 21, 2019

I wanted to leave an additional update; I had bought two of these 64 x 64 panels from eBay.

https://www.ebay.co.uk/itm/p2-5-full-color-led-display-module-indoor-rgb-64-64-pixels-HID-screen-160-160-mm/272852107043?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

I had tried everything to get them to work, (they're the ones with the A, B, C, D & E lines), However I was getting nothing but half a display from them, but only intermittently, often they were just blank, it wasn’t until I realised they're using the same FM6126A chips above that it occurred to me to give the resetmatrix.py fix a try. And it works! Once again @shades66 thank you, you absolute legend!

@Shemham
Copy link

Shemham commented Jan 22, 2019

So I'm still having issues, it seems the first time I ran resetmatrix.py was a fluke, ever since I've had several areas of my 64x64 matrix different shades, see attached image, if I link 2 panels then run sudo python3 resetmatrix.py the first panel displays the image fine with 100% matrix coverage but the second panel has several areas of different brightness, i'm sure it's the terrible job i've done editing the code which is also attached but if anyone coudl point me in the right direction i'd be eternally grateful.

image

resetmatrix.py.txt

@shades66
Copy link

Hi,. In the script try updating the line

if(x==(128-12)):

To

if(x==(max-12)):

And see if that works

@bobdavis321
Copy link

bobdavis321 commented Apr 22, 2019 via email

@marcmerlin
Copy link
Contributor

So, reset_matrix works, but on wider panels (here 128x64 ABCDE), I have to run it multiple times until the entire panel on all colors, gets turned on. Sometimes I get one color all the way through and not the other ones
See picture (ignore the vertical bars, that's the refresh rate being too slow)
image
So the script does help a lot, but there is a timing problem

@marcmerlin
Copy link
Contributor

marcmerlin commented May 2, 2019

I'm also having issues getting this to work with the active3 board. When I activate port #2, port #1 stops working.
I have to unplug port #1 while activating port #2 and then both work.
But this is starting to be a bit annoying :)

Attached the script, all I did was change the port numbers for RGB1/2, but I guess the clock and reset signals are being sent to all panels, so port #1 gets broken while port #2 gets fixed.

resetmatrix_p2.py.txt

I've just opened a proper bug to track FM6126A and see if @hzeller may have an idea: #807

@marcmerlin
Copy link
Contributor

I'll continue on the new bug, but I made a script that works on all ports of the active-3 board

@Galaxy-Man
Copy link

Galaxy-Man commented May 19, 2019

Hi, I will not go into how many weeks I have spent trying to get my panel to work.
I have a question how do you use the Reset Code for the FM6126A, it's not clear.

Do I load Reset Code into Teesny run it with panel connected then compile and load my sketch or do I merge it into an existing sketch ?

Does anyone have an example of completed Teensy code?

I have same panel as vmisiek, P3 64x32 HUB75E with FM6126C Shift Reg and 74HC245C Octal Bus Trans. Connected to it I have the Teensy 3.2 and SmartMatrix v4 board.

However I did get the panel working using a Mega and RGBmatrixPanel library, but only the left 75% worked.
Using these connections. https://raw.githubusercontent.com/DFRobot/DFRobotMediaWikiImage/master/Image/DFR0499_Connection_Diagram.png

Thanks for any help.

@Galaxy-Man
Copy link

Galaxy-Man commented May 19, 2019

I haev it working, I used the DFRobot library and the recommended connections. All worked first time!

I did have to use Bob's reset code which worked well and now inserted into the example code.

Thanks for reading my previous message. I can now write what I wanted to do weeks ago!

Should anyone have same issue look to DFRobot.

@marcmerlin
Copy link
Contributor

@Galaxy-Man which DFRobot library is that?
But yes, you have to run the reset code first. You can merge it into your own code and run it in setup, or upload the reset first, then switch to the other code you want to run, and upload/run that.

@Galaxy-Man
Copy link

Galaxy-Man commented May 29, 2019 via email

@ntsarb
Copy link

ntsarb commented Jun 19, 2019

I'd be grateful if you provided some guidance on what would need to be changed in the reset script for a single 64x32 panel that relies on FM6126A. I attach the modified version that I'm trying to apply, which doesn't work (black screen).

resetmatrix.py.txt

I use a Raspberry Pi Zero, connected as per diagram here:
[(https://github.com/hzeller/rpi-rgb-led-matrix/blob/master/wiring.md)]

The rPi runs Raspbian Lite, audio has been deactivated (not listed in lsmod). Deactivated SPI, I2C and 1-wire from raspi-config. Removed bluez.

I've checked if the connections are right, hopefully I haven't screwed up there!

Update (22/6/2019): I've now replaced the color-coded DuPont jumper wires with the Adafruit RGB Matrix Bonnet, I set max_led=128, and the script worked fine! Thus, I can only assume that I misinterpreted the wiring diagram (pin numbering on the connector) as I did double check all the connections.

@ntsarb
Copy link

ntsarb commented Jun 19, 2019

Hi, I will not go into how many weeks I have spent trying to get my panel to work.
I have a question how do you use the Reset Code for the FM6126A, it's not clear.

Do I load Reset Code into Teesny run it with panel connected then compile and load my sketch or do I merge it into an existing sketch ?

Does anyone have an example of completed Teensy code?

I have same panel as vmisiek, P3 64x32 HUB75E with FM6126C Shift Reg and 74HC245C Octal Bus Trans. Connected to it I have the Teensy 3.2 and SmartMatrix v4 board.

However I did get the panel working using a Mega and RGBmatrixPanel library, but only the left 75% worked.
Using these connections. https://raw.githubusercontent.com/DFRobot/DFRobotMediaWikiImage/master/Image/DFR0499_Connection_Diagram.png

Thanks for any help.

@Galaxy-Man marcmerlin sent me the following link that you may find useful:

https://github.com/marcmerlin/SmartMatrix/blob/FM6126A/examples/FM6126A_reset/FM6126A_reset.ino

@Galaxy-Man
Copy link

Galaxy-Man commented Jun 19, 2019

Hi

Im using the DFRobot_RGBMatrix library
Arduino Mega
Wiring diagram as previous message
Bob's reset code as previous message
Panel works fine 100%
I am working on getting it over to the Raspberry Pi, Teensy and ESP32
I will update in a few days
Cannot do any more , I'm off to the Pub. There's a pint and bag of crisps with my name on them :-)

@Galaxy-Man
Copy link

@Galaxy-Man
Copy link

DFRobot library found here
https://github.com/DFRobot/DFRobot_RGBMatrix

@wz233
Copy link

wz233 commented Sep 2, 2019

Hi, I am trying to use STM32 to drive the 64x64 RGB LED matrix using FM6124 chips, but I failed to turn on a “stable” pixel using GPIO simulation. I follow the procedure below:

All row selection lines (A,B,C,D,E) are low, OE high, LAT low, CLOCK low;
Select Row 1 and Row 32 by setting A=1, B=C=D=E=0;
Shift 64 bits (0xFFFFFFFFFFFFFFFF) out via R1 and R2 pin with clock;
LAT high and turn it into low after a few cycles;
OE low (Enable output).
Theoretically speaking, the procedure discribed above should turn on Row 1 and Row 32 with RED color stably, but these two lines just give me a quick “flash”.

What’s more, if the number of row I select is larger than 8, these two lines will be flicking…

Sorry to disturb you, hope can get some help here. Thanks.

@wz233
Copy link

wz233 commented Sep 2, 2019

Darn, so I ordered a couple of the SRYLED panels to test the issue and put the suggested initialization logic directly into the library (thanks for the legwork @shades66 ).
However, the LED panels I received have ICN2037 chips on it, and they work right out of the box :/
I guess that is one of the situations where you one day get one batch of devices, the other day another...
Anyway, I'll see to add the initialization sequence on the weekend 'blindly' and then ask here for people to test.

I talked to the Sryled guys, they had so many complaints and issues with the new chip, that they switched to this one now. From what I understood they won't ship the other one any more.

Quote:

now we don't sell FM6124 and FM6126A chip led module, because some customers said it is difficult to use. Now our chip is ICN2037, it is easier to use.

(@hzeller I have one panel with the FM6126A I could possibly send it to you.)

Does that mean FM6124 also has a hidden register? I saw this piece of code from PxMatrix.

inline void PxMATRIX::writeRegister(uint16_t reg_value, uint8_t reg_position)
{
  if (_driver_chip == FM6124 || _driver_chip == FM6126A){

    if (_driver_chip == FM6124) {
       Serial.println("\nFM6124 - REG: " + String(reg_position));
    } else {
       Serial.println("\nFM6126A - REG: " + String(reg_position));
    }
    ...
}

@hzeller hzeller closed this as completed in 7160a8a Sep 3, 2019
@hzeller hzeller reopened this Sep 3, 2019
@hzeller
Copy link
Owner

hzeller commented Sep 3, 2019

So I have added the init code now, which you can use with --led-panel-type=FM6126A.

I have only tested with a single panel that I got from @esden and was using the initialization sequence provided here in the python script further above.

Please let me know if it now works for you with this option.

@DarioMaechler
Copy link

Hi,
I just tried (RGBMatrix::Options) options.panel-type="FM6126A" in c++ with two 64x64 panels in a single chain.
It works nicely, but only with the following settings:
options.cols = 128 and options.chain_length = 1
instead of the previously used:
options.cols = 64 and options.chain_length = 2.
With the old settings the second display stays dark, the first one works fine in both cases.
This doesn't have any practical relevancy for me, but it's still odd. I guess with the previous setting the second Panel wasn't reset?

@Toby406
Copy link

Toby406 commented Aug 8, 2022

Just for the record:
I bought a Waveshare LED Matrix (https://www.waveshare.com/wiki/RGB-Matrix-P3-64x32) from Amazon and got really dim and washed out colors. It uses FM6047 chips on which I could not find any information.
Out of pure despair I ran the mentioned Python script with default pins and all my issues where gone. Thank you so much @shades66 and @lucasParis !

Here it is (github doesn't want python files, had to add .txt extension) resetmatrix.py.txt

How did you even know about those configuration registers?

@SThiviyan
Copy link

I dug up an old rbpi from work, installed raspbian and hooked up the panel.

I changed the above script to support single panel and the default wiring mode and it worked. (yay)

I need to re-run the script on power cycle, so not sure if I can easily load this, then connect to pxmatrix and test. If I find some time (not sure when), I will see if I can reproduce the above script in pxmatrix init code.

(Also noticed that the brightness setting on the demo apps do not work anymore.)

How exactly did you do that? I tried to rewrite the script, yet my display still stays dark

@bobdavis321
Copy link

bobdavis321 commented May 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests