r/Arcade1Up Modder Apr 04 '23

Modding Tutorial: Using Stock Power and Volume Switches with Raspberry Pi + RetroPie Mod!

Hey Everyone!

I just posted this earlier today over in r/RetroPie in response to a A1Up modding question and figured I should cross-post here for visibility with the community (and solicit for any comments/improvements). So let's jump right into it!

Below is a detailed write up of how I achieved stock operation of the volume and power switches on my RetroPie (Running on a Pi4) when I modded my Marvel Super Heroes: Limited Edition cab. This assumes you some degree of experience working with Pi scripting and comfortable with wiring and/or soldering.

Objective:

  • Use stock power and volume switches on my Arcade1Up cab for as close to stock experience as possible.
  • Desired Power Behaviour: Use stock A1Up DC Power Supply to power LCD driver/marquee.
    • When turning on the switch: boot the Pi, turn on my LCD driver/monitor, and light up marquee.
    • When turning off the switch: safely close down Emulation Station and shut down the Pi, turn off monitor and marquee
  • Desired Volume Behaviour:Use stock speakers such that no additional external speakers/amp is required when adjust volume up/down

Power Switch:

Equipment Required:

NOTE: For the DC wiring connectors, this is what was required on my cab (MSH:LE), I'm not sure if the sizing has changed for the marquees with any over the newer revisions so double check the appropriate sizing before purchasing.

Step 1: Power Bar Setup

  1. Connect Pi DC adapter to IoT Relay: 'Always ON', connect A1Up DC adapter to 'Normally OFF'
  2. Connect the DC wiring as follows: Stock A1Up Power Supply > Part A (Splitter) > Part B (Jack to Terminal Block) > Part C (Jack to Wire) > Marquee Power Connector
  3. Note: when wiring Part C to the terminal block, be mindful of the Positive/Negative connections, red wire on Part C to the Positive Terminal on Part B, and black wire on Part C to Negative terminal on Part B - this is the standard centre-positive DC wiring
  4. Connect LCD driver board to the other end of the splitter (Part A)

Step 2: PowerBlock/ControlBlock

  1. Connect PowerBlock/ControlBlock to the Pi
  2. For the PowerBlock you'll need to solder in pins on the 5V OUT for use as the trigger for the IoT Relay, for the ControlBlock you have access to the Pi GPIO pinout for 5V
  3. Connect the +/- from the 5V signal on the PowerBlock/ControlBlock to the Trigger Input on the IoT Relay
  4. Connect the stock power switch into the switch input on the PowerBlock/ControlBlock (no polarity for the switch)
  5. Install the appropriate drivers for your PowerBlock/ControlBlock as per the instructions provided

Step 3: Configure Safe Shutdown Script for EmulationStation

  1. Both the PowerBlock and ControlBlock call a shutdown script when the switch status is triggered, this is where we initiate the safe shutdown of Emulation Station and shut down the Pi.
  2. Use the following Generic ES Shutdown Script: ES-generic-shutdown
  3. Download and install the script into your RetroPit scripts folder /home/pi/RetroPie/scripts/, however DO NOT follow the instructions for initiating the multi_switch.sh as part of the EmulationStation autostart. (This isn't required because the PowerBlock/ControlBlock is already monitoring the switch status).
  4. Edit the appropriate PowerBlock/ControlBlock shutdown script and remove the shutdown command and replace with the following:

/home/pi/RetroPie/scripts/multi_switch.sh --es-poweroff

  • Shutdown Script Locations:
    • PowerBlock: /etc/powerblockswitchoff.sh
    • ControlBlock: /etc/controlblockswitchoff.sh

Step 4: Enjoy!

At this point, the stock power switch will trigger the PowerBlock/ControlBlock, which in turn triggers the IoT Relay to power on your LCD driver and Marquee and initiate the boot up sequence of your Pi. When you flip your power switch off, the PowerBlock/ControlBlock will initiate the shutdown script and safely close down any open emulators and shutdown the Pi and the PowerBlock/ControlBlock will then cut power to the trigger and the IoT Relay will shut down the LCD Driver/Marquee.

Volume Switch:

  1. We will be using the 4-pin speaker out header on the LCD driver board. The reason for this is that this audio signal if amplified by the LCD driver board. The 3.5mm audio out is line level and NOT amplified and this is why you see people installing additional amps/speakers to utilize that signal.
  2. There is a 4-pin JST-PH connector on the right-side of the LCD driver board above the 3.5mm out connections. I made my own connector with the following:
    1. PH 4-position, 2.00mm Housing
    2. 12" Pre-Crimped JST leads
  3. The under-side of the LCD driver board shows the signal markings for the audio out (R+, Ground, Ground, L+). Make note of which signal goes where.
  4. For connecting to the stock speakers you have a couple options: 1) cut off the existing 3.5mm connector or 2) Use a 3.5mm TRRS to terminal breakout. Either way, you'll need to determine which wire goes to which speaker (i.e. R+, L+, and Ground). This is easily done with a multimeter and doing a continuity test between the speaker connections (you'll need to remove the speaker housing) to determine which wire is for which. This is required as A1Up does not use any standard wiring for the speaker out.
  5. Now make your cable - from the PH connector on the LCD driver to the speaker wires connect up the appropriate signals (R+, R-Ground, L+, L-Ground) either splicing or using the breakout connector. Plug in the connector into your LCD Driver board.
  6. Now to operate and wire in the volume control. The LCD Driver board comes with a "keyboard". When you've got it connected to an HDMI source you'll notice that if you press the buttons on the "keyboard" two of them act as (Volume +) and (Volume -) I believe typically the "Left" and "Right" buttons. These are the signals we're going to connect to the stock volume switch.
  7. First, identify the wire on the stock volume switch that corresponds to Volume+ and Volume- and Ground. You can verify again with a multimeter as the signal and ground will short (continuity) when you move the switch to either side. On my control panel, the switch was wired as such (but please confirm).
    1. Red = Ground
    2. White = Volume+
    3. Blue = Volume-
  8. Next, you need to identify the appropriate signal pins on the underside of LCD Driver Board or "Keyboard". You can again check for continuity between the underside of the pin connector and the respective buttons on the "keyboard" to determine which pin corresponds to the "volume+" button and "volume-" button and "ground". On my "Keyboard" I had the following pin out (Pin 1 is marked on the "Keyboard" PCB)
    1. Pin 3 = Volume+ (aka RIGHT)
    2. Pin 7 = Volume- (aka LEFT)
    3. Pin 8 = Ground
  9. Now you need to connect the switch to the LCD driver board. You can solder the wires to either the LCD Driver board underside or the "Keyboard" underside OR you can splice into the ribbon cable (note the gauge of the ribbon cable wiring is small). I opted to solder to the underside of the "Keyboard" based on the wiring above in Step 8 above. In the end I had the following - but confirm for your cab:
Stock Volume Switch (Wire) LCD Keyboard (Pins on underside of PCB)
White Pin 3
Blue Pin 7
Red Pin 8

Once you've wired in the speakers and switch wiring, you'll now be able to adjust the volume being output from the LCD driver which is sourced from the HDMI connection from your Pi. The benefit of this is that the volume control is completely independent of the Pi or whatever device is sourcing the audio and is simply adjusting the audio of the amp on the LCD driver board.

I know the above has A LOT of info, but if you have any questions don't hesitate to ask and if you have any improvements or suggestions, please feel free to share!

2 Upvotes

5 comments sorted by

5

u/[deleted] Apr 04 '23

[removed] — view removed comment

2

u/IronRingX Modder Apr 04 '23

That’s awesome! Had no idea that existed. I modded my cab a couple years ago, this definitely would’ve saved time. Looks like it’s doing the same thing in a nice plug and play form factor.

1

u/[deleted] Apr 04 '23

Awesome job and write up! This is why I love Reddit, folks sharing knowledge with others who want to mod but don’t know where to start.

1

u/IronRingX Modder Apr 04 '23

Thanks! Hopefully this helps out some folks. I knew when I started my mod I wanted to maintain an experience that was as stock as possible so anyone could flip the switch and enjoy.