The actual first time I worked with such a panel was on the 36C3 in the end of 2019, when a friend of mine tried to get them running with an esp32. I wanted to also do some fun things with such a panel, so I got myself a 32x64 P.3 RGB LED panel.
January 22nd, I got this panel in the mail, and having no other controller on my hand back then I just wanted to get it working with the NANO. I've seen many libraries and projects with the UNO and a 16x32 panel, but everything this size was always run by a teensy or a pi. I looked for Libraries, but couldn't find any.
Sparkfun even states that:
At least an Arduino Uno (or comparable ATmega328-based Arduino). These panels really stretch the Arduino to its limits. If you have an Arduino Mega 2560 you may want to whip that out instead. Any size higher than a 32x32 panel requires an Arduino Mega 2560 or faster microcontroller.
So I went ahead and made my own. The first problem was the pinout of the panel, but that was quickly solved by some searching on the internet.
I just connected the Panel and the Arduino with a wiring table I found in some UNO library, and it seemed to also work.
For Power just use a powerful enough 5v supply, these panels draw about 30W. I use a PC power supply.
After connecting everything, which was really easy with just jumper wires, it was about making the LEDs go all blinky blinky. This part was not that easy, especially given the general lack of information on how exactly the protocol works, but in hindsight it is really easy.
I found some comment in a library which kind of explained the protocol, but some key parts like in which order to set the pins wasn't given. So here it is:
At first, you select a line to draw to via the 4 line select pins. They are in binary, ordered A B C D where a High means 1 and a low means 0. So for example for row 11 we would have A=1 B=1 C=0 D=1 (1+2+0+8 = 11). But now you might say: How is it possible to drive 32 rows with just 4 pins, which give only 2^4=16 options??
The answer lies in the fact, that there are actually two RED channel pins, two GREEN channel pins, and two BLUE channel pins, one for the upper half of the display, and one for the lower half.
Afterwards you have to set your RGB pins either on or off, then make the CLK pin go HIGH and LOW, and after a row full of led data you make the latch go HIGH LOW. You should also turn the OE(Output Enable) HIGH at some point in the line, it doesn't really matter where, I prefer the beginning.
I tried to implement a frame buffer many times, and failed even more times:
After a lot of trial and error, probably 250+ hours of work, I finally reached a point at which I can dump this thing onto the internet.
The library comes with a readme on GitHub, and many examples with commented code. I also made a small program to convert images to a format which allows them to be displayed. It comes precompiled as an.exe and with a makefile.
Feel free to add any valuable functions / ideas / suggestions on Github or here.
I plan to add some drawing methods apart form single pixels, which shouldn't be all too hard.
The actual first time I worked with such a panel was on the 36C3 in the end of 2019, when a friend of mine tried to get them running with an esp32. I wanted to also do some fun things with such a panel, so I got myself a 32x64 P.3 RGB LED panel.
January 22nd, I got this panel in the mail, and having no other controller on my hand back then I just wanted to get it working with the NANO. I've seen many libraries and projects with the UNO and a 16x32 panel, but everything this size was always run by a teensy or a pi. I looked for Libraries, but couldn't find any.
Sparkfun even states that:
At least an Arduino Uno (or comparable ATmega328-based Arduino). These panels really stretch the Arduino to its limits. If you have an Arduino Mega 2560 you may want to whip that out instead. Any size higher than a 32x32 panel requires an Arduino Mega 2560 or faster microcontroller.
So I went ahead and made my own. The first problem was the pinout of the panel, but that was quickly solved by some searching on the internet.
I just connected the Panel and the Arduino with a wiring table I found in some UNO library, and it seemed to also work.
For Power just use a powerful enough 5v supply, these panels draw about 30W. I use a PC power supply.
After connecting everything, which was really easy with just jumper wires, it was about making the LEDs go all blinky blinky. This part was not that easy, especially given the general lack of information on how exactly the protocol works, but in hindsight it is really easy.
I found some comment in a library which kind of explained the protocol, but some key parts like in which order to set the pins wasn't given. So here it is:
At first, you select a line to draw to via the 4 line select pins. They are in binary, ordered A B C D where a High means 1 and a low means 0. So for example for row 11 we would have A=1 B=1 C=0 D=1 (1+2+0+8 = 11). But now you might say: How is it possible to drive 32 rows with just 4 pins, which give only 2^4=16 options??
The answer lies in the fact, that there are actually two RED channel pins, two GREEN channel pins, and two BLUE channel pins, one for the upper half of the display, and one for the lower half.
Afterwards you have to set your RGB pins either on or off, then make the CLK pin go HIGH and LOW, and after a row full of led data you make the latch go HIGH LOW. You should also turn the OE(Output Enable) HIGH at some point in the line, it doesn't really matter where, I prefer the beginning.
I tried to implement a frame buffer many times, and failed even more times:
After a lot of trial and error, probably 250+ hours of work, I finally reached a point at which I can dump this thing onto the internet.
The library comes with a readme on GitHub, and many examples with commented code. I also made a small program to convert images to a format which allows them to be displayed. It comes precompiled as an.exe and with a makefile.
Feel free to add any valuable functions / ideas / suggestions on Github or here.
I plan to add some drawing methods apart form single pixels, which shouldn't be all too hard.