Interactive Object — Pinball Machine

December 15th 2019

Project Description

My project for the final Interactive Object for Object Fall 2019 was a working pinball machine. This machine is a repeatable game that involves the user pushing buttons to keep a ball from falling through a pair of flippers that the user controls. This is a bare bones version of a pinball machine you may see in an arcade but it is just as functional and a blast to put together and build. I worked on this project with Harrison Bolin.

Interaction of the Pinball Machine

Enclosure

The enclosure of the pinball machine was constructed using wood and acrylic. Instead of laser cutting the various parts of this enclosure, we went with a more simple method of building the enclosure. The notable parts of the enlcosure are the stands used to prop up the game board and the creative ways we concealed the multiple parts of the project.

Electronics

The main feature of the electronics of this project are the Force Sensitive Resistors(FSR) in the game board. The purpose of these is to record changes in the environment in order to know when the ball passes over to increment the score. The score itself is displayed by a LED serial display . For the electronics there was also a short LED neopixel strip at the bottom to illuminate progress and color to the pinball game.

Originally we were going to use capacitive touch sensors for the score so it woul dbe a more creative way of having the sensors. This ultimately didnt work because the pinball we were using didn’t have a charge so we were unable to implement this. The FSR sensors are connected to the circuit by way of screw terminal and they record the change in force when a ball rolls over them. We originally had 3 of these sensors but the smaller they get, the more problems they cause. for the little sensors it takes a lot for them to record the ball passing over them due to the nature of what they measure. They measure change in force but when the ball rolls over fast, it ay not be recorded. This ultimately didn’t cause too many problems but the interaction although repeatable could have some improvents. It is a repeatable interaction that allows the user to strive to get a better score of the game.

The LED Serial display is a SparkFun 7-Segment Serial Display. There are multiple ways to have this device work, but the simplest is to work with the Serial output of an Arduino program. The code was simple and there were only 3 parts of the Serial display that needed to be soldered. The final part of the electronics to highlight is the arcade button that is connected to the rest pin on the Arduino. This allows the program to rest once the button is triggered.

Electronics in Progress

Final Enclosure Electronics

Sparkfun LED Serial Display Documentation: https://learn.sparkfun.com/tutorials/using-the-serial-7-segment-display/introduction

Non-Arduino Electronics

The other electronics, the flippers, and arcade buttons that controlled the flippers are not operated through the arduino. The main feature in the flippers were the car motors that would cause the flippers to move so fast and with force. These motors powering the flippers are dc motors with gears and operate with their own power and control logic. The flippers were 3d-printed and are connected through the bottom of the board and rotate on bearings.

3d printing for the flippers

3d printing of the flippers

Enclosure Progression

Final Object

Project Demo

Schematic

Code

//Include neopixel Library
#include <SoftwareSerial.h>
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN5 5
Adafruit_NeoPixel strip1 = Adafruit_NeoPixel(6, PIN5, NEO_RGB + NEO_KHZ800);
const int lightstrip1 = 5;
const int FSR1 = A0;
const int FSR2 = A1;
const int FSR3 = A2;
const int softwareTx = 8;
const int softwareRx = 7;
SoftwareSerial s7s(softwareRx, softwareTx);
char tempString[10]; // Will be used with sprintf to create strings
int score = 0;
int pressure1;
int pressure2;
int pressure3;
int mappedP1;
int mappedP2;
int mappedP3;
int hits = 0;
void setup() {
// put your setup code here, to run once:
pinMode(FSR1, INPUT);
pinMode(FSR2, INPUT);
pinMode(lightstrip1, OUTPUT);
strip1.begin();
strip1.show();
Serial.begin(9600);
s7s.begin(9600);
clearDisplay();
}
void loop() {
// put your main code here, to run repeatedly:
pressure1 = analogRead(FSR1);
pressure2 = analogRead(FSR2);
pressure3 = analogRead(FSR3);
mappedP1 = map(pressure1, 0, 1023, 0, 255);//change based on Sensor Reading
mappedP2 = map(pressure2, 0, 1023, 0, 255);
mappedP3 = map(pressure3, 0, 1023, 0, 255);
if(mappedP1 > 35){
score = score + 20; //time that sensor records hit is too long
hits = hits + 1;
delay(400);
}
if(mappedP2 > 0){
score = score + 5;
hits = hits+1;
delay(400);
}
//Green Lights
if (hits < 6){
for(int i = 0; i < hits; i++){
strip1.setPixelColor(i, 255, 0, 0);
strip1.show();
}
//Serial.print("Less Than 6");
}
if(hits > 6 && hits < 10){
//Serial.print("Greater Than 6 ");
for(int i = 0; i < 6; i++)
{
strip1.setPixelColor(i, 255, 0, 0);
strip1.show();
}
}
//Blue Lights
if (hits < 16 && hits >= 10){
for(int i = 0; i < hits-10; i++){
strip1.setPixelColor(i, 0, 0,255);
strip1.show();
}
}
if(hits > 16 && hits < 20){
for(int i = 0; i < 6; i++)
{
strip1.setPixelColor(i, 0, 0, 255);
strip1.show();
}
}
//Red Lights
if (hits < 26 && hits >= 20){
for(int i = 0; i < hits-20; i++){
strip1.setPixelColor(i, 0, 255, 0);
strip1.show();
}
}
if(hits > 26 && hits < 30){
for(int i = 0; i < 6; i++)
{
strip1.setPixelColor(i, 0, 255, 0);
strip1.show();
}
}
Serial.print("Score: ");
Serial.println(mappedP2);
sprintf(tempString, "%4d", score);
s7s.print(tempString);
}
void clearDisplay()
{
s7s.write(0x76); // Clear display command
}
view raw PINBALL CODE hosted with ❤ by GitHub

Link to Harrison’s Blog Documentation

https://atlas.harrisonbolin.com/2019/10/31/final-project/

Future Visioning Exercise

For my capstone class, there was an exercise around future visioning and about visions/ideas of potential future plans and goals. The following are pictures of the activity. Autobiography Exercise Title of my Autobiography in 10 years Front page of Autobiography in 10 years Future Visioning Exercise What I want personally in 5 years What IContinue reading “Future Visioning Exercise”

My Portfolio

For the first assignment for Research Methods and Professional PRactice, the goal was to create a portfolio. Here is the link to my portfolio.

One thought on “Interactive Object — Pinball Machine

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: