Pinball arcade game
Almost every little kid (aged 20+ 😁) loves to play arcade games.
So, my proposal is a mini pinball game that can be played anywhere since it's relatively small in size and easy to carry around.
I got inspired by my memories with this game since I used to play it a lot as a kid when we visited mega mall. 😌
Designed full assembly
To add electronics
Fist side design
Extruding first side
Extruding the projected slots
Extruding the other side with solenoid screw holes
Sketching the back plate
Sketching Arduino power openings
Sketching adaptor opening
Adding the back by joints to the sides
Sketching front face
sketching ball opening
Sketching solenoid button opening
Extruding and jointing the front to both sides by tabs
Sketching sensor side
Sketching other side
Extruding both sides and joining them to the rectangular hole ends
Sketching buttons top
Projecting supporting sides' tabs
Sketching lever buttons holes
Extruding and fixing on top
Sketching LCD top
Extruding and fixing it in place
Sketching the front-back side
Sketching ball opening
Sketching ball barrier opening
Sketching solenoid opening
Sketching bracket screw hole
Fixing the back side in place by a joint
Importing LCD component
Sketching LCD front side
Creating internal bracket holes
Projecting LCD fixation holes
Fixing LCD front in place
Sketching base and projecting T-Slot holes
Projecting front tabs
Fixing base in place
Importing electronic components
Projecting components' holes
Creating playground sketch
Extruding playground
Sketching playground tabs
Sketching ball slider
Sketching sensor opening
Extruding sensor base
Sketching sensor screw hole
Projecting motor holder holes
Extruding everything and fixing in place by joints
Sketching ball border
Fixing it in place by joints
Sketching ball curve
Sketching fixation holes
Fixing two copies in place
Sketching the side triangles
Extruding and jointing them in place
Sketching bottom triangles
Extruding and fixing them in place
Sketching the spinner design
Extruding the spinner
creating 2mm fillets on faces
Sketching motor shaft opening
Sketching slot for screw head
Extruding slot and motor shaft hole
Motor holder base sketch
Extruding for 2 mm
Sketching motor holder first 2 legs
Revolving the 2 legs
Sketching and extruding screw holes
Sketching two lines to cut a flat side for the other legs
Cutting two flat sides
Sketching the other 2 legs on the normal plane
Extruding the first leg 8mm
Extruding the second leg for 5 mm
Sketching the two screw holes
Fixing motor holder in place
Sketching the first lever
Extruding for 7 mm
Sketching a 4mm offset
Extruding the offset to the servo's surface
Create a mirror plane
Mirroring the lever after mating it in place
Final assembly
RDWorks to prepare the laser cut (.DXF) file
Ulti maker cura to prepare the 3D (.STL) file
Printing material is PLA
3 mm plywood sheets for laser cutting
Imported the .STL files to Cura
Used the support blocker to avoid using supports in the screw holes
Edited the printing parameters
Slicing the parts to see the supports
Estimated time was 3hours with 46 grams
Uploading the gcode and waiting for the machine to heat up
Machine calibrating the bed distance
Kept an eye of the first layer to cancel the print if any errors appear
Print was finished after 3 hours
Uploading first sheet to RDworks
Fixing the cutting parameters
Fixing the sheet on the machine
Uploading the sheet file into the machines software
Starting the cutting process
Uploading the second sheet to RDworks and positioning them
Fixing the cutting parameters
Fixing the sheet on the machine
Uploading the sheet to the machine software and framing
Starting the cutting process
Capturing the mini parts cutting
Uploading the third sheet to RDworks then to the machine
Fixing the sheet on the machine
Framing the sheet and origin
Starting the cutting process
Finally, uploading the fourth sheet
Cutting the last sheet after the same steps
To get custom components
For the circuit design
Jumper wires
Avometer
Breadboard
Arduino Uno
IR sensor
Relay Module
Crocodile wires
LCD screen
Stepdown Converter
Pushbuttons
Solenoid
DC motor
Servo motor
12v Adaptor
Circuit design
Circuit explanation
The circuit contains four input components, three push buttons that works two servos and a solenoid, and an IR sensor for the score.
And five output components, The LCD screen, DC motor for the spinner, two servo motors and a solenoid.
When a servo pushbutton is pressed, the servo's angle changes by 60 degrees and returns back to its initial position
When the solenoid pushbutton is pressed, the solenoid pushes a ball and stops until pressed again
The DC motor is always working as long as the game is on
When the sensor reads a ball falling, the score on LCD screen decreases by one point, when the score reaches zero it means game over, and to restart a new ball should be sent to the playground
The circuit power source is a 12v Adaptor, I needed this because the solenoid works on 12 volts and it's the highest voltage component in my circuit
And the Arduino's power source is a 5v adaptor.
I did not need to use batteries since my project is not moving and fixed in place, so the adaptors are good enough
12v & 5v Adaptors
I had help from chatgpt in the idea of the button check function, i asked him "How can I code a pushbutton so that it acts once per press?". And it gave me the idea of using flags, which was really helpful.
Including required libraries and setting the lcd type
Creating two servo objects, and setting the pin of each component and the maximum score
Setting the flags for pushbuttons, so that i can check the last state and determine the action duration
Setting up the pins, lcd, and servos' initial positions
This global function checks a pushbutton for a press, if the button was not pressed and then we pressed it, it will return true and perform an action.
If the button was pressed and we held it pressed, it will not repeat the action.
This way we ensure that the solenoid and servo's act per press, not just while the button is HIGH
Starting an initial millis() timer and reading the ir sensor. The first condition checks for the solenoid button state, if returns true, it will send the solenoid.
Now using the same function with the servos, if true it sends them to an offset of 60 degrees. And it waits for 200 ms then goes back to the initial position
This part checks the IR sensor reading so that each time a ball passes it decreases the score by one, and if a ball is stuck in front of the sensor that decreases only 1 point not a lot.
This part just removes the extra "0" when the score gets below 10 so that it shows "9" instead of "90"
When the score reaches zero, this means game over, so the flag value changes to true, and "game over!" is printed on the LCD.
Finally, to restart the game we simply have to push a new ball into the playground, so it resets the score and displays "Game on!" on the LCD
Circuit connection and testing:
The last servo was not working because it is connected to pin 10, which is responsible for the Timer module in the Arduino and can cause some errors, so simply just ignore that pin.
Fixing bottom edges
Fixing side triangles
Fixing ball curve
Fixing the servos
Fixing the levers
Fixing the DC motor with its holder
Fixing the spinner on motor's shaft
Fixing the IR sensor
Fixing the relay, stepdown converter and breadboard to base
Fixing mini breadboard in place
Fixing the Arduino to base
Fixing LCD in place
Fixing adaptor port to back plate
Fixing the levers' pushbuttons on top plate
Fixing solenoid's button on front
Fixing the two sides in place
Wiring base components
Wiring motors and sensors
Fixing playground to the sides
Fixing ball borders
Screwing the solenoid to right side
Wiring the solenoid
Wiring the levers pushbuttons
Wiring solenoid's pushbutton
Fixing front plate in place
Fixing top plate
Connecting top plate to lcd plate
Wiring the lcd
Connecting the lcd plate to the playground
Wiring the backplate
Fixing backplate in place
In the step of connecting the stepdown converters, when I turn the screw, nothing happens, I tried to screw in both directions a lot, in the clockwise direction it started to decrease but stopped at 11.4v and then stopped there, the Avometer then started peeping and the module started heating.
After keeping it to cool, I noticed that the polarities were switched and that was the problem. So, I switched adaptor ports and the converter worked normally again.
After cutting the playground i realised that i forgot to create the motor shaft hole, so i marked its center to drill it manually
The drilled phi 7 part was a perfect fit and went well
When I tried to upload this sheet, it kept on giving me that error message
The problem was that the black color was not set as an output, so i just had to change 'No' to 'Yes'
I would add a timer to the lcd screen that shows for each round how long it took to lose all 10 points
I would make the spinner controlled to rotate clockwise then counterclockwise for a period of time
I would paint the game frame
I woud add more obstacles to the playground
Design/fabrication files Circuit file Code file