Skip to main content

Raspberry Pi and Arduino Power Custom Pinball Table

Chris Dalke's homemade pinball table
(Image credit: Chris Dalke)

You wait ages for a Raspberry Pi retrogaming build, and then loads (opens in new tab) come along at once (opens in new tab). This pinball table was built by software engineer Chris Dalke (opens in new tab), and came to us via Hackaday (opens in new tab). It uses a Raspberry Pi 4 (opens in new tab) in concert with an Arduino (opens in new tab) Uno but the Arduino could easily be swapped for a Raspberry Pi Pico.

The project was born out of Dalke’s fascination with arcade machine interfaces - the “rich multi-sensory experience” you’re bombarded with to try and catch your attention against the similarly distracting environment. 

While the game itself runs in software, it was important to Dalke that the ‘feel’ was right, so the flippers are controlled using long-throw arcade buttons with a ‘clicky’ response, with the option of haptic feedback via a solenoid. The casing was built using laser-cut plywood, which slots together using friction to minimize the number of visible screws but can still be easily opened. The raw appearance of the project belies the tech that it encloses.

The all-important high-score tables are displayed on four Adafruit LED matrix panels controlled by the Arduino over an I2C connection. The orange glow of the panels influenced the look of the project elsewhere. The Arduino also handles the button inputs, communicating via USB link (most likely serial / UART) with the Raspberry Pi, which runs the game using a seven inch LCD display.

The pinball game itself is a custom one coded in C++ and OpenGL. There's lots of detail on this on Dalke’s GitHub page (opens in new tab), including build scripts, an input subsystem, and graphics. The libraries raylib and raygui were used, while SQLLite3 handles writing high scores to disk. The game contains several powerups, high scores, and is optimized to run at 60fps.

A single 5V power supply provides juice to the Pi, stereo speakers, and LED matrices, while the Arduino gets what it needs from its USB connection to the Pi. The touchscreen connects to the Pi over HDMI, with a USB connection too, handling the touch inputs as well as providing power. 

Ian Evenden
Ian Evenden

Ian Evenden is a UK-based news writer for Tom’s Hardware US. He’ll write about anything, but stories about Raspberry Pi and DIY robots seem to find their way to him.