Rainbowduino Score Board Project


At work we have a Ping Pong table. It gets used almost every break and unfortunately I am never usually the winner. The most frustrating part of playing is that keeping score constantly leads to arguments that result in game restarts or just agreeing on a random even score.

To try and solve this issue I thought it would be a fun project to create a Ping Pong Score Board using an Arduino Mega that I had been messing around with. I was originally going to use 4 7-segment displays that I had for the display but after searching the internet for a better option I found the Rainbowduino. The Rainbowduino is an Arduino compatible controller board used for controlling an 8x8 RGB led matrix.

I purchased 5 x Rainbowduinos and 5 x led matrixes. The Rainbowduinos can be easily cascaded together allowing I2C controlling of the displays. I also modified the Ping Pong table at work so that score inputs could be handled by the players themselves. A button was mounted at each corner of the table and wired up to a connecter that could be plugged into the score board. This allows for the score board to be easily removed and programmed at home. I have a breadboard setup at home that simulates the table setup. All inputs from the Ping Pong table are sent to the Arduino, which in turn processes these and updates the score board as required.

Below are some pictures of the project so far with some details on what’s going on;

Figure 1. Score Board with no power.

Figure 1 shows the score board with no power applied. It is housed in a custom made aluminium box that allows power and USB to come in on the left. There is also a cable from the back that connects to the actual Ping Pong table.

Figure 2. Basic identification of top parts of score board.

Figure 2 is a basic layout of the front of the score board. 5 Rainbowduinos are mounted atop a removeable sliding platform and the Arduino is mounted to the rear of the platform. This allows for easy access to the Arduino and also permits expansion later on.

Figure 3. Score Board awaiting game initialisation.

Figure 3 shows the power after initial power on, or when a game reset command has been sent. The score board waits patiently for a player to press their button. At work, we play for serve. Meaning that we have a quick initial 1 point round to see which team serves for the actual game. Once the serve has been won, the winning player will press their button, and the score board will point the green arrow shown in Figure 4 to the serving side.

Figure 4. Score Board after a game has been initiated.

Figure 4 shows the display once a game has been initialised. In this picture, players 1 & 2 have won the serve, so the green allow indicates this. At work, a person serving has 5 serves, and then the other team get the serve for 5 points, etc. As 5 points is reached, the arrow points to the other side, as shown in Figure 5. This removes the need to remember how many serves a team has had.

Figure 5. Score Board displaying current score.

Figure 5 shows that 5 points has been reached. The arrow has changed sides indicating that Team 2 is now serving.

Figure 6. Score Board side panel removed.

Figure 6 shows the left hand side panel removed. You can see the Arduino Mega mounted to the rear of the sliding panel and the 2 I2C wires and 2 power wires coming in to the first Rainbowduino. On the left you can see the cable coming from the rear. The reason there is an additional white wire is that the actual wiring I used contains 5 wires, and I totally forgot about 5v that I needed to send to the ping pong table. My bad I will hopefully clean this up later. The green tape holing the two cables together does look very fancy though, so I might leave it.

Figure 7. Score Board Side panel.

Figure 7 is a picture of the side panel that has been removed in figure 6. It is made of aluminum as is the rest of the box. Flush mount rivets and captive nuts make it extremely easy to remove and install.

Figure 8. Score Board right hand side.

Figure 8 is a picture of the right hand side of the score board. Nothing really special to describe here. I could comment on the frosted glass table that was purchased from Freedom Furniture 3 years ago, but I wont

Figure 9. The Arduino mounted to the rear of the slide panel.

Figure 9 is the underside of the internal sliding panel. The Arduino has been mounted to allow the slide rail to move without any interference. The fit is extremely tight and keeps the score board housing looking really clean. The green sticky tape is an essential part of the mounting hardware All the wiring is just stripped wire that has been soldered and shoved into the pin sockets. This is due to making the fit so tight that there is not really room for a more suitable solution. It works at the moment so I’m happy.

Figure 10. My table simulation setup.

Figure 10 is my beautiful Ping Pong table simulator. The 4 buttons represent the players buttons on the actual table.

If you would like any more pictures, please ask. I am happy to take custom shots.

My source code can be found at code.google.com/p/pingpongscoreboard/. It is fairly untidy at the moment as I write so it does what I want, then I tidy it up. I am more than happy to take on board your ideas; especially improvements to the code that you can see would make a change for the good.

There is still a long way to go with the Arduino code. The Rainbowduinos are loaded with a modified version of “Rainbowduino Firmware 3” found at code.google.com/p/rainbowduino-firmware/. Each Rainbowduino is programmed with a unique address from 0x10 to 0x14. The Arduino Mega is programmed as the I2C master.

That’s for taking the time to read my post. I hope I haven’t score board you too much. Ha! I crack myself up.


Hey Daniel, good job! It looks like a really interesting and useful project. We also have a Ping-pong table in our office, so probably we can make one too. I’ve posted your project to our blog, hoping to see more cool projects from you!

Thanks a lot for the feedback.

I’m shocked that it is blog worthy too. That’s made my day.

Hopefully it shows others that it is not all that difficult to use multiple Rainbowduino’s together.

I am constantly working on the code for the project in the hopes of getting it as perfect as possible. I commit my changes almost daily at code.google.com/p/pingpongscoreboard/ so feel free to use any of the code there for your own scoreboard.

The hardest part of the whole project was getting a nice text scroll happening. I will upload a video of the scroll tomorrow when I get a chance.

Thanks again for the blog post.


Sweet project. Can you elaborate a bit more on that awesome aluminum enclosure? Where might someone find something of that quality? It looks exactly like the commercial LED signs enclosures.


The enclosure was manufactured at work, lightly based on a paper design I made during my lunch break. It’s amazing what a few pieces of printer paper and some sticky tape can achieve when you have nothing else to do but eat a frozen lasagne.

I am an Avionics Aircraft Maintenance Engineer by trade so I have access to some very clever people who can do some very clever things. I took my paper design to the Aircraft Structural Fitters and one of the lads there came back to me a few days later with the box you have seen. He has access to some of the best metal fabrication equipment I have ever seen so I expected something fairly slick. Having a paint shop at work also helped.

Although looking very neat the box does have some unfortunate drawbacks. As the box is very compact, which resulted in a very tidy design, space inside the box as at a premium. The displays are actually .0000001 of a human hair away from the perspex slide in that protects the LED matrix. This has at times resulted in the matrix touching the plastic as it is installed and removed. No big deal, but when removed, the plastic does have some scratches.

Behind the slide in rail that houses all the electronics, there is very little room also. I have not really allowed a great deal of freedom regarding the wiring. Future expansion has also been limited due to the box being so compact. If I ever wanted to expand and add more wiring, I would have a bit of trouble sliding in the rail.

I can not fit any shields onto the Arduino, and rear mounting them would be annoying as the height of the Arduino already required modifying the stand-offs for the Rainbowduinos so that nothing electrical got shorted out.

The end result was a very nice looking enclosure that serves its purpose well. If I was to make a future model, I would allow a bit more room to play with inside the unit.

Hope this has been helpful. Feel free to ask any more questions and I will happily reply.


Here is a new video showing the score board in action.


The quality is average but I didnt want to spend 1hr uploading a high def version as its not really that exciting. You might notice on the left hand side that there seems to be a row of LED’s lit very softly. Well, I am not sure why this is occuring but its only on that LED matrix so I am not too worried. I figure its just some sort of leak that is getting to that row.

The main feature I’d like to show is the text scrolling. This took me a long time to perfect and I am sure that there is still a lot of room for improvement. I have done the best I can without having to rewrite the Rainbowdruino firmware. That is most likely going to be the next step. There is a lot of room for improvement in the firmware that could result in greater FPS.


Nice project, we are prepare the Rainbowduino Carnival 2010 now, please visit here:
I think I will vote your project.
All the best

I am eagerly awaiting more details of the next Rainbowduino Carnival.

I can only imagine the madness I could create if the prize is similar to the last one.



can you post the code or link for the modification you did to the 3.0 firmware?