PinThousand

by Laurens vd Heiden in Circuits > Arduino

50 Views, 1 Favorites, 0 Comments

PinThousand

PinThousand.jpg
PinballExample.jpg
FI9J0JULXVUIN4W.jpg

An arcade classic and a world-wide hit, the 'pinball machine'! A game dating back as far as 1931 with 'Bingo' and has been popular ever since.

As a kid I've played countless of different pinball machines at arcades. Often with big movie franchises plastered on the front, like The Terminator or Star Wars. Ive always been fascinated by them, they're easy to learn and hard to master. The ball is your biggest enemy and also your ally as you put in more and more tickets.

I set out a goal to make a recreation of it, but using only an arduino for interactions and player feedback. This making it cheap while still keeping the physical elements of it, so no big machine or tickets are needed to be bought for it to be played. I also wanted to bring in the element of being able to tilt the machine, I remember tilting the machine a few times to cheat.

Supplies

I was able to use a PVC laser cutter in my case, but you could alternatively use a wood cutter or a 3d printer for the body.


I also used and recommend:

1: Arduino Uno (Rev 3)

2: MPU6050 3 Axis Accelerometer and Gyroscope Module

3: CQRobot 8 Ohm 3 Watt Speaker for Arduino

4: USB Type-B to Type-A (if you dont have one)

5: 2x GTIWUNG Momentary push button

6: 6x Krimpkous or Female to Male jumper wires

7: 23x Male to Male jumper wires

8: 3x 10 kilo-ohm resistors

8: 2x Soldering board (or a big one that can be cut)

9: 15x30mm wood beam

10: 2x Steel angle connector 10 x 10 x 100mm

11: 2x Rubber bumper with screw


Useful:

12: Grip stickers (if your laptop slides off)

The Game Itself and How It Works

PinThousand2.jpg
ConceptOG.png
Concept3D.png

Above is the end product and the first 2 concepts, one drawn and one made in SketchUp.

The game is a simple standard pinball-type of game. You can move the flippers using the buttons on the sides to shoot the ball up. You can also tilt the machine to 'cheat' persay and gravity is in-game correctly applied using a gyroscope with the Arduino.

The Unity game itself is hosted on the laptop and directly reads and writes to the arduino. Input like the buttons and gyroscope is sent to the program in its own thread and the program returns serial data to the arduino for sound.

The Body

ModelExample.png
ModelExampleBelow.png
PartsExample.png

For exact measurements I recommend downloading the model, made in SketchUp, as it provides the exact measurements I used while making the body myself.


Originally I was gonna 3d print it, until I decided to switch to cutting to make it more difficult. I've already done 3d printing and even owned a 3d printer, but I didn't want to rely on something I already know for this project. That's why the early concept was bulkier, as to be more fitting for 3d printing.


Red indicates a screw being used. The brightness and size of the hole indicates what the required screw is.

For the larger white parts I was able to use a PVC Laser cutter to cut them out. I then used a drill for the individual holes.

Wood I was able to saw using a handsaw, they aren't all perfectly smooth but I went through quite a bit of wood to get somewhat smooth edges. That and a few splinters.

The rest are the 15x30mm wood beam, the steel angle connectors and the rubber bumpers which are all colored in.

Downloads

The Code

SoundTesting.jpg
GyroTesting.jpg

Above are pictures of early testing to ensure each component and the code for them works well.


The Arduino script sends input as a single string that automatically filters out repeating messages as to not overload the Unity project. Audio is done using an array of chars and is optimized so that an external microSD card isn't required for it. Meanwhile the gyroscope is also lightweight and works precise.

The Unity project makes use of a mixture of Ardity and io ports for reading and writing. Ardity helps ensure the arduino's reading/writing is on a separate thread so that it doesn't impact the game. The project sends an integer to tell it which sound to play and the Arduino tells it what button is pressed and where the gyroscope is pointing.

Git: https://github.com/ModderOwls/PinThousandUnity

The Wiring

Screenshot 2024-06-27 at 05-25-24 New Arduino Uno Project - Wokwi Simulator.png
Wiring.jpg
Wiring2.jpg
Wiring3.jpg

While I personally soldered everything, you also have the option to use a breadboard. Here is the schematic as well as the end result from soldering. I also decided to screw the plates down as the wires moving around bugged me.

A Reflection

PinThousandOpen.jpg

While I have done arduino before, I haven't made one big project with one before. I haven't worked with many of the things I've done before either, as I was earlier just interested in the tech.

My biggest challenge was making the body. I don't have much if any experience working with pvc or wood. Arts and crafts isnt something I do much. I think where it shows the most is the wood being too thin in the bottom left, where it burst a bit. Definitely something to look more into next time, even if it still holds together well.

Other than that I didn't notice my management of the wiring until later, making it look a bit messy here. Since I hadn't soldered before I was just happy to have it working and quite successfully so as there were no issues when playing.

Nonetheless, I'm happy with the end result personally. I learned multiple things like soldering, working with wood and generally about arts and crafts. Even with a few issues along the road as a newbie, I was able to achieve my goal and am satisfied.