Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Wiring two devices to one control panel  (Read 3380 times)

0 Members and 1 Guest are viewing this topic.

thomashenry

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 61
  • Last login:October 11, 2022, 03:55:21 am
  • I want to build my own arcade controls!
Wiring two devices to one control panel
« on: June 27, 2020, 04:06:25 pm »
I have a self built Multi Williams barop cabinet, based around a JROK Jamma board, some Wico sticks and leaf buttons. Because the monitor I've used has two switchable inputs, I thought I might as well put an RPi with Retropie into the cab as well, so I can play, amongst other things, Smash TV. So I need to connect one set of buttons and joysticks to two different systems at the same time.

I'm pretty igonrant with electronics, but I think I need to do something like this:

Wiring by Tom D, on Flickr

The idea here is that with just one switch on the grounds coming from both the iPac and the Jamma, I can switch control from one to the other. The control wires are permanently connected but protected from each other with diodes.

Is this the best way to do it? Are the diodes needed? The reason I put them there is that earlier today I wired a button up to JAMMA and a Zero delay at the same time with nothing in between, and it didn't work at all. In fact, it broke that control input on the Zero Delay....

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9674
  • Last login:Today at 01:08:07 pm
  • Designated spam hunter
Re: Wiring two devices to one control panel
« Reply #1 on: June 27, 2020, 07:02:28 pm »
earlier today I wired a button up to JAMMA and a Zero delay at the same time with nothing in between, and it didn't work at all. In fact, it broke that control input on the Zero Delay....
You're lucky if that's the only damage.   :scared

JAMMA boards and most encoders like the IPac are "active low" devices -- the inputs are triggered by applying ground.
                    Switch
    Ground ____/____ Input

ZD encoders are "active high" devices -- the inputs are triggered by applying 5v.
             Switch
    5v ____/____ Input

There's a way to work around this using a DPDT relay for each button, but that approach is needlessly complicated and expensive compared to this approach:

1. Only apply power to one system at a time, otherwise you might accidently end up in one system's config menu while you're using the other system. :banghead:

2. Replace the ZDs with an "active low" encoder(s). (IPac, Arduino, etc.)
- Daisy-chain the RasPi encoder ground, JAMMA ground, and all of the button grounds.
- Connect the JAMMA and Encoder inputs as shown below.
-- Band end (-) of both diodes on the NO terminal of the switch.
-- Ground on the COM terminal of the switch.
-- The diodes might not be needed, but they will prevent 5v from one system's inputs back-feeding into the other.

                  Switch  ____ - diode + ___ JAMMA Input
    Ground ___/___|
                             |___  - diode + ___ Encoder Input


Scott

thomashenry

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 61
  • Last login:October 11, 2022, 03:55:21 am
  • I want to build my own arcade controls!
Re: Wiring two devices to one control panel
« Reply #2 on: June 27, 2020, 07:24:33 pm »
earlier today I wired a button up to JAMMA and a Zero delay at the same time with nothing in between, and it didn't work at all. In fact, it broke that control input on the Zero Delay....
You're lucky if that's the only damage.   :scared

JAMMA boards and most encoders like the IPac are "active low" devices -- the inputs are triggered by applying ground.
                    Switch
    Ground ____/____ Input

ZD encoders are "active high" devices -- the inputs are triggered by applying 5v.
             Switch
    5v ____/____ Input

There's a way to work around this using a DPDT relay for each button, but that approach is needlessly complicated and expensive compared to this approach:

1. Only apply power to one system at a time, otherwise you might accidently end up in one system's config menu while you're using the other system. :banghead:

2. Replace the ZDs with an "active low" encoder(s). (IPac, Arduino, etc.)
- Daisy-chain the RasPi encoder ground, JAMMA ground, and all of the button grounds.
- Connect the JAMMA and Encoder inputs as shown below.
-- Band end (-) of both diodes on the NO terminal of the switch.
-- Ground on the COM terminal of the switch.
-- The diodes might not be needed, but they will prevent 5v from one system's inputs back-feeding into the other.

                  Switch  ____ - diode + ___ JAMMA Input
    Ground ___/___|
                             |___  - diode + ___ Encoder Input


Scott

Aha, thanks for the explanation. I assumed the ZD's worked the same as JAMMA, iPac etc. I was planning to use an iPac anyway, but happened to have a ZD to hand. Glad I got away without more damage!

Moving onto the options for making this work.... the first suggestion of only powering one device at a time is of course the most straightforward and perhaps the most sensible. Would be very easy too, the Pi and JROK could share a PSU  with a switch controlling which gets power. Plus it makes the connections to the amp/speaker much more simple, without any switching needed. The only drawback is that the Pi takes some time to boot, so going back and fore between the JROK and Retropie becomes a pain. But hey, first world problem if ever I heard one.

If I wanted them both powered at the same time though, I think the second option you outline is schematcially the same as what a drew. The only difference is that I propose daisy chaning ground from all the controls, which feeds into a switch that selects between ground between the iPac and JROK. This would prevent both devices being controlled at the same time, right?

If the diodes aren't needed I'll l leave them out (I'd need 36 of them..), but if there's any chance of damage to the JROK, I'll put them in.

Thanks again.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9674
  • Last login:Today at 01:08:07 pm
  • Designated spam hunter
Re: Wiring two devices to one control panel
« Reply #3 on: June 27, 2020, 09:32:34 pm »
If I wanted them both powered at the same time though, I think the second option you outline is schematcially the same as what a drew. The only difference is that I propose daisy chaning ground from all the controls, which feeds into a switch that selects between ground between the iPac and JROK. This would prevent both devices being controlled at the same time, right?
That approach might work on a single system that uses isolated grounds such as the X-arcade encoder.
- Each input group has an isolated ground.
- If you use the ground from group A with the inputs of group B, the inputs register as if you grounded the inputs from group A.

The problem is that your systems don't use isolated grounds.
- The IPac is grounded via the USB cable/shielding==>computer ground==>power outlet ground.
- The JAMMA board is grounded via JAMMA harness ground==>power supply ground==>power outlet ground.

Regardless of the switch position, the ground of one system provides a round-about ground path for the other system through the power outlet ground, hence the saying, "Ground is ground."

Of course, you could use an 18-Pole Double-throw (18PDT) or equivalent relay setup to control which system's input each button connects to.   >:D
- It's a bit complicated and somewhat expensive, but effective way to switch inputs with both systems always-on.
- You wouldn't need the blocking diodes for this setup.

                  Switch    ____ JAMMA Input
    Ground ___/____/____ Encoder Input
                            Relay

If the diodes aren't needed I'll l leave them out (I'd need 36 of them..), but if there's any chance of damage to the JROK, I'll put them in.
The blocking diodes are a best practice and cheap insurance for your setup.
- The odds of damage are low (but not non-existant) if you try it without them.
- If you run into problems you can add them later.


Scott
« Last Edit: June 27, 2020, 09:45:23 pm by PL1 »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Yesterday at 06:13:49 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Wiring two devices to one control panel
« Reply #4 on: June 27, 2020, 11:56:04 pm »
Listen to PL1 on this one.  You'll be out like a dollar for a big pack of diodes and it takes minutes to attach them.  Well worth the minimal cost and effort. 

thomashenry

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 61
  • Last login:October 11, 2022, 03:55:21 am
  • I want to build my own arcade controls!
Re: Wiring two devices to one control panel
« Reply #5 on: June 28, 2020, 06:01:07 am »
Ok, understood regarding the grounds. I think by far the best thing here is to have the RPi and JROK board connected to the 5V power via a switch, so only one can be powered at a time. Then I'll work on reducing the boot time of the RPi.

Coming back to the diodes - what sort should I use? I'm a total newbie with electronics, I've soldered together a few kits but I've never bought my own components....Having looked online I guess a packet of 1N4148 diodes would be ok?

https://www.ebay.co.uk/itm/1N4148-Standard-Silicon-Switching-Signal-Diode-/303379651304

And for the practical matter of connecting everything, would I be best soldering everything up on some perfboard? This wuld obviously take a lot longer than a few mins, as the previous poster suggested, so presumably there is a quicker and easier way?
« Last Edit: June 28, 2020, 06:19:24 am by thomashenry »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9674
  • Last login:Today at 01:08:07 pm
  • Designated spam hunter
Re: Wiring two devices to one control panel
« Reply #6 on: June 28, 2020, 09:08:34 am »
Coming back to the diodes - what sort should I use? I'm a total newbie with electronics, I've soldered together a few kits but I've never bought my own components....Having looked online I guess a packet of 1N4148 diodes would be ok?

https://www.ebay.co.uk/itm/1N4148-Standard-Silicon-Switching-Signal-Diode-/303379651304
You're in the right neighborhood with a "1N4" series diode.   ;D
- 1N4148 looks like it's probably a decent choice.
- 1N4001 has slightly thicker leads and is a known-good, common choice for this application.

And for the practical matter of connecting everything, would I be best soldering everything up on some perfboard? This wuld obviously take a lot longer than a few mins, as the previous poster suggested, so presumably there is a quicker and easier way?
If you don't want to use perfboard, you can use the strip/tin/cut/bend/solder/heat-shrink technique described in steps 1 -3 here for the pullup resistor.







Connect the band-end (-) of 2 diodes to one end of a piece of wire with a female QD on the other end that connects to the NO terminal of the switch.

Use 3 pieces of heat-shrink -- 1 where the two diode - leads meet and one on the + lead of each diode, same as the third pic.


Scott

thomashenry

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 61
  • Last login:October 11, 2022, 03:55:21 am
  • I want to build my own arcade controls!
Re: Wiring two devices to one control panel
« Reply #7 on: June 28, 2020, 02:09:24 pm »
Superb. Many thanks.

thomashenry

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 61
  • Last login:October 11, 2022, 03:55:21 am
  • I want to build my own arcade controls!
Re: Wiring two devices to one control panel
« Reply #8 on: July 01, 2020, 10:46:09 am »
Something else it's probably worth asking - I want to be able to easily remove the control panel without wires tethering it to the cab. I was thinking to connect all the controls up to a male/female DB25 socket, which I could then plug/unplug easily into a complememtary socket attached to the main bodyof the cab.  Perhaps using something like this:

https://www.amazon.co.uk/SIENOC-Breakout-Terminals-Connectors-Terminal/dp/B01NCISZPM/ref=sr_1_7?dchild=1&keywords=db25+breakout&qid=1593614712&sr=8-7

Sensible? Is there another tidier/better/easier way of doing it?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Yesterday at 06:13:49 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Wiring two devices to one control panel
« Reply #9 on: July 01, 2020, 03:34:37 pm »
That should be fine.  Molex connectors are typically used in the arcade industry because they are supposedly more durable but a db connector is a whole hell of a lot easier to unplug. 

thomashenry

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 61
  • Last login:October 11, 2022, 03:55:21 am
  • I want to build my own arcade controls!
Re: Wiring two devices to one control panel
« Reply #10 on: August 13, 2020, 06:03:16 am »
Made some progress on this. Here is the gameboard, a piece of 18mm ply that spans the internal width of the cab.

Untitled by Tom D, on Flickr

On the right is the JROK Williams jamma board, connected to a passive inline scanline generator. Then sitting between the iPac and the JROK is the board I made up, with female Dupont connectors for the control panel, that distributes each input through a diode to both the JROK and iPac. The board on the left is the amp, taken out of some logitech computer speakers. Underneath is a 6PDT switch that will switch power and audio to/from the JROK and Pi.

I need to figure out a neat way to attach the switch to the plywood. The switch (along with the volume control on the amp) will be activated via a dowel coming through the side of the cabinet (25mm solid wood).
« Last Edit: August 13, 2020, 09:19:57 am by thomashenry »