After about a week of working on the Skee-Ball Machine the scoring and ball counting parts of the machine are working. The code is stable and most balls count correctly. One of the major functional parts that is very important is the ball release. The balls are normally released by a solenoid underneath the ball track. Since the machine stopped working manually releasing the balls was the only way to play. This involved reaching underneath the ball chute and pulling a metal bar to allow the balls to roll forward. After crawling underneath the machine and looking around I found a plexiglass shield that had a big high voltage sticker on it. After removing the shield the solenoid was exposed. Now I can get to work.
The solenoid is 120v continuous duty. When activated the solenoid pulls a metal bar on a hinge that drops a metal pin blocking the balls.
When the solenoid is energized it pulls the bar on the hinge and drops the front blocker while raising the back blocker. This allows for 9 balls to roll out for game play. The distance between the blockers determines the number of balls. With these machines you cannot change the game length without releasing balls more than once per game.
The rest of the machine has been low voltage. With the replacement microcontroller all the logic has been at 3.3v. The solenoid works at 120v. In order to switch the solenoid an isolated relay is needed. There are plenty of 3.3v optoisolated relay boards available. The use a small led and photo resistor to isolate the control signal from the switched line. In the event the relay is overloaded or fails the switched voltage will not be able to affect the control board. This requires a little extra wiring with power and signal being different. Because of the delays in shipping I was unable to obtain a relay board for a few weeks.
Instead of waiting for shipping a Solid State Relay or SSR was available with 2 day shipping. Solid State relays act much like physical relays but are isolated and can switch at a much faster speed than a mechanical relay. These are used in many situations involving Pulse Width Modulation or PWM of mains electrical voltages. In the past I’ve used them in a recirculating infusion mash system or RIMS. Solid state relays can require cooling as the rapid switching can produce large amounts of heat.
I wired the logic of the SSR to the control board and mounting the SSR with the solenoid. Next I ran romex to the high voltage side of the SSR and the solenoid and terminated the romex with a NEMA 5 plug. In the code a new interrupt was added for the game start pin to reset scores, ball counts, and game state as well as release the balls by setting the output pin high. Then a hardware timer sets the pin low after 10 seconds. During the 10 seconds the pin is high the solenoid is energized and pulls the bottom ball blocker down. The balls roll down the track and then the solenoid releases, blocking the balls already played from rolling to the player.
After all of this the game was playable. By pressing the game start button the balls were released, the score was reset, the ball count was reset, and the game was enabled. The web interface allowed for scoring and ball counts to be displayed. The scoring and ball counting switches all worked. Of course I wasn’t satisfied with the miss counting of the score and balls used due to the mechanical switching. I decided to change all the switches out for optical sensors. So I broke the machine again to change it over. Next up is optical switches, 3d printing, and other surprises.