hzeller / rpi-rgb-led-matrix

Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO
GNU General Public License v2.0
3.66k stars 1.16k forks source link

P3 Matrix RGB LED 64x32 HUB75E #746

Open vmisiek opened 5 years ago

vmisiek commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

shades66 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

vmisiek commented 5 years ago

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

Please send :)

lucasParis commented 5 years ago

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

schnibel commented 5 years ago

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 (https://github.com/2dom/PxMatrix/issues/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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

The dimness and the glitches might simply be a power issue, or signal degregation, try with different gpio slowdown values.

schnibel commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

Shemham commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

Hi,. In the script try updating the line

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

To

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

And see if that works

Shemham commented 5 years ago

Thank you, that's done the trick. once again, many thanks.

stevie-the-tv commented 5 years ago

Thanks so much to whomever figured this out. I have a 12 screen setup were the last 3 arrived after december. That was a big bummer when they finally arrived, my screen was complete (....for now) and 3 of them didn't work. Translated this python code to the pin-wiggles, to 6 screen-chains (have 2 of them) and then to VHDL (I use an FPGA dev-board to translate HDMI and drive the whole unit)

https://www.youtube.com/watch?v=OPDcUbJsSHU (I know, I know, I still need to remap some pixels...)

Anyhows, I was getting close to mad of searching and emailing with the not-so-helpfull chinese I bought this from when I stumbled into this thread after searching the changed IC's I'd found on the panels. And now it works \o/ I've added a link to the working panels together (they can work together with "old" panels! Don't let the seller convince you otherwise :/ ) so you may be able to join in my happiness.

Which again is thank to someone here. Thanks thanks thanks!! img_9552 img_9551 img_9550

hzeller commented 5 years ago

Thanks for figuring out the details and writing a Python initializer! I'll see that I can integrate this in the library directly so that people in the future have it work automatically. I don't hae a 75E panel currently to test, I have one on order at Aliexpress. But I might implement it 'blind' first, then ask this thread for you to test.

patrickhirsh commented 5 years ago

I'll keep an eye out for updates here - I'd be happy to test!

kkiplinger commented 5 years ago

Thanks to shades66 for posting the Python initializer. For anyone using panels that have the FM6126 chip, this should solve the problem. Note that this script is specifically for the standard wiring described in the Connection section. If you are using an Adafruit Bonnet or Hat, the wiring is different and will not work. However, I have made a version of the script with a revised pin out so that it will work with the Adafruit adapters: resetmatrixAdafruit.py.txt

I have tested this using a couple of FM6126 equipped 64x64 panels from eBay: 64x64 panels

puffycholo commented 5 years ago

Hello! Any idea on how to use the initializer so that it can be used on an adapter? I have a 4x3 setups of panels. the first 2x4 chain has the old chipset while the 3rd one chain has the new one. Any fix for this?

kkiplinger commented 5 years ago

puffycholo, I currently have three 64x64 panels chained together. One has the older FM6124 chips and the other two have the FM6126 chips. In my configuration the older panel is last in the chain. I am using the Adafruit Bonnet adapter on a Pi 3. As long as I run the resetmatrix script (AdaFruit variant) before running rpi-rgb-led-matrix, all three panels work properly. In fact, I put the resetmatrix initializer call in my /etc/rc.local file so that it runs automatically each time the pi is booted. Of course this is temporary as I know that hzeller is planning to add built-in support for the FM6126 at some point.

dGlashouwer commented 5 years ago

Massive thanks to all of you, thanks to these scripts I managed to get my displays working.

gioreva commented 5 years ago

Why i receive this error ?

sudo python3 ./set.py Traceback (most recent call last): File "./set.py", line 4, in from gpiozero import LED ImportError: No module named 'gpiozero'

kkiplinger commented 5 years ago

If you are using Raspbian Lite, GPIO Zero is not installed by default. So all that you need to do is install the library to fix this error.

sudo apt update sudo apt install python3-gpiozero

gioreva commented 5 years ago

I am trying to use Tiny Core for the problem of Flikr. It seems there is not in the repository

tc@box:~$ tce-load -w python3-gpiozero Downloading: python3-gpiozero.tcz Connecting to repo.tinycorelinux.net (89.22.99.37:80) wget: server returned error: HTTP/1.1 404 Not Found md5sum: python3-gpiozero.tcz.md5.txt: No such file or directory Error on python3-gpiozero.tcz

hzeller commented 5 years ago

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.

DaveDavenport commented 5 years ago

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.)

fjanus commented 5 years ago

Hello to hzeller and patrickhirsch! I am trying to use the FM6126 modules on a non-RPI or non-phyton base and see that you have some knowledge. I successfully use modules with ICN2028 drivers but cannot get the FM6126 to work properly. Can you please give me some description on the configuration registers of the FM6126 and how to access them?

With kind regards

Friedrich

fjanus commented 5 years ago

Hello to all. Got the FM6126 to work as expected :) BUT had to pull the barf bag for this. The datasheet is s..t. For your enlightenment: if you want to latch the data into the output register you have to rise LE three clocks before the end of the line!!! With the last three clock pulses then the data have to be applied also. Makes things a LOOOT easier - hmmm?

rgds

alinke commented 5 years ago

Having the same problem, in my case I use a different driver board, this one http://ledpixelart.com/pixelv2board/. This board worked fine on the ICN2028 chipset but with FM6126, just a dead screen. Henner, thanks for the tip on SYRLED, am going to try those, would you or anyone happen to know if ICN2037 behaves the same way as ICN2028?

marcan commented 5 years ago

So I have some FM6126 panels, which are apparently equivalent to the ICN2038S/2045 (or at least that's what they're configured as in the Linsn software), and some Linsn hardware to drive them. The Linsn stuff has a UI that lets you tweak the config and shows the register values; this is what it calls the various bits:

reg1
76543210 76543210
 ####             Low blanking grade
     ### #        Current gain
1         1       Always 1

reg2
76543210 76543210
     #            Delay active
      #           Open time-share
       #     #    Low blanking mode enhace (both 1)
               ## Low grayscale 0-2
           1      Always 1

reg3
76543210 76543210
              ### Delay time (16ns + 8*n)
bobdavis321 commented 5 years ago

Many Thanks to @shades66 and Dave Davenport! I have been trying to get some of these panels to work for weeks and your resetmatrix.py code fixes it. I have also been trying to port the code to an Arduino with limited success. The Arduino code is now at: https://bobdavis321.blogspot.com/2019/02/p3-64x32-hub75e-led-matrix-panels-with.html

northwarks commented 5 years ago

Hi @shades66 I'm having woes trying to get a 64x64 2.5mm pitch panel working both with and without the Adafruit Bonnet. How would I change the resetscript to try and fix my 64x64 panel ?

HousseinSayed commented 5 years ago

Hi,

@shades66 , I recently purchased this screen (64x64 p2.5 with FM26126A) and been trying to control it since then. I have read the solutions here and tried them. Moreover, I am developing the code on altera FPGA (VHDL).

I think I managed to load the configuration in the registers but my problem is that I am not able to provide an output. I am currently looping over all the addresses (rows) which causes the rows to light up. But the lighting is random and does not seem to respond to my controller's RGB output. Maybe @stevie-the-tv can help me too?

northwarks commented 5 years ago

Hey after much faffing I managed to get things to work with the script and the Adafruit Bonnet, plus for the record two 64x64 2.5mm pitch panels work fine with an 8amp power supply with all the demos so happy days.

HousseinSayed commented 5 years ago

I am currently getting this imageHere and I have no idea whether this is an issue of configuration or sending the data to display. This is supposed to display a red line at 0 and 33 and the rest blue.