Here’s something I’ve done for my XAC prototype inputs. If I’m not using a simple switch (aka a “dumb” on/off), I want to optically isolate the sensor (ex. capacitive touch, hall, etc) from the XAC. Mostly because I don’t want to burn out my XAC.
Anyhow, here’s where my ham radio roots show: I “dead bug” solder a PC817 photocoupler to a 3.5mm jack. A resistor (around 470 is fine) is also needed on the source side (remember–there is a little LED in there, and you need to drop current as appropriate).
The soldering is a little fiddly, but it comes together in a clean package. I keep a couple of these on-hand so that I can more quickly prototype. (Same reason I did those solid state relay boxes.)
Testing them is easy — connect it to Ground and D13 on an Arduino, and run the “Blink” sketch. When plugged into an XAC port, and the program running, you’ll see the button go on and off.