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.67k stars 1.17k forks source link

RPi 3 + 32x32 Panel, Doesn't work... #170

Closed jonashammerschmidt closed 7 years ago

jonashammerschmidt commented 8 years ago

Hey guys, This is my setup:

I hooked the panel up and see some flickering like this: http://i.imgur.com/XU1hcIA.jpg

Now I've connected the panel to my Pi and the flickering stops. But I see nothing, while running "sudo ./led-matrix -t 10 -D 1 runtext.ppm".

Would you kindly note that I'm a newbie in this hole thing. Therefore I think, the solution could be very easy. But from my point of view, the panel is well powered. What could be my problem?

hzeller commented 8 years ago

Given that the SK Pang people made this in 2014, it is likely that they use the old pinout. For that, you need to uncomment

DEFINES+=-DRGB_CLASSIC_PINOUT

in lib/Makefile and recompile.

jonashammerschmidt commented 8 years ago

I have the same problem. I see nothing, but now the program killed itself after 10 seconds now. Previously, i had to Crlt + C to kill it.

jonashammerschmidt commented 8 years ago

Now I use jumper cables to wire it up. Now it's definitely recieves data. I can see some kind of scrolling now, but it doesn't show the right image. I tried DEFINES+=-DRGB_SLOWDOWN_GPIO=2. And the Sound interaction thing. But it doesn't solve the problem.

jonashammerschmidt commented 8 years ago

Now I got this: https://www.youtube.com/watch?v=WblwZX8szkk I see some kind of scrolling. Any suggestions?

jonashammerschmidt commented 8 years ago

I'm still helpless. Without powering the panel, I only got red pixels on. With 5V 2A all LED lights up but only every fourth displays something scrolling. Tried every opened and closed issue, which could solve my problem, without any success. I really need your help, I'm about to giving up soon, but I won't.

hzeller commented 8 years ago

These are the most important things:

jonashammerschmidt commented 8 years ago

I exactly followed the instructions in the README, multiple times. But the level shifter thing could fix it. I ordered the Adafruit HAT. Could you recommend this level shifter?

hzeller commented 8 years ago

I would recommend using the level shifter provided in this project. https://github.com/hzeller/rpi-rgb-led-matrix/tree/master/adapter/active-3

The Adafruit should work (but remember to change the library compile flags to use the Adafruit pins as they choose a different pinout. Also, you might want to do the hardware modification needed on the Adafruit HAT improve PWM timings. The README explains all necessary steps).

jonashammerschmidt commented 8 years ago

Thank you. Now I can definitely see the result. But now the panel looks like this. (c = right color, w = white color)

wwwwwwwwwwwwwwww wwwwwwwwwwwwwwww ccccccccccccccccccccccccc ccccccccccccccccccccccccc wwwwwwwwwwwwwwww wwwwwwwwwwwwwwww ccccccccccccccccccccccccc ccccccccccccccccccccccccc

There are white rows on the panel, but "behind" them, I can see the right result.

jonashammerschmidt commented 8 years ago

Any suggestions?

hzeller commented 8 years ago

do you have a picture of this? e .g. how does it look like when displaying demo 0 ? What are your settings you give to the program ? Do you have a logic level converter?

jonashammerschmidt commented 8 years ago

Clip of demo 0: https://www.youtube.com/watch?v=E_yTBEC02Ug

sudo ./led-matrix -t 100 -r 32 -D 0

The Adafruit HAT. I did the Makefile changes (DADAFRUIT_RGBMATRIX_HAT and tried the DADAFRUIT_RGBMATRIX_HAT_PWM thing).

hzeller commented 8 years ago

In that video: is the data cable come in from one of (left or right) or from one of (top/bottom) ?

If it is (left/right), then this looks pretty strange as it essentially means that the shift-register messes up things.

If it is (top/bottom), it sounds like either

jonashammerschmidt commented 8 years ago

The cable is coming in from the right. What is your recommendation to fix this? Should I try an other panel, e. g. the Adafruit panel?

hzeller commented 8 years ago

Did you try the -r8 -c4 paramters and did it change anything ?

jonashammerschmidt commented 8 years ago

Of cause, I got nearly the same result, But now row 5 to 15 and 20 to 32 are off. http://i.imgur.com/KpjoPsN.jpg

hzeller commented 8 years ago

Ok, so you are on to something, this is good news. Write a little program that goes through all the pixels to understand the pixel mapping inside that panel and write a transformer (include/transformer.h).

jonashammerschmidt commented 8 years ago

Ok, thank you! This gives me great hopes.

jonashammerschmidt commented 8 years ago

I changed your minimal-example code. I write a program to fade from nothing to green, like this:

for(int i = 0; i<255;i+=1){ canvas->Fill(0,i,0); usleep(20000); }

I got the first 16 rows in white. the last 16 rows with the same white rows every third and fourth. Additionally, the 8 pixels, which doesn't displays white changed from Red to Yellow, like the basic color is red and they mixed together into yellow. https://www.youtube.com/watch?v=sBwhBpneeU4

Update: The panel has a 1/16 Scan Rate.

hzeller commented 8 years ago

Sounds like you got it working ?

jonashammerschmidt commented 8 years ago

No, I got no response from my last post... I paused this project for some weeks, but now I will try to get it work.

jonashammerschmidt commented 8 years ago

I started this project to program a 32x32 led panel. I'm not very into soldering and all this stuff. The best way for me, would be a all-in-one solution.

hzeller commented 8 years ago

if you have strips missing like that it could be that you have 1:8 multiplexing for which you have to write a transformer until this is more permanent part of this library.

Only you have your board, so you need to systematically find out where pixels are mapped. See if this is a 1/8 or 1/16 by trying --led-rows=16 --led-chain=2 (for 1:8) vs. --led-rows=32 --led-chain=1 (for 1:16) and let something run over it. Write a little program, that goes through pixel by pixel so that you understand what mapping your panel has. You already started with the program, you just need to refine it to understand your mapping.

jeffmjack commented 8 years ago

I had a similar problem with RPi 3 scrambling LED outputs. I found that when I hooked up the pins according to the older RPi diagrams (the 26-pin layout) it worked though.

Could there be something about the RPi3 GPIO pins at a low level that are making them behave like the old 26-pin architecture for this library?

Anyway, maybe try jumping the wires from your cable to the following RPi pins:

LED pin Rpi physical pin
G1 R1 13 23
GND B1 6 26
G2 R2 21 24
GND B2 19
B A 16 15
D C 22 18
STR CLK 7 11
GND OE 12

Hopefully this is somehow helpful...

jonashammerschmidt commented 7 years ago

It's finally done. The Matrix works as intended and I am super happy about it. I bought a RGB LED Panel by adafruit and their HAT to avoid problems discussed above. I guess I ruined the old HAT with a soldering gun, so I bought a new HAT, a pencil style iron and try it again. And it finally works. Thank you so much for helping me!