Is There an Easy Solution for Creating a PC Joystick with Limited Components?

  • Thread starter Thread starter complexhuman
  • Start date Start date
  • Tags Tags
    Project
AI Thread Summary
A first-year student is attempting to convert an old Sega joystick into a PC joystick using basic electronic components. The main challenge is creating a circuit that can achieve specific resistance values (0 ohms for left, 50 ohms neutral, and 100 ohms for right) using only normally open switches. Suggestions include using FET switches and CMOS technology to manage the resistance levels effectively. The discussion also touches on the importance of understanding transistor characteristics, particularly the hfe value, to ensure proper functionality in the circuit design. Overall, the conversation emphasizes finding a simple solution to achieve the desired joystick functionality with limited components.
complexhuman
Messages
22
Reaction score
0
hmm....

Well, Ima 1st year student and I've been taught all about resistors and capacitors and inductors. So I decided to use my n00bish skills to change my old saga joystick into a pc one(analog) :P Everything is fine. Learned all about ports and everything I need to make the joypad. Now yesterday, I startted designing the circuts n stuff and came across a problem that's not within my scope to solve :( PC joystick port works by completing/varying resistance of the joystick circuit. E.g. for the x-axis pin 0 ohm implys left is pressed, 50 ohm nutral and 100 ohm indicates right. i.e. I need to come up with a circuit which should have a resistance of 50 ohm at normal state, 0 ohm when left button is pressed and 100 ohm when right button is pressed.

The easiest way to get this problem solved is using 2 way microswitches which allow current to flow one way when the switch is supposed to be open and other way when its closed. But the problem is, my sega kaypad buttons can only act as on and off. It does not have the fancy 2 way stuff. :frown:
So I was wondering if there was an easy way to do this without making things too complicated.

Thanks in advance
 
Engineering news on Phys.org
Is there any power available from the game port? What is the expected behavior when both switches are pressed at the same time (back to 50 Ohms?)? Can you change the right switch to be a normally-closed switch instead of a normally-open switch?

I think if you can change the R switch to a NC switch, you can make it work the easiest. You would put the left NO switch around a 50 Ohm resistor, and the right NC switch around another 50 Ohm resistor. The two 50 Ohm resistors are connected in series.
 
Last edited:
Exactly. The problem is I can only have a NO switch and no NC. And no, you shouldnot be able to press right and left at once.
 
complexhuman said:
Exactly. The problem is I can only have a NO switch and no NC. And no, you shouldnot be able to press right and left at once.
Is power available on the port? If so, just use FET switches that are driven by the two buttons. And I think you should plan for both switches being pressed at once, and make the result the 50 Ohm middle position.
 
power? you mean the +5 v bit and current supply? Yup :P ANd Nope :P you don't want to go to right and left at the same time. Even if some controlloers allowed that, its not possible with that sega controller I have.

hmmmm...

I have access to some "FET MPF102 N-Ch Junction", I've googled about FET's a bit. All the examples I've come across that i have understood seems to be like "put current thru this to open the switch." Gives me ideas for an analog and gate using 2 of those :) I am still confused :S I don't have much experience with those transistors :(
 
hmm...Something just came up...How would make an analog not gate:P?
 
complexhuman said:
hmm...Something just came up...How would make an analog not gate:P?
An analog NOT gate would be something like an NPN transistor with its emitter grounded, a resistor from its collector to 5V, and a resistor from its base to your input voltage source. As the input voltage rises, that turns on the NPN transistor, and drives it into saturation which pulls the collector down to a few times 0.1V. As the input voltage comes down to ground, that turns off the transistor, which allows the pullup resistor to raise the collector voltage up to 5V.

Since you have a 5V supply available, you can do your function easily with CMOS switches. For example, check out the MAX4626 CMOS switch:

http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail?Ref=116996&Row=386685&Site=US

It will do what you want. Maxim has a pretty broad line of FET switches, so you might be able to find a little cheaper switch that meets your needs. Use two FET switches with the two 50 Ohm resistors that I initially described, and have the left button pull the enable input of the left CMOS switch up when pressed, and have the right button pull the enable of the right CMOS switch down to ground when pressed. Have a default pulldown resistor on the left switch enable input, and a default pullup resistor on the right switch enable input. Use several kOhms for the pullup/pulldown resistors.
 
hmmm...Complicated :bugeye:
ok...how about a transistor circuit breaker ?
 
I was thinking there was any easy way to do this like A transistor which allows current to flow normally and when u put current through its base, it stops? Is that possible?
 
  • #10
complexhuman said:
I was thinking there was any easy way to do this like A transistor which allows current to flow normally and when u put current through its base, it stops? Is that possible?
It sounds like you need to find out more about what the game port is looking for. I'd assumed that it was 50 Ohms and 100 Ohms differential, but if it is just to ground, then it makes your job easier. And yes, you could do it with transistors then.
 
  • #11
hmm...looks like it..
Code:
                            UP
______+----------------------------------------------+
______¦ x = 0 kohm   ¦  x = 50 kohm  ¦  x = 100 kohm ¦
______¦ y = 0 kohm   ¦  y = 0 kohm   ¦  y = 0 kohm   ¦
______+--------------+---------------+---------------¦
LEFT  ¦ x = 0 kohm   ¦  x = 50 kohm  ¦  x = 100 ohm  ¦   RIGHT
______¦ y = 50 kohm  ¦  y = 50 kohm  ¦  y = 50 ohm   ¦
______+--------------+---------------+---------------¦
______¦ x = 0 kohm   ¦  x = 50 kohm  ¦  x = 100 kohm ¦
______¦ y = 100 kohm ¦  y = 100 kohm ¦  y = 100 kohm ¦
______+----------------------------------------------+
_________________________DOWN

So there are such transistors that does the job? Which once should I look for?
 
  • #13
complexhuman said:
yay...finally found it :)
http://www.epanorama.net/documents/joystick/GamepadPot.png
btw...what does it mean by with h21E > 100?
He probably means "hfe", which is one measure of the transistor's gain.

hfe = Ic/Ib

But hfe varies with collector current, and it is lower at lower collector currents. The resistor values shown in the example schematic are pretty high, so the collector current is going to be in the 20uA range, where a typical transistor like the 2N3904 doesn't have a great hfe. So the transistor that he lists in the schematic probably has good hfe (100 isn't bad) at low currents. If you are going to use a different transistor, look on its datasheet for its hfe value down in the 10-20uA range, and make sure it is >=100 min. The 2N3904 has an hfe of about 10-20 min at that low of a collecter current.
 
Back
Top