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

  • Thread starter complexhuman
  • Start date
  • Tags
    Project
In summary: Yes, you can make a transistor circuit breaker like that. However, you would need to use a Darlington transistor. The Darlington transistor only allows current to flow through it when both its collector and emitter are at the same voltage.
  • #1
complexhuman
22
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
  • #2
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:
  • #3
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.
 
  • #4
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.
 
  • #5
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 :(
 
  • #6
hmm...Something just came up...How would make an analog not gate:P?
 
  • #7
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.
 
  • #8
hmmm...Complicated :bugeye:
ok...how about a transistor circuit breaker ?
 
  • #9
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.
 

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

1. What is the purpose of the project?

The purpose of the project is to investigate and gather data on a specific topic in order to answer a research question or to solve a problem.

2. How do I start my project?

To start your project, you should first identify your research question or problem and then develop a plan to collect data and analyze it. This may involve conducting experiments, surveys, or literature reviews.

3. What resources should I use for my project?

The resources you use for your project will depend on your research question or problem. Some common resources include scientific journals, books, databases, and reputable websites.

4. How do I organize my project?

Organization is important for a successful project. You can start by creating a timeline or outline to help you stay on track. It is also helpful to keep all of your data and notes in one place, such as a research notebook or digital file.

5. How do I analyze my project data?

Data analysis involves examining and interpreting the data you have collected in order to draw conclusions and answer your research question or solve your problem. This can be done using statistical methods, data visualization, or qualitative analysis techniques.

Back
Top