About

Arcade cabinets are configured as closed systems where access to the cabinet's circuitry is restricted to the owner of the arcade machine. Reconfiguring or maintaining an arcade cabinet is a cumbersome process where the arcade machine has to be opened up at the back in order to access various components.

The tedious maintenance process gets worse with arcade machines that are based on the widely used Pandora Box because accessing the arcade setup involves pressing a push-button which is located inside the cabinet on the arcade machine. This implies that switching from, say, paid play with coins to freeplay would require opening up the cabinet, pressing the setup switch on the Pandora Box, making the necessary configuration changes and then putting the cabinet back together. If a large number of arcade machines have to be reconfigured, then the process can take an obnoxious amount of time, for literally just pressing a button. Furthermore, given an arcade parlor, switching devices on at the start of the business day, respectively turning off all machines at the end of the business day is, yet again, a tedious process since arcade cabinets discretely hide a power switch at the back that is not meant to be operated by customers but would have to be operated for each arcade machine in part.

Unfortunately, a simple modification where the push button would be desoldered, leads pulled from the Pandora PCB and a switch installed on the outside of the machine is not feasible because that would give access to the arcade configuration to customers that would be able to just switch to freeplay.

Fortunately, using some electronics, it is possible to add IoT technology to an arcade cabinet that will allow controlling features of the machine that should not be available to customers. Furthermore, the arcade machine can be controlled to be switched on or off just using voice commands based on node-red and a voice assistant such as Amazon Alexa.

Design Overview

A WeMoS mini controller will be used to drive a solid-state relay powering a plug extender that powers on the Pandora Box circuitry and the arcade monitor. The Pandora Box will be dismantled and modified in order to allow a signal from one of the WeMoS GPIO pins to drive the push-button allowing Pandora to be reconfigured.

Block Diagram

                                    
       +---------+                                               
       | Monitor |                                               
       +---+-+---+                                               
           | |                                                   
           | |                                                   
           | |    +---------+                                    
           +------+ Pandora +----------------------------+       
           | +----+   Box   +----------------+ +-------+ |       
           | |    +---------+                +-+       | |       
           | |                                 |       | |       
           | |                               +-+ WeMoS | |       
    +------+-+------+  +-------------------+ | |       | |       
    | Plug Extender |  | Solid State Relay | | |       | |       
    +------+-+------+  +-------++++---++-+++ | +--++---+ |       
           | |                 ||||   || |   |   +||-    |       
           | |                 ||||   || +---+    ||     |       
           | |                 ||||   ||          ||     |       
           | +-----------------+|||   |+----------+|     |       
           +---------------------+|   +------------+-----+       
           220/110V AC          | |               || 5VDC        
                                | |          +----++----+        
                                +------------+ Stepdown |        
                                | +----------+   AC/DC  |        
                                | |          +----------+        
                          +-----+-+------+                       
                          | Mains Socket |                       
                          +--------------+                       
                                                                 

Requirements

  • Solid state relay board or dual solid state relay AC board - solid state relays (SSRs) are meant to switch AC current and are comparatively smaller and better isolated than their mechanical counter-parts. SSRs must be powered with DC voltage at the input and are then controlled by a signal lead to the pins marked for the various channels that the relay has for the respective SSRs. A SSR can vary in the maximum allowed current but mostly the SSRs for Arduino boards are rated at about $2A$.

In case a dual SSR is used, then both channels can be bridged and both relays can be switched with a single signal from the WeMoS GPIO. SSRs are voltage-level triggered such that in a given low range of voltage for each relay in part, the relay defaults to an ON state and when a certain voltage threshold is surpassed, the relay closes to OFF. SSR boards meant to be used with the Arduino are designed to maintain a default ON state in a range of $0-2V$ and will switch to ON given an input signal between $2-5V$. Since the WeMoS GPIO is rated at $3.3V$ then the GPIO pin can be used to toggle the SSR.

  • AC/DC $5V$ stepdown converter - the AC/DC stepdown converter is used to power the WeMoS board directly from the mains as well as feed the required DC current to the SSR board.

These $5V$ stepdown converters are very small and can provide up to $600mA$ which is more than sufficient to drive both the WeMoS and the SSR board. The WeMoS when connected to WiFi will draw about $70mA$ from the stepdown module.

  • WeMoS D1 Mini - and ESP8266 based board that provides more than sufficient GPIO pins to drive the requirements of the project.
  • a transistor-based switch - a transitor based switch that will make contact between two pins thereby emulating a button press on the Pandora Box setup button.
  • standard electronics equipment - solder gun, blank PCBs, wires / Dupont wires, etc.

Modifying the Pandora Box

Although this step varies between the various Pandora Box models, the main idea is to emulate presses on the Pandora Box setup button. Opening the Pandora is straightforward and the PCB is exposed just by removing a few screws. Measuring conductance between the momentary switch and the closest array of resistors reveals two resistor pins that can be used to hook up a GPIO signal and the ground from the WeMoS.

Using a small variation of the transistor-based momentary switch, the circuit is mounted on top of the Pandora Box PCB and fastended down with some double-sided foam adhesive. Leads are then drawn through the plastic chassis up to the WeMoS that is mounted inside the cabinet.

Mounting the Rest of the Circuitry

The arcade cabinet that has been worked on in this tutorial is powered by a PC kettle lead that plugs into a socket on the bottom of the cabinet at the back. There are multiple leads from the socket, some of them leading to the Jamma PSU whilst three cables are hooked to an internal socket extender: ground (green) and the blue and brown wires.

Whilst the green wire representing the ground can be just passed through to the socket extender, the other two sockets (for the blue and brown wires) will have two wires attached to it that are then both inserted into the cable crimps of a dual solid state relay. The other socket, corresponding to each wire leading from the power sockets are then populated with the wires from the socket extender cable - this allows both SSRs to switch thereby allowing a total of $4A$ per relay. Even though $4A$ does not seem much, given the power formula $P = U * I$, the total expected amount of amps that could be drawn would, for an european-style socket be $880W$ ($440W$ for each relay).

Two additional wires are attached directly to the power sockets of the cabinet and drawn to the AC/DC stepdown converter that will power both the WeMoS board and the SSR DC input. During the modifications, an additional ground board was created in order to accommodate multiple GPIO switch leads having further developments in mind.

The end result is a very small circuitry that is placed on the interior of the arcade cabinet. From left to right:

  • a very small (vertical) grounding board using IC sockets for Dupont cables,
  • the WeMoS board,
  • the AC/DC stepdown converter,
  • (the crimp sockets and wires are part of the default cabinet build and represent the leads from the PC kettle that is connected from the outside - with an additional power button),
  • the board on the far right is the dual solid state relay board.

Programming the WeMoS Board

Since the WeMoS will, at the time of writing, only be used to toggle GPIO pins either HIGH or LOW, a boilerplate Arduino pin toggling sketch can be programmed to the WeMoS board. The sketch allows the WeMoS to boot in AP mode in order to be configured and to connect to a WiFi network and allows subscribing to an MQTT broker in order to process message for toggling the various GPIO pins.

Testing

With the setup completed, the GPIO pins used for toggling power, respectively entering the Pandora setup mode can be toggled by sending messages to the MQTT broker. The difference in usage between the two GPIO pins is that the pin responsible of driving the SSR will have to maintain its state whilst the GPIO pin meant to enter the Pandora setup mode has to simulate a button press such that the pin will have to be set HIGH and then LOW with a few milliseconds delay.

Assuming that GPIO pin 6 is responsible for powering the arcade cabinet ON or OFF, the following command issued in a terminal should set the GPIO pin to HIGH:

mosquitto_pub.exe -h 192.168.0.1 -t 'esp/arcade' -m '{ "pin": 6, "state": "on" }'

where:

  • 192.168.0.1 is the MQTT broker IP address,
  • esp/arcade is the topic that the WeMoS has been configured to listen on,
  • { "pin": 6, "state": "on" } is the message payload that instructs the WeMoS to set GPIO pin 6 to HIGH.

Note that SSRs tend to have their default state set to ON such that sending the above message will, in fact, turn the arcade machine off. Conversely, setting the pin state to LOW, via a payload message like { "pin": 6, "state": "off" }, will, in fact, power on the arcade machine.

On the other hand, the GPIO pin controlling the Pandora will have to be set to HIGH and then LOW after a delay of a few milliseconds - this can be accomplished from the command line as well, if need be:

mosquitto_pub.exe -h 192.168.0.1 -t 'esp/arcade' -m '{ "pin": 6, "state": "on" }' && \
sleep .25 && \
mosquitto_pub.exe -h 192.168.0.1 -t 'esp/arcade' -m '{ "pin": 6, "state": "off" }'

However, with the setup in-place, it is more convenient for a project such as Node Red to be used instead.

Node Red

The above node-red flow has two pathways established: the upper path is meant to switch the arcade on or off whilst the lower path is meant to press the Pandora momentary switch.

For the upper half of the flow and from left to right:

  • the blue node represents an Alexa device, followed by,
  • nodes that clean the message and reset msg.payload to an empty object,
  • the Switch node routs a message received by Alexa to turn the "Arcade" on to the upper node connector, respectively a message received by Alexa to turn the "Arcade" device off to the lower node connector - note that counter-intuitively, the messages are switched for the follow-up nodes, such that telling Alexa to turn on the arcade machine will tell the WeMoS to set the GPIO pin to LOW; this corresponds to how solid state relays operate,
  • the purple node represents the MQTT broker and the green node is just a debugging probe.

For the lower half, the flow, from left to right reads:

  • the blue node represents an Alexa device with a different name than the previous device,
  • the same set of nodes as per the previous path to clear up the Alexa message and reset msg.payload to an empty object,
  • after the Configure node, the On node instructs the WeMoS to set the GPIO pin to HIGH and, in parallel, a copy of the message is fed to the purple node that delays the message by $250ms$ and then instructs the WeMoS to set the GPIO pin to LOW - effectively simulating a momentary button press,
  • the purple node represents the same MQTT broker that the WeMoS subscribed to as per the previous path.

The flow could most likely be minimized by merging the nodes Humanize and Clear that do nothing much else than: set an easy to remember name for the device and reset msg.payload to an empty object. The Configure node is responsible for setting the MQTT topic (although, this could be achieved on the purple MQTT nodes directly) and the GPIO pin.

Amazon Alexa

Telling Alexa to discover devices should yield two new devices named Arcade and Arcade Setup that can then be used to control the arcade cabinet.

Further Developments

For the future, perhaps some of the following could be done in order to leverage the rest of the GPIO pins available on the WeMoS:

  • a servo motor could perhaps control the volume knob that right now sits at the back of the arcade machine,
  • controlling some of the decorative lights,

iot/controlling_an_arcade_cabinet.txt ยท Last modified: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.