Introduction: Dazzlers Air Hockey Build.
I have built a full size Arcade Emulator, Pinball machine, and now starting a large Air Hockey table. To make it more of a challenge I will be including some electronics using Arduino.
1)Electronic scoring and score seven segment display.
2)Start button for game, start 10 min timer for blower fan operation. Resets score etc.
3)Goal activation of sound/voice clips for Home & Away goals - may theme the sound effects on Starwars or just crowd cheers etc.
4)Under light the play surface or goal and centre line with Led strips. Could colour change or sequence on goal score.
Well that's the wish list, on to stage 1.
What fan to produce the perfect floating Puc?
Step 1: Fan Selection for Floating Puc
Firstly the theory - the Puc (50 -60mm diameter ) floats on a table of air. Hence very low friction and the high speed response of the Puc when contact made with Pusher or side of the table.
It's achieved with 1mm Diameter holes, 25mm apart (Approx 3000 holes in table 1.8 meters by 0.8 meters!).
The fan has to blow air into a sealed chamber under the playing surface and provide enough pressure to push the air through the 3000 x 1mm holes. The velocity/ speed of the air coming through the playing surface has to be enough to make the Puc hover. The Puc will always cover 4-6 holes, and should glide across the table area with no resistance.
Axial fans not suitable for large tables as cannot achieve the pressure under the table.
Comercial hand driers have a centafugal fan and 240v ac motor which is ideal for this purpose. I removed the hand presence and heater element from an old hand dryer just used the housing & fan/motor.
The trial was very successful, not to noisy either once mounted in the chamber under the playing surface.
Step 2: Goal Detection Method.
These IR modules are ideal for robotic, remote control projects as they can be used for object avoidance. The IR beam will be reflected back off an object (Puc) and detected by the recevier. The stronger the signal, the closer the object.
These modules are simple to use and only have 3 pins:
3.3 -5 V input
Digital output to Arduino.
The potentiometer on the module controls when the output of the module switche from 0 to 1 based on the strength of the IR signal received.
A goal is detected when the Puc interupts the IR beam and can be used to increment the score on Arduino digital input.
Step 3: Large Score Board & Arduino Code.
Initially I used two small 7 - segment displays which can be powered directly from the Arduino Uno or Mega.
However I found some large 4 x 7 cm displays which would be more fitting for the scale of the table.
Note: Due to each of the 7 segments having 4 led's in series the forward voltage required to light them is approx 8 volts at 200mA. The Arduino outputs only 5volts so will not illuminate the segments of larger displays.
I found IC package ULN2803A - Eight darlington pairs to enable 12-50volt &
up to 500mA per channel to power large common anode 7 segment displays. One IC required per display and a 40-60 Ohm resistor on the 12Volt common anode supply to limit current to the displays to approx 200-300mA. That's it no other components required.
I used vero board to mount and connect the displays to the ULN2803A and output from the Arduino MEGA.
The Arduino code: See photos of the code for one display.
It uses Switch - Case 1, 2 ,3 - 7 to step through the code to set the outputs to the 7 - segment display when a digital input is applied to pin 12.
Further code will be added later in the build for the blower fan timer, sound and lighting effects.
Step 4: Air Hockey Table Assembly
First I got B&Q to cut 180cm x 80 cm base from 16mm thick birch plywood sheet. Also cut 4off 6cm strips for table sides which I glued & screwed through the base.
Next the blower fan housing, 80 x 50 x 10 cm (length x width x height ) glued & screwed.
Rectangular hole cut into the centre of the base to enable the blower housing to be fitted.
Blower fan air intake circular holes cut in blower housing using a jigsaw.
Fans aligned and fixed to blower housing.
Blowers fans enclosed and table separator/support fitted to separate blower output to each half of the table, preventing circular air currents interfering with PUC during game play.
The frosted Perspex table play surface was select due to its scratch resistance, strength & because I wanted to house the 7 segment score display and programmable LEDs under the play surface. Never seen before but table boundry & goal zone will appear when the table is turned ON, also with a little Arduino code will allow me to change goal boundry colour, brightness or sequence LEDs on goal scored - chasing, colour wipe etc using Neopixel libraries. Also plan to place 10 minute LED game count down timer under or at the side of the frosted play surface.
Next - template made for play surface 1mm Diameter holes 1 inch /2.4cm apart.
Great care and patience require to drill the 2800 x 1mm holes in the Perspex play surface.
I secured the Perspex to the table using aluminium profile extrusion, fixed every 10cm. The aluminium also acts as the rebound edge for the Puc. When tested the table works great and Puc speeds around the table as good as the professional arcade machines.
Step 5: Score Display & Goal Detection.
Using the large displays discribed earlier in this Instructable.
Mount either side of the center play field center line.
Power supply, input wires to increment each display to be routed through small hole to the underside of the table base.
Arduino control boards & power supplies etc will be mounted under the table, keeping 240v AC in an earthed or double insulated enclosure with suitably rated mcb or fuse for fault/fire protection.
Next- IR goal detectors install and test.....
I used 18mm Plywood for goal sides & 6mm Ply for funnel sections and front and rear covers. Do not glue the front cover as you may need to access if Puck or other object find there way into the goals! (see photos).
The IR module is used to count the goal as the Puck passes through. I made two trial goals prior to getting the final design to be reliable- key points below:
1. Puck bouncing back out the goal.
Solution - curve section at back of goal to guide Puck into funnel section.
2. Puck to fast for IR senor if hit hard.
Solution - funnel section to slow Puck prior to IR sensor module detection.
3. Puck counting more than one goal when passing IR sensor.
Solution - Revise Arduino code to ignore IR sensor for 2 - 3 seconds after goal counted.
4. Puck gets stuck in funnel or collection area.
Solution - make goal depth 10mm + Puck diameter and same for Puck collection area. The Puck must clear the IR senor by 10-20mm when vertical to prevent false goals when Puck removed from collection point.
5. Make sure you purchase the Puc before making your goal. I used 70mm dia ones. Many sizes available so make sure you buy a few in advance, and order the correct size for your goal design or they will not pass through!
6. The IR senor beam is not reflected back to the IR reciever when a BLACK Puc passes through the goal- that's the design intent. If you use red or other coloured Pucs they will reflect the IR wavelength and will not register a Goal! Black sticker can be adhered to the Puc to overcome this issue.
The final design has been tested with blower fans running and is now very reliable and accurate when counting high - low speed goals from all directions.
Step 6: The Cabinet Build.
Please see my photos of the Air Hockey table -cabinet build. I have added text to the key build photos.
Step 7: Control System Assembly.
Firstly I have fitted the following to a Perspex sheet.
Left to right on first photo.
Adafruit Audio FX Sound Board - WAV/OGG Trigger with 2MB Flash. I loaded with free WAV files on Star Wars quotes and sounds I found. These will activate on goal scored, game won and pressing the game start button. Great PCB easy to wire up and program see Adafruit Web site for details.
Arduino UNO 1 - Table play field Neopixel leds approx 5 metres with 30 leds per metre.
Arduino UNO 2 - Start button, game reset function (hold start button for 4 seconds) blower fan relay and Neopixel 10 minute timer.
Arduino MEGA - Goal input from IR sensors, 7 segment score displays
All of the code works, but not easy to program all functions onto one Arduino, hence 3 used to keep it simple!
Step 8: Completion
I used foam roller to apply grey undercoat and black top coat.
Aluminium Checker angle plate used to trim the table corners and goals.
Very pleased with the final product which cost under £200 in parts. Plenty of enjoyable hours during winter to build in my garage and learned lots of new skills. Better than watching endless soaps on TV. Give it go!
As the table sound effects and LEDs are programmable, I will write code to change themes from Starwars to Tron or the Simpsons etc to keep it interesting.