Ok, so I am waiting on some parts to arrive and to be honest, I wanted a bit of time without the soldering iron in hand. So, I have spent a little time for a little side-project: making a power controller.
So far, when testing the machine I had to press the power button on the motherboard of the pc. That works as long as the machine is not finished, but eventually it should not be necessary to first open up the back of the cab, find your way through the wires to switch the machine on. On the other hand: I have not put a dedicated power button on the cabinet anywhere. So, I have to find a way to switch power on using the existing buttons.
I was inspired by a video from Jeri Ellsworth (electronic engineer, maker, geek girl and pinball lover) where she explains a circuit she designed around a 555-timer that can be used to switch a real pinball machine on using a switch connected to a flipper button for example. And when switched on, but not used (detectable because the switch is not triggered; the button is not pushed) the machine will switch itself off. She explains the circuit in this video:
So, I am thinking to do something similar, but based on an arduino. I choose an arduino because I have a few lying around, and a little bit of experience. Also, it allows me to do a bit more than power alone, but more on that later. Maybe I will give a similar 555 circuit a try, but that takes too much time now since I do not have any experience with it. Its fun to learn, but I want to keep the focus on the pinbal machine.
On with the arduino power controller. Thinking about it, I came up with these requirements:
- When mains power is connected to the machine, I want some indication power is on, but the machine should not be full on all the time. This shall be called the STANDBY mode.
- Use an existing button to switch the machine on. For example by press-and-holding the button for a while.
- When switching the machine on the power supply for the DMD shall be switched on before the PC is switched on.
- The existing button shall also remain capable of performing its originally intended function when the machine is on
- Hook up the headphone switch so a plugged-in headphone can be detected
- Night-mode: If headphone is plugged in, all the noise making force-feedback items (shaker, gear, knocker, contactors) can be switched off.
Next up: a first schematic showing what parts are needed. I decided to give Fritzing a go to draw the schematic. Having played with it a little bit a few years ago, I downloaded the app and gave it a go. Very easy to get started and get to a result. I am sure this schematic will require several updates, but this is what I came up with:
This device will be a three-state state machine:
STANDBY – Only the Arduino receives power, the rest of the machine is off. A white LED behind the coin-reject button will pulsate/fade (similar to an apple macbook) indicating the machine is in STANDBY mode
STARTUP – When the coin-reject button is pressed and held for 3 seconds, the machine will be powered on in two stages: first the DMD power supply (DMD relay), wait 1 second, then switch on everything else: force-feedback devices (noisemaker relay), and PC with screens (rest relay). Finally the arduino will “push” the PC power button, starting up the PC. The DMD PSU is switched on first, because otherwise the PinLED DMD will draw its power from the PinDMD via USB which cannot supply enough power and break the board.
ON – If everything from the STARTUP stage has been completed, the machine goes in ON mode. While ON, it will periodically monitor a pin to see if the PC PSU is still on (supplying 5V) and it will monitor the headphone jack to see if headphones are plugged in. If so, it will switch off the power supply to the force-feedback machines (night-mode switch).
That’s the idea. The next step will be building this circuit on a breadboard with the relays replaced by LED’s and programming an arduino sketch. What do you think, will this work? Discuss!