Hi,
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.
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.
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 http://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.
All inputs from the Ping Pong table are sent to the Arduino, which in turn processes these and updates the score board as required.
My source code can be found at Google Code Archive - Long-term storage for Google Code Project Hosting.. 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.
I will endeavour to put up more pictures of the actual score board and the inside of it. It is an engineering marvel, haha.
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.
Daniel.