Converting old serial port combat joystick to USB

Status
Not open for further replies.

Boris

New member
Hi all, I'm new here and am looking for some much needed advice.

I am currently planning a project in which I want to replace the grip of a Sidewinder Force Feedback 2 Joystick with the grip of an old serial-port CH F-16 combatstick.

The Sidewinder Force Feedback 2 is widely regarded as the best force feedback joystick of all time. However, the grip leaves much to be desired in terms of buttons and hat switches.
Since I play Flight Simulations with some quite advanced aircraft, I need the extra functionality. I have managed to get my hands on a CH F-16 combatstick, that I hope will serve as a great replacement.
It has been suggested to me, that the best and easiest way to get this to work, would be to simply wire the CH grip to a teensy board, which is small enough to find room in the Sidewinder base along with the original circuitry.

Firstly, forgive my ignorance. I'm completely new to this and haven't done any electronics work since high school. My programming knowledge is also very limited. But I am willing to learn what it takes.

The CH Combatstick has 6 buttons, 1 4-Way HAT and 1 8-way POV HAT.

I have read that the Teensy supports 32 buttons and only 1 HAT. The first question is: Can I even get the CH grip to work fully with a Teensy? Can I for instance make the HAT switches just simply work as buttons? I won't be using the axes obviously, since they will be handled by the sidewinder.

Which Teensy board should I use?

How should I wire the buttons to the board?

What do I need to do to get the buttons to register, ie. what do I need to program?

Are there any beginner tutorials that I can read up on to gain the basic knowledge that I need for this?

Or am I out of my depth here?

I really hope you guys can help me out! I'd much appreciate it.
 
Which Teensy board should I use?

I like the Teensy++ 2.0, but it's a bit bigger than the Teesny 3/3.1.

How should I wire the buttons to the board?

The buttons are normally connected between ground and the Teensy pin and set high with INPUT_PULLUP.

What do I need to do to get the buttons to register, ie. what do I need to program?
it.

You can either create a custom controller device or use the sample software.

Are there any beginner tutorials that I can read up on to gain the basic knowledge that I need for this?

Or am I out of my depth here?

I really hope you guys can help me out! I'd much appreciate it.
It should be pretty straight forward to do. Have a look here for some info (the link at the bottom is outdated, it's now here). Also read this thread and this one.. That should get you started. If you end up using a Teensy++ 2.0 I have a tutorial here.

Regards,

Les
 
Wouldn't a teensy 3.x be better, so the buttons can be configured as interrupts? Or can we just assume that the teensy 2.0++ can poll fast enough?
 
Wouldn't a teensy 3.x be better, so the buttons can be configured as interrupts? Or can we just assume that the teensy 2.0++ can poll fast enough?

I have used a Teensy++ 2.0 in a couple of custom game controller projects and it works great.

Regards,

Les
 
Thanks a lot for your replies so far guys!

I guess I'll get stuck into reading the material!

So I should go ahead with Pointy's suggestion and get a Teensy ++ 2.0? I have no idea what configuring as interrupts means. Is there an advantage to this?

What about the ability to have more than one hat switch work? No problem to treat it as separate buttons?
 
Last edited:
Configuring the interrupts means you can attach a function to be called when an action happens, such as a digital input going low -> high, or high -> low. Otherwise, you just need to loop calling digitalRead during the loop to get the status (which is called polling). A way to think about it, is if you are going on a long distance trip where you aren't the driver. If you bring a book along to read, and the driver says something to divert you from reading the book that is an interrupt. If you are a stereotypical kid that is asking 'are we there' every few minutes, that is polling.

If you are doing a lot of things, you might want to use interrupts, because the interrupt will be handled immediately, and you might miss the window if you are polling, and doing something where you aren't checking the status. In some environments, you can put the microprocessor into a low voltage sleep mode until an interrupt is raised to save battery power. On the other hand, polling is generally easier to write. Given the speed of human reaction time, I suspect polling is perfectly acceptable for controlling a single joystick.

The comment about Teensy 3.x and interrupts is in the AVR processors, you can only attach interrupts to certain pins. On ATmega32u4 processors like the Teensy 2.0/2.0++, you only have 5-7 specific pins that can be attached to interrupts (including the two pins that support serial I/O). On the ATmega328p in the Arduino Uno, you only have 2 pins that can be attached to full interrupts. On the Teensy 3.0, just about every pin can be attached to an interrupt. I'm not sure about the exact details, but that is the general idea.
 
Thanks for your detailed explanation Michael! That makes things a lot clearer.

As I want to try and keep things as simple as possible I've gone ahead and bought a Teensy 2.0++ to use the polling method.

Before I can get stuck into getting the teensy to recognize the inputs, I need to work out how to wire the buttons in the stick. I won't be hooking up any axes, it's just the buttons I need working. I've removed the grip from the original Joystick and had a look at the internals.

First question: All of the Teensy tutorials and projects I've seen use a breadboard. For lack of space, I want to keep the thing as small as possible. Can I avoid using a breadboard?

The stick contains a small PCB in the head to which the Hat switches and some of the buttons are connected. The remaining buttons were connected to the main PCB in the joystick directly.

Which is easier: Keeping the internals as is... Can the Teensy pick up the inputs from wires coming from the PCB in the stick? This would save me some work.
Or should I rewire each button to connect to the teensy directly?
 
Thanks for your detailed explanation Michael! That makes things a lot clearer.
You are welcome.

As I want to try and keep things as simple as possible I've gone ahead and bought a Teensy 2.0++ to use the polling method.

Before I can get stuck into getting the teensy to recognize the inputs, I need to work out how to wire the buttons in the stick. I won't be hooking up any axes, it's just the buttons I need working. I've removed the grip from the original Joystick and had a look at the internals.

First question: All of the Teensy tutorials and projects I've seen use a breadboard. For lack of space, I want to keep the thing as small as possible. Can I avoid using a breadboard?

The stick contains a small PCB in the head to which the Hat switches and some of the buttons are connected. The remaining buttons were connected to the main PCB in the joystick directly.

Which is easier: Keeping the internals as is... Can the Teensy pick up the inputs from wires coming from the PCB in the stick? This would save me some work.
Or should I rewire each button to connect to the teensy directly?
The breadboard is merely a simple way to plug wires into the microprocessor. It makes it simpler when you are trying to make it work during the initial design stage when you can move wires about, change which pins are used, etc. After you are done the initial design, you can either solder the wires directly to the Teensy, solder the Teensy to a smaller perfboard (like https://www.adafruit.com/product/1214), use a smaller breadboard (like https://www.adafruit.com/products/65), or custom design your own pcb to attach the microprocessor to. Some of us never leave the design stage and only do things via breadboard.

To the real question, I don't know. It depends on the joystick and how it is wired up. It may be the secondary pcb contains a microprocessor that does something with the signals. You need to be careful that if other electronics are involved that you don't fry the Teensy.
 
Status
Not open for further replies.
Back
Top