Skip to content

Electric Boogaloo

The wiring ended up being quite simple. There were just 15 components that needed to be wired: 5 solenoids, 3 relays, 3 copper foils, 3 bumper PCBs, 2 buttons, main board (with ESP-32c) and the power source.

The current iteration of the pinball machine needs power from two sources. The bumpers are powered by the 24V 6A power source, and the main board gets its power from USB.

The code files

PCBs

Two kinds of PCBs were made, a main board and a bumper board. The main polls for events with I2C, keeps score and communicates with a computer through USB, and the bumper board detects the ball, activates the solenoid and answers I2C queries.

The main board has a slot for a legged ESP-32c (or XIAO RP2040, if you do not care about proper serial communication with a computer). It also has an two I2C connections, even though only one is used. There is also power pins, if I ever want to make the pinball machine be powered with just one power cable. The main board also has exposed 7 other pins for debugging and future proofing.

The bumper PCB has two four pin I2C ports, a UPDI programming port, a screw terminal for the copper shorting and a pins for the relay that activates the solenoid.

Making the PCBs

You can read more from week 14 when I made the PCBs for the bumper and the main board.

Communication

The PCBs use I2C to communicate with each other. The main board polls each bumper every 100 millisecond to ask if they have been activated. If they have been, the main board adds 100 points to the score. The score currently is not visible, but is part of the serial communication that the board sends out via USB, and can be intercepted by either Arduino IDE Serial Monitor or some other project that listen for serial USB. The main board currently only polls the bumpers, as the paddles do not have any micro controllers in them.

Listening in Unity

One example that listens the serial communication of the main board was made during Interface week. There a Unity program listens to the serial communication sent by the main board, and shows when bumpers have activated.

Wiring

The wiring of the device is shown in the following graph.

The connectors in the wires wary a lot based on what kind of device it is attached to. Here is a list of all connectors:

  • The PCBs connect to each other with a 4 pin female heads with toothed connectors that bite through the wire.
  • The side buttons for the paddles use Abiko connectors, so the have been used there.
  • The relays have screw terminals, so I crimped a sock around all the wires that I connected to them.
  • Similarly, the shorting mechanism connectors in bumper PCBs have screw terminals, so they have been socked.
  • The solenoids just have exposed copper threads, so they were connected to other wires either through screw terminals or with Wago connectors.
  • The 24V power lines from the transformer are connected to the power cables with Wago connectors.

The wiring ends up being a bit of a mess (like all pinball machines should be), even though I took all the high power cables (both positive and negative) and bunched them together inside a wire collector and used the PCB rack to hold the bumper PCBs and relays.

Let’s call it an aesthetic choice.

Future work

It would be much more sensible to make the electronics as part of the whole component, e.g. to attach the bumper PCB and relay to the solenoid hanger of the bumper. But given the fact that the solenoid hanger already has too large of a footprint, attaching anything additional to it might cause problems. If I made all the bumpers into a one connected construct, I could reduce the footprint and attach the electronics to it at the same time.