2
\$\begingroup\$

I am building an arcade controller that has 4 buttons as Left/Down/Right/Up digital directions, and I want to add 4 other buttons that would be Down-Left, Down-Right, Up-Left and Up-Right.

All buttons are connected to a PCB with digital pins for each Left/Down/Right/Up digital directions, with common ground.

The following diagram explains the concept. The colored switches are the L/D/R/U directions, and the black switches are the intended DL/DR/UL/UR switches. The Arduino symbol is just there for illustration.

The PCB I will be using doesn't have any analog pin, and I can't program it. I have tried to connect a given black switch with its corresponding colored switches in series, and also connect a black switch directly to the corresponding pins, but the output is the combination of the colored switches whether I press the black switch and any of its corresponding colored ones. What can I do to make the circuit work?

enter image description here

\$\endgroup\$
4
  • 4
    \$\begingroup\$ May I gather that you cannot do any reprogramming of the Uno, so you cannot consider using up four more port pins for your new switches and then handling it in software? \$\endgroup\$
    – jonk
    Commented Dec 21, 2022 at 20:28
  • 1
    \$\begingroup\$ Are DPST switches available? \$\endgroup\$
    – Hearth
    Commented Dec 21, 2022 at 20:55
  • 1
    \$\begingroup\$ It sounds like you're saying that the PCB has 4 directional inputs (U, R, D, L), and you have 8 switches, and you want 4 of the switches to each trigger a single input (U, R, D, or L), and you want the other 4 switches to each trigger two inputs at once (UR, DR, DL, or UL). Am I understanding you correctly? \$\endgroup\$ Commented Dec 21, 2022 at 21:01
  • \$\begingroup\$ @jonk I am not using an Arduino. That being said, I can add an Arduino step between my buttons and the output PCB. In this case, as you suggest, I can use 8 input pins, and 4 output pins, with a code to handle the I/O. Thanks \$\endgroup\$ Commented Dec 22, 2022 at 14:17

1 Answer 1

6
\$\begingroup\$

If what you want is for example the DL switch to do the same as pressing Down and Left at the same time you should be able to connect it using steering diodes like this:

schematic

simulate this circuit – Schematic created using CircuitLab

Pressing Down or Left will work as normal, each will pull the respective I/O input low.

Pressing Down-Left will pull both Down and Left inputs low through the diodes. As long as the I/O inputs will see the diode drop (~ 0.6V) as a low input it will work. The diodes keep the Left and Down switches from interfering with each other.

If the logic levels are such that the diode drop presents a problem you would have to use something like Schottky diodes, transistors or logic gates, but looking at the logic levels for an Arduino UNO it looks like the limit is 0.3 x Vcc, so around a volt for 3.3V, or 1.5V for 5V, so I think you should be okay with the diodes.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Schottky diodes would be preferable (e.g., BAT54) to improve the logic low level. \$\endgroup\$ Commented Dec 22, 2022 at 1:14
  • \$\begingroup\$ @hacktastical Yeah, now that you mention it something like a dual common cathode BAT54CL would probably be perfect for this, not only Schottky, but both diodes in one package. \$\endgroup\$
    – GodJihyo
    Commented Dec 22, 2022 at 3:38
  • \$\begingroup\$ BAS70-05 if the poster is willing to do surface mount. \$\endgroup\$
    – Smith
    Commented Dec 22, 2022 at 3:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.