Pandora's box DX
Sanwa joystick with USB encoder (zero delay thingy)
Problem is : Im having trouble with the Sanwa Joystick with the pandora box. Im not sure if it can work thru USB. I'm thinking i have to use the JAMMA cable, but if I do that : I won't be able to switch between systems with the KVM switch.
There are two problems with this plan.
As you pointed out, the first problem is that the ZD encoder is a USB device but JAMMA devices don't need a USB encoder because the joystick microswitches connect to the JAMMA harness and the JAMMA PCB functions as the encoder.
With
most encoders, you can get around this by using blocking diodes and wiring the JAMMA harness input to the microswitch in parallel with the encoder input. (see #2 below)
The second problem is that the ZD operates
very differently than most modern electronic devices.
JAMMA boards, most encoders, and most modern electronic devices are "active low" devices. When you apply ground (logic low) to an "active low" input, it triggers the output.
Switch
Ground ____/____ Input
ZD encoders are "active high" devices. When you apply 5v (logic high) to an "active high" input, it triggers the output.
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.
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 are a cheap insurance policy that will prevent 5v from one system's inputs back-feeding into the other system.
Switch ____ - diode + ___ JAMMA Input
Ground ___/___|
|___ - diode + ___ Encoder Input
Related thread:
http://forum.arcadecontrols.com/index.php/topic,163113.0.htmlScott
P.S. The wiring pinout for the PB is often referred to as "CHAMMA" (Chinese JAMMA) -- 4 pins near #25 are inputs instead of the grounds that you would find in a true JAMMA harness.