How the RGB led panel works inside

The RGB led panel has a two 16 pins male connector where to send data using a synchronous serial transmission.

  • Three data lines are for the Red, Green and Blue (Rx, Gx, Bx)
  • One line is for the serial clock (CLK)
  • One line is for latching the data sent after 32 clock pulse (STB)
  • One line is to enable the latch output line to the led (OE)

The panel is logicaly splitted in two section:

  • Top 16 rows of 32 led each
  • Bottom 16 rows of 32 led each

R0, G0 and B0 are the data sent to the top block

R1, G1 and B1 are the data sent to the top block

Four address lines (A,B,C and D) select to which row of led are sending the data on Rx,Gx and Bx lines

This is the lock diagram of the internal parts of a RGB led panel

RGB led panel pinout

This is the pinout of input data connector:

LED Pin # Signal Description Arietta pin # Line gpio ID
1 R0 Red 1st bank J4.10 PA21 21
2 G0 Green 1st bank J4.8 PA22 22
3 B0 Blue 1st bank J4.7 PA23 23
4 GND Ground J4.9
5 R1 Red 2nd bank J4.11 PA24 24
6 G1 Green 2nd bank J4.13 PA25 25
7 B1 Blue 2nd bank J4.15 PA26 26
8 GND Ground J4.9
9 A Row address J4.28 PA5 5
10 B Row address J4.27 PA6 6
11 C Row address J4.26 PA7 7
12 D Row address J4.25 PA8 8
13 CLK Clock J4.17 PA27 27
14 STB Strobe J4.19 PA28 28
15 OE Output Enable J4.21 PA29 29
16 GND Ground J4.9

On the output data connector just replicates the input lines for a wire another RGB led panel display.

The power supply connector needs 5 VDC @ max 3A. At this current all leds are on at maximum brightness.

How the ledpanel Linux driver works

All the rgb led panel are generate in bit banging mode using normal GPIO lines. To go as fast as possible a Linux driver written in C code is required. The driver I wrote can update the whole panel contents 679 times per second leaving enough time to Linux to do other jobs in the meanwhile. The main routine of this driver is a callback function called by a hrtimer 10800 times per second at interval of 92uS. In just 22uS this routine check the brightness of each color and send a simulated pwm signal to any led (32 x 3 color = 96) on a single row then exit. It will be called again by the Kernel after 66uS.

The fully source code of this driver is available under GPL licence on GitHub: ledpanel source on GitHub