element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
element14's The Ben Heck Show
  • Challenges & Projects
  • element14 presents
  • element14's The Ben Heck Show
  • More
  • Cancel
element14's The Ben Heck Show
Forum Build Your Own Pinball Machine
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join element14's The Ben Heck Show to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 1 reply
  • Subscribers 29 subscribers
  • Views 564 views
  • Users 0 members are here
Related

Build Your Own Pinball Machine

Former Member
Former Member over 10 years ago

This is a reply to a comment on YouTube. I had commented on a Ben Heck video entitled "Build Your Own Pinball Machine," and in the comment I left a link to a video of a pinball machine that I made. He commented back asking me if I would post to the forum with more information about the project and how it was made, so here it is.

 

https://youtu.be/f0mkl21ojuA

 

This is the machine I built, and it's actually pretty simple. It uses an old pinball machine, an arduino, and a computer to make an older pinball game programmable with a modern computer. The arduino is connected to the playfield so it can read the switch presses, operate the lights, and fire the coils. Connecting the arduino to a computer allows the game to be programmed.

 

The arduino sends data to the computer through a USB cable telling the computer when a switch has been pressed. The computer can then send data back to the arduino telling it to turn different lights on and off. The arduino provides an interface between the computer and the game board. It allows the computer to know what's happening on the board, and operate the lights when needed.

 

Connecting an arduino to a computer is easy, but connecting it to a pinball playfield is a little more complicated. Although it's not as difficult as you might expect. The arduino really only has to accomplish three tasks. It needs to read switch presses, turn lights on and off, and fire the coils used on the pop bumpers, flippers, and so on.

 

Turning lights on and off with an arduino is pretty easy to do. Lighting an LED is very often people's first project with an arduino. Although it's possible to operate the game board's original lighting with an arduino, the simple solution is just to replace the game's lighting with LEDs. I used LEDs I got out of a set of LED flashlights, and they worked just fine.

 

Reading the switch presses is not that difficult to do either. The arduino already has libraries to operate keypads, and the game board is really no different than a very large keypad. You just connect the arduino like you would to any key pad, and tell it what size it is. The arduino can then read key presses to send to the computer or fire the coils.

 

To fire the coils the arduino needs to be able to provide the fifty volts of DC current used to power them. The arduino runs on five volts. It certainly can't provide the power itself, so it needs to switch an existing fifty volt circuit on and off. This can be done using transistors. Once the coils are wired with power, the arduino can use a set of transistors to turn them on or off.

 

Originally I thought to use the game's original power supply board to provide the fifty volts of DC current, but I ended up making my own circuit that worked just as well. To get fifty volts DC from a standard outlet, you first need to get the correct amount of voltage, then convert the voltage from AC voltage to DC voltage.

 

A power transformer can be used to get the correct AC voltage, and a bridge rectifier can be used to convert it to DC voltage. These two components will provide fifty volts DC, but providing this current alone won't be enough to power the coils. The coils need a large discharge of energy all at once to operate. So a large capacitor is added to the circuit.

 

The capacitor will store energy and discharge that energy when it is grounded. Grounding the capacitor through a coil will cause it to fire. Placing transistors on the ground line of each coil will allow the arduino to control which coil is grounded to the capacitor and when it's grounded. This allows it to control which coils have power and when they have power.

 

Since the arduino can read key presses, the coils can be set to energize whenever a certain key is pressed. When the left pop bumper switch is hit, the arduino will ground the left pop bumper causing it to fire. After hitting the ball the coil can then be switched off to prevent it from over heating. Most coils will be set to energize momentarily whenever a certain key is pressed.

 

No data needs to be sent to the computer for the arduino to operate the coils, with the exception of the ball return. The ball return doesn't need to fire immediately when it's switch is pressed. It just needs to tell the computer when the ball has drained, and then the computer can decide when to fire the coil and serve the next ball.

 

Sending and receiving data between a computer and an arduino requires the use of some kind of programming language. You can use the serial console in the arduino development software to send commands to the arduino, but you would never be able to create a game that way. A programming language with support for serial communication is needed to create an actual game.

 

I used two different languages to program my game and they both worked equally well. The first version of my game was programmed in C# and it was certainly capable of what I needed it to do. It needed to talk to the arduino on the serial port and monitor the key presses, send commands to operate the lights, as well as play sounds and draw the scoreboard.

 

Although C# was capable of doing all this, I did find it difficult to overcome basic obstacles such as having two sounds playing at once, and adding background music. C# is more suited for creating applications than it is for making games. Later I switched to the Python programming language and used the Pygame library. It worked just as well as C# except it was a little easier.

 

I'd recommend anyone attempting this project to use Python and the Pygame library. It's not as powerful as C# but it can get a simple game up and running much faster. Pygame is pretty easy to learn, and there's a lot of documentation on it so you aren't likely to get stuck. Especially if you keep it simple. A basic display and a few sounds isn't difficult to accomplish.

 

Considering the complexity of older pinball games I think this is a pretty simple project. The power supply board only contains two components, and the driver board only contains one transistor for each coil. Plus the game can be run and programmed on any computer with a USB port. What could be more simple?

 

This might not be the most impressive project ever, but it gets the job done. I'd recommend this project to anyone looking to make a pinball game of their own. Trying to build a game with the same components used on older games is way too much work, and is well out of reach of the average hobbyist. This project however, only requires some experience using an arduino.

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    Former Member over 10 years ago

    Hi. Great job.

     

    I am currently trying to build a pinball machine too but without a PC. I am using a Chipkit Max32 for the core, a WavTrigger for the sounds/bgm and a Xula2 FPGA for the graphics (I will try to render a Virtual DMD on a Wide LCD 1280x390 via LVDS).

    Can you share some of your schematics ? solenoid and led drivers for example.

    What kind of PSU do you use for the Solenoids ?

     

    Thx

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Former Member
    Former Member over 10 years ago

    Hi. Great job.

     

    I am currently trying to build a pinball machine too but without a PC. I am using a Chipkit Max32 for the core, a WavTrigger for the sounds/bgm and a Xula2 FPGA for the graphics (I will try to render a Virtual DMD on a Wide LCD 1280x390 via LVDS).

    Can you share some of your schematics ? solenoid and led drivers for example.

    What kind of PSU do you use for the Solenoids ?

     

    Thx

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube