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 Diagram for Hotkey Action Buttons  (Read 589 times)

0 Members and 1 Guest are viewing this topic.

danilux

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:December 28, 2022, 02:53:47 am
  • I want to build my own arcade controls!
Wiring Diagram for Hotkey Action Buttons
« on: December 08, 2022, 08:03:10 pm »
Hardware: RP4 with Zero Delay USB Encoder using Batocera as Front End

Hi guys, I'm building an arcade cabinet with dedicated admin buttons like exit game, pause game, etc. In Batocera you have to press the hotkey button (select by default) together with a hotkey action button (e.g: Exit) to trigger the (e.g: Exit) action, what I want is to be able to just press one admin button like Exit and trigger the Exit action, without the need to also press the hotkey (select).
So in the background both the hotkey (select) + hotkey action (e.g: Exit) inputs should be triggered with just one button press.

I've read a lot of threads here mostly from the Mod User PL1 with great information, following his advice I've bought some "blocking" diodes (1N4001), 20 awg wires, JST connectors, etc.
What I understand so far is that I have to wire the hotkey input (select by default in Batocera) to each hotkey input action (exit, pause, etc) where each hotkey input action is using a blocking diode to not allow to enter reverse signal from the hotkey button (select), so when the select button is pressed alone doesn't trigger all the hotkey actions and just works as coin.
What I'm missing is a diagram of how everything should be connected, what happens with ground, the position of diodes, etc. I know very little about electrical thing so please teach me like I'm 5, this is an image of what I have to start, and here's another wothout wires https://drive.google.com/file/d/1OpyrP3fCOKnQN2vlxmbIwxWjVQAqDcw4/view?usp=sharing


« Last Edit: December 09, 2022, 04:16:19 am by danilux »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9403
  • Last login:Today at 12:08:16 am
  • Designated spam hunter
Re: Wiring Diagram for Hotkey Action Buttons
« Reply #1 on: December 09, 2022, 04:39:06 am »
Zero Delay USB Encoder
http://forum.arcadecontrols.com/index.php/topic,159856.msg1681769.html#msg1681769

I know very little about electrical thing so please teach me like I'm 5
Here's a theory of operation walk-through for blocking diodes in this "active low" diagram.



1. A diode is like a one-way valve in plumbing.
- You need enough water pressure (voltage) pushing in the right direction for current to flow. (forward biased)
- If water pressure is applied in the other direction, current will not flow. (reverse biased)

2. The cathode (-) on a diode is the end marked with the band.  The other end is the anode. (+)

3. When you press "Button X" (upper left), ground from the green wire is applied through the pink wire to "Input X" and the anode of the pink wire diode.
- Ground on "Input X" triggers the associated output.
- Ground applied to the anode reverse biases the diode, blocking any current flow through it.

4. When you press the "Shazaaam! (dedicated)" button (lower left), ground from the green wire is applied to the "Shazaaam!" input and the anode of both blue wire diodes.
- Ground on "Shazaaam!" input (top) triggers the associated output.
- Ground applied to the anodes reverse biases both diodes, blocking any current flow through them.

5. When you press the "Shazaaam! + X" button (upper right), ground from the green wire is applied to the cathode of the pink and upper blue diodes.
- The Shazaaam! and X inputs have pullup resistors that keep the input (and the anodes of the diodes) at a logic high until ground is applied to the input.
- With a logic high on the anode and ground on the cathode, both of those diodes are forward biased, allowing current to flow through them which applies ground to the Shazaaam! and X inputs.
- Ground also travels down the blue wire to the anode of the lower blue diode, reverse biasing that diode because there is no ground applied to the cathode and blocking any current flow through that diode.

Since your "ZD" encoder is an "active high" device, the diodes in your setup will be facing the other way (cathode toward input) and the green ground line in the diagram is the 5v common (outer pins) on your "ZD".
- The direction of the one-way valves (diodes) is reversed and so is the the direction of the water pressure. (voltage)
- "Shazaaam!" input in the diagram = "Select" input in your setup.
- "Shazaaam! + X (One Click)" combo button in the diagram = "Exit Game" combo button in your setup.
- "Shazaaam! + Y (One Click)" combo button in the diagram = "Pause Game" combo button in your setup.


Scott