Josh Fuerst's Corner

My latest project was done over Christmas break. I had been reading up a lot on Adruino boards and the new Raspberry Pi. I decided I wanted to do a project using the Pi since I enjoy programming more in python than I do in C/C++ or assembly. I wanted to construct something that would be fun and also somewhat useful. I also wanted to donate a good bit of time to the project and make sure the finished design was one that looked nice. I wanted to be able to proudly display my final result.

After much though I decided it would be fun to do a project that involved an LED matrix. I wanted to use the Pi to develop my own scrolling marquee. I wanted everything to be closed up in a box that I could sit on my desk. I had two main uses in mind. The first use was to make it clock. This seemed to be a fairly simple idea and one that could be done with limited issues. The second use was to make it an ESPN ticker. To keep a long story short here is how the process went:
Materials Used:

4LEDM88R 8x8 LED Matrix
1Prototype Board
1Soldered Bread Board
174HC4017 Decade Counter
474HC595 Shift Register
32150ohm Resistor
81.0kohm Resistor
82N3904 NPN Transistor

I cannot claim all the knowledge for this project. I received much help from an instructable as far as what parts to use. I had to expand the design a bit as the instructable was for a 24x6 matrix and mine is a 24x8 matrix. I also had to modify a lot since I chose to drive with a Pi. You can see the details at Instructables Website If you don't feel like reading all the nitty gritty... the columns are controlled by a series of shift registers chained together. The rows are controlled by the decade counter. This way I am able to control 256 LED's with only a few pins.

After the LED matrix was all soldered up and ready I turned to the Pi. To drive the matrix the GPIO pins on the Pi were used. I had to tap into the RPi.GPIO library for python to do this. Since the implementation was done using shift registers I only needed 5 pins, as described in the instructable, however I decided to use 6. I added another pin which clears out all the shift registers. The idea behind the display is just like a television screen.

To begin you must enter the first row into the shift registers one bit at a time. Then the first row is lit up. The second row is then entered into the shift registers one bit at a time and the second row is lit up. This is done one row at a time through all 8 rows. It happens so fast that our eyes perceive it as all the LED’s lit up at the same time. In reality there are at most 8 LED's on at once. To see how this works in code you download my test files here . This file simply displays the text entered into the prompt.

To display text each character had to be converted into a binary object. After some research and trial I found that each character needed at least a 6x6 square to be represented properly. In python I used an array of 0's and 1's. For example: "A":["011100","100010","100010","111110","100010","100010"] represented the character 'A'. Each index in the array is the corresponding row of the LED matrix. Each character of the string represents the corresponding column. 1 means the LED is on, 0 means the LED is off. I did run into one major issue. After I had everything running, I noticed that I had two LED's which were bad. They appeared on the top and bottom rows this is why the characters only have 6 rows and not 8.

The final step was to put everything in a nice enclosure. I decided to use oak. I purchased a sheet of oak plywood and cut out a box. Put everything together and stained the box. I decided to keep the internals on a solderless breadboard so if something blew it could be replaced easily. The Pi was mounted on a separate wooden plank. This plank is held in place by kitchen cabinet door holders. The only parts that were soldered were the LED matrix cubes. I wanted to keep everything as modular as possible. The top of the box is held on by metal pins that are normally used to hold up shelves. A hole was drilled in the back to allow for a power and ethernet cord to pass into the box.

After Additions:
I later added a wireless USB dongle which has an access point mode. This allows me to move the box around and show it off to friends. I can now connect to the Wi-Fi network it generates without the hassle of having to hook it to a TV, or figure out its IP address to ssh into the Pi.

I also registered for the ESPN API access. I then added a script that will pull down from ESPN's news ticker and display the latest headlines.

Wedding Use:
I also used this for my wedding. Instead of printing table numbers on table cards the guests found a barcode on the back of their table card. They then had to go scan their table card to find out what table they were seated at. The LED matrix would welcome the guest. An attached DYMO printer would print out their table number and a list of associated guests. You can see a video of the final design below.