Our project and end goal we are working for. In the end we will have a pinball machine.
This is what we will be able to accomplish by the end of the project.
These are our prototype requirements to give an idea of what we will do.
These are our final requirements for what will be expected of us at the end of the project.
After researching the correct wiring and code , we were able to use the Arduino software to code the LCD display to say "Kayla & Kate world domination."
#include <LiquidCrystal.h>
int Contrast=75;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
analogWrite(6,Contrast);
lcd.begin(16, 2);
}
void loop()
{
lcd.setCursor(0, 0);
lcd.print("Kayla&Kate");
lcd.setCursor(0, 1);
lcd.print("World domination");
}
Today we went to a pinball arcade! Our goal was to learn more about pinball machines, what components they have, what most of them have in common and about individual components
Pinball machine elements
All pinball machines have:
bumpers
scoreboards
ball slides
flippers
lights
ball guides w/ shooters
on/off button
coin slots
a theme
graphics
score information sheet
variety of ways you can score
This is so the ball follows a set direction and it does not go out of the desired area. This allows the ball to be bumped back into play
They are controlled by 2 buttons on the side of the machine. When clicked, this allows the flippers to move in attempt to save the player from loosing the ball, resulting in a game over.
They are located near the bottom of the machine and used to throw off the balls direction and the players line of focus.
A pinballs launders purpose is to shoot the ball into play. While you pull back in the machoism you are creating a force that will then put the ball ready for game play.
This button allows the ball to be flicked and dropped, and now the game is ready to begin
What causes the lighting displays to change/react?
The LEDs have sensors built in and they activate/change when the ball interacts with them
What causes the points to increase?
When you score a point with the ball hitting/touching/going through its target, the player scores points which is then displayed on the scoreboard
This shows how the ball hits a target and the LED lights up
This shows how when the player hits the target, points are added to the scoreboard
After coding and wiring the LCD to the Arduino and breadboard, we coded the LCD to say "ball count" and to count down from the set number when the button is pressed. When the second button is clicked, its shows the "score" in which it counts up by 500 every time its clicked. When in resting position our LCD is coded to say "Pinball Madness".
#include <LiquidCrystal.h>
int Con=60;
int score_increase_button = 8;
int ball_count_button = 13;
int score = 0;
int ball_count = 5;
//connected pin
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
//standard for LCD screen
void setup()
{
analogWrite(6,Con);
lcd.begin(16, 2);
pinMode(score_increase_button, INPUT_PULLUP);
pinMode(ball_count_button, INPUT_PULLUP);
}
void loop()
{
int buttonValueOne = digitalRead(score_increase_button);
int buttonValueTwo = digitalRead(ball_count_button);
//reads the value of the input which is either 1 or 0
//when it is on or off, respectively
if(buttonValueOne == LOW){
lcd.clear();
lcd.setCursor(6,0);
//placement of text, first number is x axis, second is y axis
lcd.print("score ");
score=score+500;
lcd.print(score);
delay(300);
}else{
lcd.clear();
//Title screen
lcd.setCursor(4, 0);
lcd.print("Pinball");
lcd.setCursor(5, 1);
lcd.print("Madness");
delay(300);
}
if(buttonValueTwo == LOW){
lcd.clear();
lcd.setCursor(0,0);
//placement of text, first number is x axis, second is y axis
lcd.print("ball count: ");
ball_count=ball_count-1;
lcd.print(ball_count);
delay(300);
}
}
This was our Onshape design of our scoreboard mount. Through many trial and error we were able to make and alter the design to be able to fit our scoreboard the best way possible.
This is our mount on our scoreboard. After we uploaded our design to glowforge we were able to use that software on the laser cutter where our current mount is made our of wood.
We were provided with an onshape file for a solenoid model. I was able to download one of the pieces to my drive to be 3D printed. After adding the design to the slice program, the part was put on a card, then uploaded to a 3D printer to be printed out.
To begin designing the targets for the pinball machine 1st I must establish a theme for how I would like them to look. I must research designs and how the target will work and function. After figuring out the design will look in addition to how the target will function I will take these ideas to onshape. In onshape I will make and all the components. After 1st attempts of a design I will test with a prototype to make sure everything is in line and works for its intended purpose. If everything is fit right the onshape file will be used for my final model.
This our Pinball machine. After the CNC router cut all our parts, we were able to assemble our prototype with screws and glue.
This is the power source we will be using to power our machine. We used the band saw to cut a piece of wood to secure our source in place.
This is our scoreboard mount installed into our prototype.
This is the on/off switch, mount. With this we were able to create something to securely hold our switch to our prototype.
This was a design in onshape we did for our mount. From then we were able to finalise, install and put our covering over to finish our switch
After research and taking a look at others model targets, this is my 1st draft desining a target. In Onshape I worked in cm. to created my target. How it is entented to work is you hit the larget part of the "T shape" and it hits back onto the clicker that was provided. After hit it would reset to the main position. For the draft the target is held in place by a thick peice of wire at an angle so it is able to sit straight. After using the glowfordge to cut out my design on cardboard and put it together, I realeased it did not work as smoothly as intended. The large T part, that was suppost to hit the clicker, was too far up so it didnt hit everytime and the bottem was not big enough. From here I went back to onshape to fit this.
This is my 2nd draft of my target. I made the base and T shape a half a cm. shorter and extending the width of my bottom peice by .2 cm. After this I uploaded my updated design into glowfordge for my new design to be cut out, out of cardboard. After reasemballing the updates worked. The T shape hit the clicker a lot smoother and the bottom fit properly. I am very happy with how it is funtioning but now I want to experiment if it workes better if i flip the clicker upside down to see if it works better. Now Im back to onshape to redesign again.
For the 3rd draft I had put the hole to where the clicker would go at the top. I did that and flipped the clicker upside down to see if it would click better. It did not click as well as I had expected it. To fix this, my 4th draft/idea was to flip the clicker back over and to hold it by the top set of holes on it. This was the best execution of my target so far.
Though my target worked very well, I need it now to fit to other constraint of our project. It would need to be mounted to my pinball machine so I created a mount to test. To have the mount to connect to my target, I made an onshape design to where it had both holes for the clicker and posts to where it can be connected and mounted to my machine. So far the holes don't seem to match all the way so I have to redo the measurements.
These are the constraints for our project we have to follow for a successful, complete prototype
From draft 5, I remeasured to fix the placements of the holes. After viewing my way of a mount at 1st it was not going to work properly. Insted now I want to have the mount and target as the same mechanism.
This was the draft where I first put my mount into my design and elongated the "T". I elongated my design and added an access hole so it can be wired. The holes for the clicker though were shifted in this design so that needed to be fixed. In addition I added the access hole on both sides when it was only needed on 1. The base and holders for the "T" were also not sized correct. These all needed to be fixed.
For this draft I was adjusting measurements for the base and the part that holds the "T" in place. To make my modal more sturdy though, it needs finger joints and a longer base to secure my design.
For this draft, I fixed the the base, added finger joints, made a back piece, made the hole in which the wires come out bigger, and fixed the pieces that holds the "T" in place. --- Next will add finger joints to the back piece and a few to the base so it can be secure.
For this draft, I successfully added all necessary finger joints. Now when I get to the final model it will be able to securely fit together. Now it needs a better way to hold the "T" in the correct position.
For this draft, I made a whole in which a block can be inserted and the "T" can be secure, in addition to a piece to keep the bottom part of the "T" from kicking out. After putting together the model from the the glow forge, I noticed the base of my target was too long to accommodate for the new piece to keep the "T" from kicking out.
For this draft, I reduced the length of the base so the piece is able to fix. When putting the full modal together though, the "T" was too thick to fix and now needed to be reduced.
For these drafts It was trial and error till I got the correct measurements for the "T". For Draft 14 I successfully got the correct width and it is able to function smoothly within my target.
From Draft 14 I found their to be a major flaw in the design. The "T" could be pulled from the target. To gage an idea for next steps I broke part of the base off. I broke part of the base off to extend the "T" downward and I added a block at the bottom. I did this to test if this concept would work to fix the problem, and it did. now I need a finalized version of this model.
Here is where I designed 2 ways to fix the problem. 15.2 model proved to be the best fix to the problem. From here I adjusted the "T" to the correct side with the new modifications
This is the last and Final iteration of the target. It sleek yet fully functional design allows for it to be perfect for our pinball machine. With all the major components being finger jointed together, in addition to the "T" not being able to come out as it smoothly and effetely hits the clicker.
Here is my fully functional target installed into my pinball machine. My target is wired to the Arduino, which is wired to the scoreboard. With having them all wired together, and in the beginning coding buttons to change the score, I was able to change the wiring so when my target is hit the score goes up on the scoreboard.
To begin designing the Lanuter for the pinball machine 1st I must establish how they look and function. After looking at different youtube videos I have an idea of how they work. Now having a view of how they work I can evaluate my materials go into onshape to create my iteration for a launcher. After 1st attempts of a design I will test with a prototype to make sure everything is in line and works for its intended purpose. If so I will continue to further develop and make it better.
Here I was given the task to design and create a launcher to launch our pinball up and into play. This draft, I used maker case to create a fame for my launcher and I used a dowl with various springs to create the funtiong part of my launcher. The dowl has the springs and the exposed dowl you pull and it will release the ball into play.
We were able to take a neopixel strip and use the arduino software to allow it to function in conjunction to a button
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// Released under the GPLv3 license to match the rest of the
// Adafruit NeoPixel library
const int buttonPin = A2;
int buttonState = 0;
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
// Which pin on the Arduino is connected to the NeoPixels?
#define PIN 6 // On Trinket or Gemma, suggest changing this to 1
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 8 // Popular NeoPixel ring size
// When setting up the NeoPixel library, we tell it how many pixels,
// and which pin to use to send signals. Note that for older NeoPixel
// strips you might need to change the third parameter -- see the
// strandtest example for more information on possible values.
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
#define DELAYVAL 500 // Time (in milliseconds) to pause between pixels
void setup() {
// These lines are specifically to support the Adafruit Trinket 5V 16 MHz.
// Any other board, you can remove this part (but no harm leaving it):
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
clock_prescale_set(clock_div_1);
#endif
// END of Trinket-specific code.
pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
pinMode(buttonPin, INPUT_PULLUP);
}
void loop() {
buttonState = digitalRead(buttonPin);
if (buttonState == LOW) {
pixels.clear();
for(int i=0; i<NUMPIXELS; i++) {
pixels.setPixelColor(i, pixels.Color(0, 150, 0));
pixels.show();
delay(DELAYVAL);
}
}
}
We measured the neopixel strip to its exact measurements and transferred these measurements to onshape where the mount was designed and later fabricated using the glowforge on cardboard.
You need wires, solenoid, mechanical flipper and end stroke switch to create a functioning flipper.
"Pinball flippers work by using an electromagnet to pull an iron rod connected to a lever, in a device called a solenoid. The solenoid is activated when a player presses the flipper button, causing the flipper to flip up, and when the button is released, it resumes its resting position"
When button is pressed, the flipper button switch closes and electric current rushes through a high power coil and through the end stroke and button switches. Most of the electric current passes around the lower power flipper coil because the coil has a much higher electrical resistance than the switch. This kicks ball to the playing field.
You need wires, solenoid, mechanical flipper and end stroke switch to create a functioning flipper.
"Pinball flippers work by using an electromagnet to pull an iron rod connected to a lever, in a device called a solenoid. The solenoid is activated when a player presses the flipper button, causing the flipper to flip up, and when the button is released, it resumes its resting position"
When button is pressed, the flipper button switch closes and electric current rushes through a high power coil and through the end stroke and button switches. Most of the electric current passes around the lower power flipper coil because the coil has a much higher electrical resistance than the switch. This kicks ball to the playing field.
With a mechanical flipper the flipper is pushed upon desire based off a axel system to kick the ball into play
This is my drawn out thought process of designing a flipper. We decided to do a mechanical flipper so the player will manually push a rod to direct the fipper upon desire.
Here I drafted my 1st flipper. I designed it in onshape and cut it on the glowforge. I layered the peices to make it thicker and able to withstan a ball. When the rod is pushed it pushes another block of wood on a spring to trigger the flipper
The final design is more or less the same as my inital draft. I was able to reproduce them and add them to our machine. I used more sturdy materials and installed it to work on the board
Elementary school students playing our machine
Classmate playing our machine
The Pinball machine has a lot of different components to have it fully work. You take the ball and set it in the launcher. You pull the launcher back, and it shoots the ball into play. As the ball shoots up, the ball guides lead it to the play field. As the ball falls into play, to keep it in play you use the fippers. The flippers are mechanical so you push them in to launch the ball back and keep it in play. The goal is to hit one of the target or bumpers to gain points. As you keep flipping the ball back in play and gaining points, once you miss the flippers and the ball falls through, game over!
#include <LiquidCrystal.h>
int Con=60;
int score_increase_button = 8;
int ball_count_button = 13;
int score = 0;
int ball_count = 5;
//connected pin
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
//standard for LCD screen
void setup()
{
analogWrite(6,Con);
lcd.begin(16, 2);
pinMode(score_increase_button, INPUT_PULLUP);
pinMode(ball_count_button, INPUT_PULLUP);
}
void loop()
{
int buttonValueOne = digitalRead(score_increase_button);
int buttonValueTwo = digitalRead(ball_count_button);
if(buttonValueOne == LOW){
lcd.clear();
lcd.setCursor(6,0);
lcd.print("score ");
score=score+500;
lcd.print(score);
delay(300);
}else{
lcd.clear();
lcd.setCursor(4, 0);
lcd.print("Pinball");
lcd.setCursor(5, 1);
lcd.print("Madness");
delay(300);
}
if(buttonValueTwo == LOW){
lcd.clear();
lcd.setCursor(0,0);
lcd.print("ball count: ");
ball_count=ball_count-1;
lcd.print(ball_count);
delay(300);
}
}
This is the targets and neopixels. The targets were designed through onshape and through many trails and errors, this was the sucessful design. When the target is clicked at the top on the "T", it pushes back on the clicker which it connected to the scoreboard. When clicked the it is coded to increase the score by 500 points. In addition the neopixels are coded with the targets. When the target is triggered, it activates the neopixels to flicker as u gain points.
This is a video of all three of the bumpers working. It shows the components, the wiring, and how the contacts touch to create a switch and trigger the solenoid. The final bumpers have the 3-D printed cone to serve as a spoon/contact with the copper piece underneath. The spoon is also wrapped in copper. There are two wires in both the pieces of copper; one wire goes to ground and another goes to a pin on the ardiuno. The solenoid is wired to the mosphet and 5V on the powersource. The mosphet is also wired to ground on the powersource, 5V and ground on the breadboard, and a pin on the arduino. When the ball pushes the cone, it pushes the spoon downwards so the contacts form a switch and trigger the solenoid. When the solenoid compresses, the 3-D printed round top is pulled down which pushes the ball back out.
This is the launcher and flipper. The lancher is pulled back and the springs launch it forward, propelling the ball forward. The flippers are mechanical and when the sides are pushed in, the flippers flip and keep the ball in play.
This is what the flipper looks like underneeth. When pushed, this spring mechinism allows for the fippers to go and retract back.
The score board is a 4 pin LCD screen that shows the score when components are hit for our machine. The target and bumpers are wired and coded to the LCD screen so when triggered the score will increase
This project was definitely one of the longest, hardest, most tedious, but eye opening compared to other/previous projects. It was something I've never thought id do in my life, but my partner and I managed what used to be the impossible. After completing the projected I feel free but also very rewarded as this was year long with lots of hard work to design and create what we have done. What I'm most proud of with the project is my growth in mechanical fabrication and persistence as we had deadlines to meet to be fully successful. Overall this project was definitely an experiences and I will take this accomplishment on with me in life.