79Views3Replies

Author Options:

Electronics: increase trigger signal length for USB gamepad Answered

This is related to my last Instructable.
https://www.instructables.com/id/cheap-USB-slotcar-timer-interface/

Sometimes when I install the track piece I am using on a fast straight I am missing laps.
The problem could be USB polling rates in Windows 8.
I found no way to increase polling rates to 500 or 1000Hz instead of the aprox. 180Hz.

First I don't know if the car triggers at all when I go over the contact very fast or if the USB polling is the problem. i can try to wire a LED in and see if it is flashing up when the counter is not working.

My thought is that I could increase the signal length when the car triggers the button.
Any ideas how this could be done?


My second problem is related. I also got a IR-gap-sensor. I understand that I need some kind of relais to make it trigger my USB gamepad buttons?

Please help an electronically uneducated guy! I have the feeling that the answers to my questions are probably not that hard anyways.


Discussions

0
None
Downunder35m

3 years ago

First I would not use Windows 8 for such a simple task ;)

Second the gamepad itself could be your culprit, I have a noname pad here that simply does not react to very short trigger presses, quite annoying with games that don't offer a rapid fire solution...

A cheap keypad would the next thing to try as the impulses here can be very short.

For the IR sensor you can use a transistor on the output but it depends on the type of voltage the gamepad / keypad needs.

The IR sensor output is usually a voltage in the rage of 5, 12 or 24V, if a transistor is not your kind of tech try an opto coupler, the input side on the IR sensor output, the other to "shorten" the contacts of the gamepad.

0
None
heavyweatherDownunder35m

Reply 3 years ago

I got an opto coupler and an IR sensor now.
How do I wire that and how is it all working together?

I will try to measure the voltage of the gamepad, maybe I can power my circuit through the gamepad.

What is the Optocoupler for? Does it switch for a longer time than the IR-sensor?
Do I need any other components? Resistors?
I figure you can not just wire the gamapad button to the emitter side of the octocoupler but you need some kind of relay that is switched by the optocoupler?

Is the optocoupler even necessary or could I just use some kind of relay triggered by the ir-sensor?

thanx

0
None
Downunder35mheavyweather

Reply 3 years ago

The gamepad should get 5V somewhere.

The optocoupler is basically a "safety" - one side is a LED the other a photo transistor.

If the sensor needs more voltage than what the gampad can supply and also offers the same type of output (e.g.12V) you can put the opto coupler between gampad and sensor.

This means the sensor switches the coupler and it's output can be wired to the voltages of the game pad.

The timing should be no problem.

If sensor and pad work at similar voltages you might not need the opto coupler, depending on the type of output from the sensor.

For expample if it offers a switch all is fine, if the sensor give an output voltage you use the optocoupler to connect to the gamepad.