2

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

Davide Andrea
  • 16,164
  • 4
  • 33
  • 62
  • 4
    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? – jonk Dec 21 '22 at 20:28
  • 1
    Are DPST switches available? – Hearth Dec 21 '22 at 20:55
  • 1
    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? – Cassie Swett Dec 21 '22 at 21:01
  • @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 – Ogami musashi Dec 22 '22 at 14:17

1 Answers1

6

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.

GodJihyo
  • 17,628
  • 1
  • 16
  • 45
  • 1
    Schottky diodes would be preferable (e.g., BAT54) to improve the logic low level. – hacktastical Dec 22 '22 at 01:14
  • @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. – GodJihyo Dec 22 '22 at 03:38
  • BAS70-05 if the poster is willing to do surface mount. – Smith Dec 22 '22 at 03:50