if you’re not into autonomous robots it might. Me, however, I’m very much all about building robots that can do cool stuff, and this one does some pretty cool stuff.
This project was built as a senior design project for Kennesaw State University, and was a literal childhood dream come true for me to build.
The features include a working score system that tracks how many points you get, a multiball plinko machine, and an autonomous activation switch on the front that you can flip on-the-fly. There is an above-mounted USB camera that is constantly detecting the position of the flippers and the position of the pinball during play and it makes decisions based on their relative differences. More pictures of the project exist here!
While you may not be able (or even want to) recreate the project exactly, I hope this gives you inspiration or a starting point to make awesome stuff.
So, prepare yourself and…
Let’s Make Robots!
Obviously, there’s lots of supplies involved in this project, and I don’t think I can list every single piece, nor do I think it would be useful. However, I do want to provide a list of major pinball components, and tools needed to build this project. In later sections, I will try to have a more detailed list for specific components.
- Access to a CNC and/or Laser cutter
- Dremel & sandpaper
- Soldering Iron
- 3D printer (depending on your machine)
- Linux Computer
- USB Camera
- Lots of 22 / 24 AWG wire
- Lots of heat shrink for the wires
- 3/4 Inch plywood (we used Baltic birch) – 2x 4×8 sheets
- A nice power supply – Like this one!
- Buck Converter (Light Power) – Like this one!
Pretty much all the pinball components can be bought on Pinball Life.
- Left and Right Flipper assembly
- 2x Flipper bats
- 2x Flipper buttons
- 2x Leaf switches
- Pop Bumper Assembly
- 2x Slingshot assemblies
- At least 6x star posts for the slingshots
- At least 2x 2″ rubber bands for the star posts
- Launcher mechanism
- As many #44 bayonet-style lights and mounting brackets as your machine needs
- As many playfield inserts as your machine needs
- As many spinners as your machine needs
- As many rollover switches as your machine needs
- As many stand-up targets as your machine needs
And, of course, an Arduino Mega!Add TipAsk QuestionCommentDownload
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.Add Teacher Note
Step 1: Research How It Works
The first step in building anything is to do some light research on how the individual parts of the thing work together. I am assuming you will have at least a slight understanding of electrical components, but even if you don’t I hope this still helps.
General Pinball Design:
For general help when thinking about a pinball machine, these links should provide you with a great understanding.
- Pinball Design, Start to Finish – https://howtobuildapinballmachine.wordpress.com
- Concise pinball component descriptions – https://www.topic.com/anatomy-of-a-pinball-machine
- Great Instructable with nice animations – https://www.instructables.com/id/Making-a-Pinball-Machine/
Most of the pinball components have an electro-mechanical process that actuates them.
- Flippers – https://www.youtube.com/watch?v=1YitMJS0jbY
- Pop Bumper – https://www.youtube.com/watch?v=0VWdRp2suv4
- Slingshots – https://pinballmakers.com/wiki/index.php?title=Slingshots
- Transistor Theory – https://learn.sparkfun.com/tutorials/transistors/applications-i-switches
Mechanical Pinball Design:
This section includes CAD models, woodworking tips, and other useful mechanical help
- CAD models by pinballmakers.com – https://pinballmakers.com/wiki/index.php?title=Files_Section
- CAD models made by our team – https://github.com/Tdoe4321/AutoPinball/tree/master/CAD_Models
- Wood and Acrylic Milling – https://www.youtube.com/watch?v=oUE3zWnZbTo&feature=youtu.be
- Making Dovetails – https://youtu.be/viT3ZGAlzNw
Software & Autonomy Design:
This section has links to different algorithms and projects that could be helpful when making something autonomous.
- A similar project’s github repo – https://github.com/jherrm/flipbot/blob/master/capture_pinball.py
- Smoothing Algorithms (for velocity / position tracking) – http://18.104.22.168/applets/AppletSmooth/Appl_Smooth2.html
- Speeding up arduino hardware ROS bridge (if needed) – http://wiki.ros.org/rosserial_arduino/Tutorials/NodeHandle%20and%20ArduinoHardware
Add TipAsk QuestionCommentDownload
Step 2: Design Your Machine on Paper
So this may seem like a simpler task at first, and if you’ve been thinking about it for a long time, maybe it is. However, for one reason or another, this can turn out to be quite a difficult thing to accomplish.
You may have space constraints that you did not account for at first, or maybe some of the shots you were thinking about are just impossible for your flippers to hit. All of these things need to be working around in your head and on paper before you go out and spend time and money on a design that doesn’t work.
For our team, we broke it down into few test boards on really cheap plywood before actually going through and milling out the final playfield. We also went through lots of design iterations and were constantly changing what the machine looked like, but each step we took got us a little closer to the final product.
So, learn from our mistakes and use these helpful tips:
- Draw on paper (or a whiteboard or whatever) before moving to 3D modeling.
- Plan for making errors in your milling, have “modular” features that can be taken out and put back in.
- Don’t reinvent the wheel, check out popular games and how they structure their playfield.
- The dream in your head won’t be exactly what ends up in front of you, but take what’s there and run with it.
Add TipAsk QuestionCommentDownload
Step 3: Design You Machine in SolidWorks
This part if fully up to you obviously, but I will go through some of the challenges and things that we did when making our machine.
As mentioned earlier, we designed all of our parts in solidworks for this project, so feel free to use our models here – https://github.com/Tdoe4321/AutoPinball/tree/master/CAD_Models
The mechanical design for the AutoPinball machine consists of two major subsets, the playfield proper and the stand. The playfield is standard sized – 20.25” x 42.00” – and is made from ¾” baltic birch plywood, the material of choice for the final design. The first major design considerations involved the positioning of COTS components on the playfield in addition to custom-designed boundaries. For this explanation, “components” are any electric or non-electric COTS parts in which the ball interacts while “boundaries” constitute static custom-made wood or acrylic surfaces that may alter the trajectory of the ball. The components and boundaries are positioned to provide maximum maneuverability for the ball as it traverses the playfield with the boundaries directing the ball to desired components. Generally, the regions are constructed such that a ball may transverse from any one region to any other adjacent region with little to no impedance depending on approach angle and speed. For instance, a ball may launch from the left flipper in the “L. In/Out Lanes” region and enter any other region non-including the launch lane. If the ball enters “Ramp & R. Orbit”, it may move counterclockwise around the orbit into the “Center Lane”, interact with the pop bumpers and be ejected into the center lane, or complete the orbit through the “L. Orbit and Y-Lane” to then return to the left flipper.
The playfield includes a second level made with a combination of 2”-diameter acrylic tubing and 3D printed adaptors. The second level serves two cardinal functions. Firstly, the second level serves as a medium to transport the ball from the upper playfield directly to the left flipper inlane. The predictability of the final deposited location of the ball makes the second level a consistent pathway in which to facilitate multiball, its second primary function. When the roll-over switches on the ramp and left inlane are triggered back-to-back, a servo releases two balls down the Plinko machine which are deposited into one of two tubes mounted above the second level to deconflict with ramp shots. Therefore, the tubes feed the second level, and hence the left inlane, during the multiball mode.
The ¾” plywood thickness is selected to provide adequate rigidity to the project and to allow for greater fastener engagement in load-bearing joints. Pocket hole geometry is an alternate method to the common butt joint in woodworking in which two end pieces of wood are joined at right angles. The pocket joint creates a fifteen-degree hole through one side face into another side face, yielding a superior joint in terms of strength as no end faces are used. Pocket holes, while allowable with ½” thick wood, are most common and efficient for ¾” and the 1 ¼” pocket screws required for ¾” thick wood are much more common. Baltic birch is selected as the material type as it is high quality with few knots and impurities, is a hardwood and thus is rigid and resistant to damage, is laser friendly (for engraving), and generally is preferred by woodworkers for heavier projects.
Two major consequences are derived from the selection of ¾” thick plywood. The first is that most class four lasers do not exceed a power rating of 150 W which itself is not enough power to cut through hardwood of such thickness. Therefore, the project must be CNC’d with a five axis machine. The second consequence is that the COTS pinball components, such as the solenoids, roll-over switches, LED’s, stand-up targets, etc., are designed for ½” panel mounting. As such, the playfield is required to be CNC’d from the bottom face with ¼” recesses end milled for the components. The requirement for accurate mounting features and recesses adds another layer of precision to the project that is solved by the generation of highly accurate CAD models for each of the components.
The stand serves as a mounting apparatus for the playfield and houses the custom electronics. The electronics mount directly to the baseboard with extended wiring harnesses reaching the underside of the playfield. The electronics are visible from the sides of the stand through viewing windows. Additionally, the stand allows for variable pitch adjustment for the playfield via removable pins from the side. Starting at zero degrees, holes are included at each two-degree increment to a maximum of an eight-degree incline. A higher playfield gradient yields a faster-paced game with increased difficulty.Add TipAsk QuestionCommentDownload
Step 4: CNC or Laser Cut Your Stand and Playfield
While the milling of your stand and playfield do not require a CNC or Laser, it is highly recommended that you use one when cutting the wood for your project. Doing it by hand is incredibly difficult and not nearly as precise as you would like it to be for your end product.
We had access to a large 5-axis CNC, that that is how pretty much all professional games are made these days. If you can’t mill it on a CNC though, don’t worry! Lots of our parts had to be adjusted after the fact and it’s fairly easy to cover up any mistakes with some wood putty.Add TipAsk QuestionCommentDownload
Step 5: Mount All Components to Playfield & Assemble Stand
Once your playfield has been milled out and your components have all been ordered, it’s time to put all the pieces together. We used a pocket hole method to fasten all of our main stand pieces together for the machine.
As for mounting hardware, you really just need a screw that is less than 1/2 inch long to mount the components. We mainly used #4 wood screws.
It’s important to realize here also that some components are going to be mounted to the stand, while others will be mounted to the playfield itself. Things like the flipper buttons, power supply, electrical boards, etc. will all be mounted to the stand directly, while the major pinball components will be mounted to the playfield.Add TipAsk QuestionCommentDownload
Step 6: Prep Electrical Components
Obviously a pinball machine needs power, how would it turn on all those fancy lights and flip the flippers without it?
There are just a few considerations that need to be though of before wiring everything together.
Most pinball machine’s “High Voltage” is in the range of 35v – 48v, depending on the make of the solenoids you buy, and you will want to pick a power supply that can support your coils. Secondly, you will need to think about the “Low Voltage” supply for powering things like lights or other smaller electrical components. We chose a voltage of 6.3v for our Low Voltage, but that’s not necessarily set in stone. It depends on what LEDs you buy, the brightness you want, and if you’re powering other electrical things with this supply. For simple stuff, 6.3v should work fine.
The power supply we bought did not include a Low Voltage supply, so we had to get a separate board that could power our lights. This is what’s known as a buck converter. It takes a high voltage (like 48v) and steps it down to what it’s rated for. Most are adjustable, like this one!
While most components require a certain voltage to even function properly, current is something that is “induced”. This means that the components that you power are going to draw as much current as they need depending on their resistance. Because of this, it’s hard to tell just how much power your machine will need to support.
“Is 100 watts ok? What about 50?” These are the questions that are swirling through your head, and the answer is, it depends. Things can get very burnt very quickly if your components aren’t rated for the correct power dissipation. The problem comes in when you realize that these components are pulling LARGE amounts of amperage for a very small amount of time. The flippers pull something crazy like 3-4 amps when they are fired, and with two of them that’s around 8 amps. The reason that this is able to to happen has to do with the amount of time the coil is actuated for is really small.
I realize that this isn’t super helpful, and I apologize for that. My recommendation is to calculate your “worst case scenario” in terms of current draw and then give a nice factor of safety. Answer the question, “How much current will we draw if everything turns on at once?” Once you have the answer to that question, you should be able to pick out a power supply.
Also, checkout this blog post as it goes into lots of detail and tests.Add TipAsk QuestionCommentDownload
Step 7: Build I/O Boards (Switch Input)
The switch input board takes care of reading in all the values from the playfield into the arduino. The individual circuit for this is extremely simple, but it needs to be scaled up for lots of inputs.
Because the arduino has an internal pullup resistor, described here, you can wire it as seen above. This makes the wiring really simple, because you don’t need to have any extra resistors or voltage exposed. In the arduino code, you need to tell it to use the input_pullup, but that will be covered later.
The biggest thing here is to make sure that you have connectors to each switch in case one needs to be taken out for some reason.
We used standard pin headers as our connectors which made it really easy to plug everything into the arduino at once.
Additionally, you may consider adding some circuitry around your playfield switches to prolong the amount of time that they are “on” from the ball interacting with it. One reason you would do this is if the arduino was too slow in checking the switches and “missed” the switch being triggered. We didn’t run into that issue, as all the main loop of the arduino code does is check all the switches connected to it. But, if you want to read more about it, check out this forum post.Add TipAsk QuestionCommentDownload
Step 8: Build I/O Boards (Light Control)
The base circuit for controlling the lights is similarly pretty easy. The circuit consist of a BJT transistor (2n2222), a few resistors, and the LED you’re trying to activate. We use the transistor as a digital “switch” that we can turn on or off, like this! You also should be hooking this up to the 6.3v power supply mentioned from earlier. This will provide a nice bright light and individually addressable LEDs.
The reason you can’t just hook the LED directly up to the arduino is because the arduino can’t provide enough current for that many lights. It’s able to handle a few on its own, but when you scale that up to the size of a pinball machine, it needs some surrounding circuitry.
What we’re doing here is using the arduino as a digital switch that turns on or off the BJT that completes the circuit for each LED. This allows us to scale up the number of LEDs we have to as many as our power supply can handle without any issue.Add TipAsk QuestionCommentDownload
Step 9: Build I/O Boards (Solenoid Control)
Now here is where the circuity gets a little more complicated, but fewer of these circuits need to be created. The general idea is the same here as the LED boards. We want to be able to send a signal from the arduino that is able to turn on/off any solenoid (flippers, slingshots, pop bumpers). Because these components take much more power to actuate than an LED, we need some bigger transistors, MOSFETs.
Here’s a component list for one circut:
- 1k resistor
- 10k resistor
- 330 resistor
- IRF44V MOSFET
- 1N4004 Diode
- 47 micro-farad capacitor
First, a bit of background:
Every solenoid need to be hooked up to 48v for them to actuate. A solenoid is basically just a really long wire wound in a circle so that, when current moves through it, an electrical field is created. This field moves a metal rod which flips a flipper, drops a pop bumper, or flicks a slingshot. A really nice video about this can be found here!
Another quick note about solenoids and inductors. Because Inductors cannot change current instantaneously, that creates a problem for us. These solenoids are pushing a lot of current through them when they are active, and all that current needs to go somewhere when we tell it to turn off. It needs a place to dissipate slowly. If you don’t have a place for the current to go, it will try to force its way through somewhere which can break components and be very dangerous.
To compensate for this, we use an RC snubber circuit and some diodes. They are both basically doing the same thing – trying to slow down the dissipation of current. If you don’t include at least one of these (preferably both) then you will definitely break some MOSFETs.
Now, you might notice that the circuit for the flippers and the other coils is slightly different. That is because, in pinball, the player will sometimes want to hold down the flipper button to keep the flipper actuated for a long time. If you were to use the same “high-power” coil to hold the flippers in the upright position, you would quickly burn up your coils. The second coil in the flipper circuit allows for a fast and powerful initial flip. Once the flip is completed, a mechanical process opens up the EOS switch and forces the current to go through both coils. To see more info on how flipper circuits work, checkout this post.Add TipAsk QuestionCommentDownload
Step 10: Solder All Components Together
Depending on your game size, soldering could obviously take a lot of time or a short while. Ours took about two days to solder and wire everything in nice orderly bundles. I was actually really happy with how organized it turned out.
We ended up with 5 connectors that would plug into our stack of boards.
- High-power supply for the solenoids
- Connections to the solenoid-specific switches
- Connections to the LEDs
- Connections to the switches
- Some auxiliary power (5v, 48v, etc.)
All of these plugged into a 3D printed connection board that held all of our circuitry stuff. It also made it super easy to diagnose things when we needed to get under the hood. All you had to do was unplug the 5 large connectors, then lift up the machine.