MAIN   ARTICLES   CAMS   PROJECTS   PICTURES   CODE   CONTACT 


Raspberry Pi driven 128x32 LED sign

This is a 128x32 pixel LED display built from 8 "P10" LED Panels and a Raspberry Pi board. The code its running is takes UDP data from another computer and displays the pixels in either one or two bits per pixel. The sign is pictured here being driven from an empeg mp3 player. It can be driven by anything with ethernet (a network port).

The sign is constructed from wood, its about 1.3m wide. It has a matching stand which it just sits on, the sign can be removed and even wall mounted if brave.

I sourced the led panels from ebay Look for Red led display module P10 32x16 LED

If you do want to make one you need 8 panels, but it's best to have a spare in case one gets damaged.

LED sign on its stand
Inside the back of LED sign
Raspberry Pi and driver board

Click on a picture for a larger version


The Raspberry Pi board is mounted inside the sign box. Its in a rather nice laser cut perspex case available here from PCATS

Case Construction

The box is made from two different sizes of wood with a hardboard back. The frame is glued and screwed together, the slats are placed in to line up with the mounting holes in the P10 boards. The P10 boards sit far enough from the front face for a 3mm red perspex panel to mount in front. Corner sections made from painted PCB material screwed with black screws hold the corners of the perspex panel.

P10 Boards

The term serial in the description refers to serially loading of shift registers, not RS232 or SPI.

The P10 boards daisy chain together. This sign uses a strange arrangement, the top 4 boards are daisy chained right to left, the bottom 4 boards are mounted upside done and daisy chain left to right. This arrangement allows the cables to be short, this helps with clocking the data fast. The 2 bits per pixel code updates the display at more than 400 complete frames a second.
The P10 boards use a set of shift registers, these are serially loaded with pixel data. The pinout of the P10 is pretty simple, lines "A" and "B" are a two address bits, these selects which row is active. SCLK changes state to update the active row (strobe). R is the pixel data (red), CLK is the pixel clock. OE is used to enable/disable the shift registers. This turns all the leds On or Off. At any one point 1024 leds can be one, the display is 4096 leds in total so its required that you keep clocking them to update the display. The raspberry Pi is amply fast enough to do the job. Pictured left is a minimal level converter for 3v to 5v logic to drive the panels. You probably don't need it as I suspect that the panels will work with the 3 volt signals.

Power Supply

A PC Power supply is wired to the sign. The unit has 3 red and black 20Amp cable pairs, one pair connects to the top 4 panels, the second pair connect to the bottom 4, the final pair is used just to power the raspberry Pi. This separate power for the Pi board is important. Each panel takes a worst case 4 Amps. With 8 Panels connected that is a worst case total of 32 Amps, under this type of current draw the 5v voltage will tend to sag, it may even drop below 3 volts. My experience is that this causes the RPi to crash. To prevent problems I power the Pi board from the ATX power supply standby power line, this line is regulated separately from the main 5v supply. To connect the PSU to the sign I purchased a PC motherboard power extension cable and cut one connector off, this leaves an ATX socket with wires. I soldered the wires to the 3 5v red and black wires having threaded heat shrink along the cables first. If done carefully this ends up moderately neat, though not exactly pretty. It does mean the sign has an external power unit. I could have built it into the sign case, but that would make the box much deeper than required so I thought it a reasonable compromise.

Raspberry Pi I/O

The P10 boards use a set of shift registers, these are serially loaded with pixel data. The pinout of the P10 is pretty simple, lines "A" and "B" are a two address bits, these selects which row is active. SCLK changes state to update the active row (strobe). R is the pixel data (red), CLK is the pixel clock. OE is used to enable/disable the shift registers. This turns all the leds On or Off. At any one point 1024 leds can be one, the display is 4096 leds in total so its required that you keep clocking them to update the display. The raspberry Pi is amply fast enough to do the job. Pictured left is a minimal level converter for 3v to 5v logic to drive the panels. You probably don't need it as I suspect that the panels will work with the 3 volt signals. I've built a somewhat more complicated board as I intended to be able to drive the panels from either a PIC microcontroller or the Pi, in the end I didn't need the PIC.

Pi LED Sign Software

The software is little bit tricky. It needs to clock data into the sign at a fair rate. Two programs for driving the sign from the Pi are included here, p10_board_empegdisplay.c. this drives the board in one bit per pixel. It enables you to specify the amount of the time the LEDS are on and the amount of time OFF. I find a pattern of off for 4 periods of time off and one for on on gives a nice bright display without getting the boards hot, this saves a lot of power. The time the leds are on or off is specified on the command line, use -h for help

p10_board_empegdisplay_2bpp is the two bit per pixel display code. This turns the brighter pixels on for a longer time, it still has some blanking time so the panels don't run too hot. This code works well ish ! The snag is that produce the dim pixels the panel needs to turn the display on for a only a very very short period of time, because this time is so brief any jitter in the timing is visible as a change in brightness. This makes the dim pixels slightly flickery. If anyone can cure this let me know.

The script "./compile" is used to compile everything. I didn't see the point in a Makefile for a project of this scale. I'm using the debian arm toolchain on a desktop PC to cross compile the binaries. The binaries are included in the tar file.

All code is GPL.
Download p10 sign code here, source is included.

EMPEG Software

This code broadcasts the contents of the Hijack kernels two bits per pixel framebuffer as UDP data. To use you first need to enable the telnet server on the empeg.

Add "ktelnetd_port=23" to config.ini file in empegs "/empeg/var" directory then ftp the file to the player. Copy broadcastfb_proc to the players root directory, telnet to the player and make it executable (chmod +x /broadcastfb_proc). That is about it, if you use the "-k " option on the sign software it will telnet to the empeg player and start the broadcast code if it does not receive UDP data.

All code is GPL.
Download broadcastfb_proc here, source is included.

Sign Stand

The stand the sign sits on is made from some bits of wood that I had lying around. Matt black spraypaint and body filler is used to make it look the part.

Example Video

This video is a bit out of date, I will upload a new one when I get time.




For details of a simple one line LED sign see here

All content on this site is (c) 2014 Jonathan Andrews, This article is marked as free and open. Feel free to copy and or republish it