Growing up, our house always had an air hockey table. I have no idea when or where we got it, and to be honest I never asked. It's just been an accepted part of my life that we have an air hockey table. Equally as accepted is the fact that the scoreboard doesn't work. We had to keep track of the score in our heads like idiots! So I finally got around to making a new one.
I started by measuring the table's mounting system and power supply for the scoreboard. It was just two screws holding it down on the side which makes it easy to duplicate, and the power supply gave 6V to the old scoreboard. This is great because it's enough to power the 5V of an arduino nano that I had lying around, and isn't overpowering it to the point where the voltage regulator on the arduino would generate a lot of heat.
I bought this 7-segment matrix display and used some buttons I had lying around (one for each player to tally, and one to reset scores). The buttons weren't originally momentary, I had to cut into them with a knife to remove the clicky part and as a consequence they aren't very good at being just on or just off. They tend to flicker a little bit. I had to write the code to account for this because in testing one press of the button would sometimes yield 3 or more points on the board. Future me will have hopefully looked into button debouncing before his next button project which I believe would fix the issue in a more elegant way.
The code works by repeatedly executing the loop function, waiting for something to do. It continuously checks the state of the pins connected to the buttons (of which there are two on each side of the table to tally score and one red on the top of the scoreboard to reset) to see if one has been pressed. If it detects a button is pressed, it will update the player's global score count variable, then trigger the last if statement in the loop. That loop statement's sole purpose is to be the executor of the scoreboard updating function.
For the case/frame, I laser cut some pieces of acrylic and glued them together. This was not a great way to do it, because I don't think it's very structurally sound and it was a huge pain to assemble. Also, I never would have thought that it would be incredibly important, but I should've tested the glue! When it dried it expanded and pushed itself through the creases to the point where I had to remove the chunks of it with a pocket knife. Who would'a thunk?
Upon installation I found that the power supply of 6V DC was not even close to capable of supplying the current draw from the display (perhaps the source of problems with the old scoreboard?). I had to improvise and hack into the main switch that controls the 110V AC flow to the rest of the table. From their I wired in a wall wart USB phone charger I stole from the family electronics drawer, and cut into the USB wire to harness the 5V it puts out. Luckily this did the trick.