Help with Momentary Push Button

Thread Starter

brent11292

Joined Feb 17, 2020
6
Hello! So basically im trying to find a way to connect 3 momentary push button switches from the throttle quadrant to my computer and register it as a button. I have no experience in electronics and im trying to find the easiest way to do this. I have a mouse circuit board available and im thinking if I could wire the momentary buttons to the circuit board and plug in the usb to allow the button to work?
 

Attachments

dl324

Joined Mar 30, 2015
12,873
im trying to find a way to connect 3 momentary push button switches from the throttle quadrant to my computer and register it as a button.
Is this for a game?

What does "register it as a button" mean?

Are you trying to convert momentary switches into on/off toggle?
 

dl324

Joined Mar 30, 2015
12,873
Could you explain it? Don't have any experience in electronics.
From Popular Electronics April 1977 with a buffer added to drive the LED.
upload_2016-3-5_15-4-46.png
If you assume that C1 is discharged when power is applied, the output of IC1B would be HIGH. That will cause the output from IC1A to be LOW. So the circuit is stable and the output of IC1C is LOW (the LED will be on).

If you push S1 momentarily, that will apply a LOW to the input of IC1A and it's output will go HIGH. That will cause the output of IC1B to be LOW and the circuit is stable with the output of IC1C HIGH (the LED will be off). And C1 charges to VCC.

The next press of S1 will apply a HIGH to the input of IC1A and the outputs will toggle.
 
Last edited:

Reloadron

Joined Jan 15, 2015
5,935
Hello! So basically im trying to find a way to connect 3 momentary push button switches from the throttle quadrant to my computer and register it as a button.
Detecting a button push from a small momentary push button is not all that easy as getting from button to computer can be a problem. There are plenty of easy ways to run some hardware and software to detect a button press, the problem is how to work it into whatever software you are running. In other words having a detected button press detected is no problem but how to route the detected data is a problem as to where it goes and when it gets there what is supposed to happen? You have three buttons so all you need is three digital in out ports configured for in. You need something to for example interface your buttons to your computer a small piece of hardware. Then we need some software interfaced with that small piece of hardware to read it and detect the button push. That in turn needs to interface with whatever software you want to interface with. There is much more to it than connecting 3 buttons to a USB port. Just like mouse software reads a mouse on a USB port.

Ron
 

Thread Starter

brent11292

Joined Feb 17, 2020
6
Detecting a button push from a small momentary push button is not all that easy as getting from button to computer can be a problem. There are plenty of easy ways to run some hardware and software to detect a button press, the problem is how to work it into whatever software you are running. In other words having a detected button press detected is no problem but how to route the detected data is a problem as to where it goes and when it gets there what is supposed to happen? You have three buttons so all you need is three digital in out ports configured for in. You need something to for example interface your buttons to your computer a small piece of hardware. Then we need some software interfaced with that small piece of hardware to read it and detect the button push. That in turn needs to interface with whatever software you want to interface with. There is much more to it than connecting 3 buttons to a USB port. Just like mouse software reads a mouse on a USB port.

Ron
Would you be able to suggest what I should do? I have no idea where to start.
 

Reloadron

Joined Jan 15, 2015
5,935
I have no idea what software you are using. I understand FSX and can look at the throttle image and tell it's a flight simulator of sorts but how to actually interface with it and add things like buttons and then purpose those buttons I have no idea. There are all sorts of small inexpensive little hardware modules available like Arduino or PICAXE which can read a button press the problem is interfacing this sort of hardware to your software. I did read, Proprietary SimConnect API allows FSUIPC-like access to Flight Simulator functions and variables but am not sure what that means since I am not all that familiar, actually not familiar at all with flight simulator software. I can tell you an API (Application Program Interface) is a set of routines, protocols, and tools for building software applications. How much this API allows is beyond me. I am seeing stuff like FSX - Sim Connect - SDK Documentation, SDK is a (Software Development Kit). The problem here is I am not at all versed in the game let alone the software which makes it go.

Ron
 

Thread Starter

brent11292

Joined Feb 17, 2020
6
I have no idea what software you are using. I understand FSX and can look at the throttle image and tell it's a flight simulator of sorts but how to actually interface with it and add things like buttons and then purpose those buttons I have no idea. There are all sorts of small inexpensive little hardware modules available like Arduino or PICAXE which can read a button press the problem is interfacing this sort of hardware to your software. I did read, Proprietary SimConnect API allows FSUIPC-like access to Flight Simulator functions and variables but am not sure what that means since I am not all that familiar, actually not familiar at all with flight simulator software. I can tell you an API (Application Program Interface) is a set of routines, protocols, and tools for building software applications. How much this API allows is beyond me. I am seeing stuff like FSX - Sim Connect - SDK Documentation, SDK is a (Software Development Kit). The problem here is I am not at all versed in the game let alone the software which makes it go.

Ron
Found this which might solve the problem. But in terms of assembling it, how would I wire the momentary button to the circuit board?
 

MisterBill2

Joined Jan 23, 2018
8,809
The hardware portion is where the challenge lies! All that the code needs to do is see a change of state and set a bit. The big question is how to get that linked into the hardware. If there was one of those older game ports with the 15 pins then a bunch of button inputs were all defined and the hard part was soldering the wires. Now it is a USB port and so that button closure must be recognized, and it's interrupt noted and acknowledged, and then a data word put into a string of words and sent into the computer where some other code needs to understand it. And at that point the whole adventure of toggling on and off is just a matter of a few lines of logic: If the flag is set and the bit changes to a one, then set the flag off, if it is on.
Thus the whole challenge is getting that modern interface (USB) to know what to do, and getting it to do it.
 

Reloadron

Joined Jan 15, 2015
5,935
Found this which might solve the problem. But in terms of assembling it, how would I wire the momentary button to the circuit board?
Well that was freaky as I had just mentioned an Arduino and you link to something using an Arduino. Your link uses an Arduino Mega which is overkill as an Arduino Uno is more than adequate. "This projects integrates standard hardware with your flight simulator - this allows you to build your individual cockpit in a fast and cheap way"! Pretty cool. MobiFlight Project is another interesting web page. The nice part is they have a simple user interface so you have no need for any programming skills. They even have their own forum. Now if you go this route which seems practical and you decide to use an Arduino I suggest either Arduino Uno or Mega and I doubt you will ever use all the IN/OUT capabilities of either. Now there are thousands of Arduino Chinese knock off boards out there (counterfeit), some work and some don't. I suggest you buy a Genuine Arduino board from a reputable source. That depends on your location and a genuine Arduino Uno board runs about $20 USD through a reputable source the Mega version is much higher.

So you may have a good start with this. :) Again, while I have and use the Arduino stuff everything FSX is new to me. The MobiFlight Project I have never even heard of till a few hours ago. Looks doable though. You may want to check out their forums as that seems to be their main support/help place. Let us know how things go as the stuff seems interesting.

Ron
 

MisterBill2

Joined Jan 23, 2018
8,809
OK, now I have confusion on my end, since T was thinking, (guessing, I know), that "computer" was meaning some version of a device with a hard drive, motherboard, and an enclosure, able to run assorted programs, and having a structured OS. and still the one photo on the initial post shows an external device board set up with an opto-interrupter arrangement.
Even with that, the physical addition of an input requires not only a connection, but code to recognize that input and assign it some meaning and function.
 

Reloadron

Joined Jan 15, 2015
5,935
OK, now I have confusion on my end, since T was thinking, (guessing, I know), that "computer" was meaning some version of a device with a hard drive, motherboard, and an enclosure, able to run assorted programs, and having a structured OS. and still the one photo on the initial post shows an external device board set up with an opto-interrupter arrangement.
Even with that, the physical addition of an input requires not only a connection, but code to recognize that input and assign it some meaning and function.
Yeah, what is going on here is a little, maybe a lot, hard to follow. My initial take was that the intent was to get 3 buttons outside a computer to be recognized by the computer when any button was pressed. Then to further complicate things the three buttons actually needed to interface with a software program running on the computer. I saw the computer the same way you did. Then I started reading about FSX which is the software running on the computer and things got interesting. The software running is a Flight Simulator program (Loved Tom Hanks as Captain Sullenberger in the movie Sully). Anyway the software has a long history going back to the evil empire we call Microsoft. Eventually we get into a SDK for FSX and apparently FSX has a strong following. Some of the links back there in the thread point to what is going on.

In a nutshell the computer is connected to a uC through the USB interface. They used an Arduino Mega but mention a few other pieces of suitable hardware. Enter the Mobiflightproject. This projects integrates standard hardware with your flight simulator - this allows you to build your individual cockpit in a fast and cheap way! So if you follow the convoluted trail of bread crumbs you too will be landing big planes at major airports globally and if you are really good maybe even land one in the Hudson River. :)

Ron
 

MisterBill2

Joined Jan 23, 2018
8,809
Yeah, what is going on here is a little, maybe a lot, hard to follow. My initial take was that the intent was to get 3 buttons outside a computer to be recognized by the computer when any button was pressed. Then to further complicate things the three buttons actually needed to interface with a software program running on the computer. I saw the computer the same way you did. Then I started reading about FSX which is the software running on the computer and things got interesting. The software running is a Flight Simulator program (Loved Tom Hanks as Captain Sullenberger in the movie Sully). Anyway the software has a long history going back to the evil empire we call Microsoft. Eventually we get into a SDK for FSX and apparently FSX has a strong following. Some of the links back there in the thread point to what is going on.

In a nutshell the computer is connected to a uC through the USB interface. They used an Arduino Mega but mention a few other pieces of suitable hardware. Enter the Mobiflightproject. This projects integrates standard hardware with your flight simulator - this allows you to build your individual cockpit in a fast and cheap way! So if you follow the convoluted trail of bread crumbs you too will be landing big planes at major airports globally and if you are really good maybe even land one in the Hudson River. :)

Ron
OK, now it is clearer, and it seems that the concept is to do about what I had said was needed to do to make it work. But I am so very much NOT into video games and such that the whole thing is outside my world.
 

Reloadron

Joined Jan 15, 2015
5,935
OK, now it is clearer, and it seems that the concept is to do about what I had said was needed to do to make it work. But I am so very much NOT into video games and such that the whole thing is outside my world.
Same, I never got into the gaming thing. My kids did and now one grandson but not so much the granddaughter. I do remember Microsoft's first flight simulator and that goes back around 30 years running on a 286 AT. We actually added a math co processor so when you turned the plane it actually turned less the delay. Some of today's stuff is amazing. Disney studios comes up with some really cool effects. The flight simulator games are pretty cool with real actual airport imagery. I hope the thread starter gets where he is going with this.

Ron
 
Top