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.64k stars 1.16k forks source link

32x64 panel has strangely distorted output. #1114

Closed russweiher closed 4 years ago

russweiher commented 4 years ago

Not sure what's going on with my panels. "./demo -D1 runtext.ppm --led-cols=64" scrolls smooth, and seems to have the correct colors, but the images are strangely interlaced but with the lines in the wrong order or something?

Here's what I've tried:

I've attached 2 pictures of the output I'm seeing.

Thanks in advance for any help you can provide, Russ

led_matrix_issue_2 led_matrix_issue_1

hzeller commented 4 years ago

This might have a different chipset than the more common panels; you have to track down the chip set, read the datasheet and provide a patch to the library to support.

russweiher commented 4 years ago

Thanks for the reply. Of the chips on the back of the panels, most of them say "TC5020A", which comes up in google as a 16-bit constant current LED driver. Are those the chips I need to find the specs for, or would it be one of the other (smaller number) of chips?

hzeller commented 4 years ago

This is certainly one of the relevant chips. But the 'double line' stuff indicates also some different wiring going on in there; maybe something happens on both clock up and down transition. I'd ask the manufacturer of the matrix itself if they can provide a datasheet how to control the resulting panel.

russweiher commented 4 years ago

Thanks David. I had found that spec sheet and the one for the FM6126A (and converted from Chinese to English) to see what differences I could find. While I am a computer programmer, I am not an electrical engineer, and don't have a lot of experience with this low level hardware stuff. All of the LED matrix panels I've purchased in the past "just worked", so I guess I've just been lucky in that regard.

I like your idea of doing a super basic program to try and test the panel, though I'm actually pretty surprised that doesn't already exist somewhere already. Surely other people have had to brute force their way into finding the correct settings in the past as new panels and chipsets came out.

russweiher commented 4 years ago

David -

I don't read chinese either, but if you look at the HTML version of the spec, and if you are using chrome, you can right-click on the screen and it will give you the option to translate to English.

I tried the command you suggested, though the max lsb-nanoseconds it will allow is 3000, which certainly strobes pretty good. I took some video of it though, and it almost seems like the screen is divided into 4 segments. The 1st and 3rd segment light up, and then the 2nd and 4th segment. Some of the frames show as solid, and some of the frames show a line skipped. When I set it to 100 I get a pretty smooth transition of colors (at 3 pwm bits), and the whole screen is filled.

I was able to find some really basic bit-banging python code here: https://learn.adafruit.com/connecting-a-16x32-rgb-led-matrix-panel-to-a-raspberry-pi/experimental-python-code

I adapted it to the newer PI pinout and added a D control line. I can get it to pretty much draw the columns as intended (the horizontal spacing of the 3 rectangles matches the given coordinates), but the rows are goofy. Depending on where I tell it to start a rectangle on the Y axis I might get a solid shape or I might get skipped lines.

Also: On the link you provided, page 14 for the TC5020A datasheet seems to just be the physical specs of the package?

russweiher commented 4 years ago

Looks like I might have found the solution. I used "led-row-addr-type = 4", and it seems to give the correct output. It was a total accident, as the readme page says that value only goes upto 3, but I was just incrementing numbers and testing.

Thanks for all the help!