Maker Pro
Maker Pro

Multi-function joystick buttons without relays

S

S Rated

I've successfully interfaced an xbox controller with my pc via USB and
autohotkey scripting. What I'm stuck on now is figuring out the
wiring for creating alternate functionality in each button.

Say I have five buttons - A B C D E - on the joystick. Each button is
a SPST momentary switch, which pulls to ground when activated. I now
want to introduce button X to the mix. Which means wiring X across
buttons A through E so that X is now also activated with each press of
A through E (similar idea to having a second keyboard where all
characters are capitalized by default). Can it be done without use of
PICs, DPST switches or relays for each button?
 
J

Jasen Betts

I've successfully interfaced an xbox controller with my pc via USB and
autohotkey scripting. What I'm stuck on now is figuring out the
wiring for creating alternate functionality in each button.

Say I have five buttons - A B C D E - on the joystick. Each button is
a SPST momentary switch, which pulls to ground when activated. I now
want to introduce button X to the mix. Which means wiring X across
buttons A through E so that X is now also activated with each press of
A through E (similar idea to having a second keyboard where all
characters are capitalized by default). Can it be done without use of
PICs, DPST switches or relays for each button?

yes, use an AND gate or a "diode and"
 
S

S Rated

yes, use an AND gate or a "diode and"

I'm not sure I follow how you'd accomplish this with logic gates.
Would you mind explaining how you would go about wiring this?

I want to effectively create another set of buttons - AX BX CX DX EX -
by wiring up five additional momentary switches. When the AX button
is pressed, it not only pulls A to ground but also X. Thus, the
joystick controller simply sees this as simultaneous pressing of A and
X.
 
R

Rich Grise

I'm not sure I follow how you'd accomplish this with logic gates. Would
you mind explaining how you would go about wiring this?

I want to effectively create another set of buttons - AX BX CX DX EX - by
wiring up five additional momentary switches. When the AX button is
pressed, it not only pulls A to ground but also X. Thus, the joystick
controller simply sees this as simultaneous pressing of A and X.

It's also known as the diode-or:
http://en.wikipedia.org/wiki/Diode-or_circuit

In the first circuit shown, the +5VA, B, and C each have a pullup R
(4.7k-22k) to the +5v., and the button to ground is to the left of
each diode. The one they have labeled "TERMPOWER OUT" is your "X".

Have Fun!
Rich
 
E

ehsjr

S said:
I'm not sure I follow how you'd accomplish this with logic gates.
Would you mind explaining how you would go about wiring this?

I want to effectively create another set of buttons - AX BX CX DX EX -
by wiring up five additional momentary switches. When the AX button
is pressed, it not only pulls A to ground but also X. Thus, the
joystick controller simply sees this as simultaneous pressing of A and
X.

Existing:
___
Gnd---+---o o---A----------------------------+-->
| ___ |
+---o o---B----------------------+--> |
| ___ | |
+---o o---C----------------+--> | |
| ___ | | |
+---o o---D----------+--> | | |
| ___ | | | |
+---o o---E----+--> | | | |
| | | | |
Added: | | | | |
[D1] [D2] [D3] [D4] [D5]
___ | | | | |
Gnd---+---o o---EX---+--> | | | |
| ___ | | | |
+---o o---DX---------+--> | | |
| ___ | | |
+---o o---CX---------------+--> | |
| ___ | |
+---o o---BX---------------------+--> |
| ___ |
+---o o---AX---------------------------+-->

The banded end of each diode is at the bottom.

Ed
 
J

Jasen Betts

I'm not sure I follow how you'd accomplish this with logic gates.
Would you mind explaining how you would go about wiring this?

I thought you wanted something slightly different.
I want to effectively create another set of buttons - AX BX CX DX EX -
by wiring up five additional momentary switches. When the AX button
is pressed, it not only pulls A to ground but also X. Thus, the
joystick controller simply sees this as simultaneous pressing of A and
X.

UPPERCASE = outputs
lowercase = inputs (low when pressed)

A = a ∧ ax
B = b ∧ bx
C = c ∧ cx
D = d ∧ dx
E = e ∧ ex

X = ax ∧ bx ∧ cx ∧ dx ∧ ex

(I used an uncommon symbols if it doesn't show correctly '∧' is 'and')
 
Top