problems with a joystick... again =(

Discussion in 'General Electronics Chat' started by redacejr, May 1, 2008.

  1. redacejr

    Thread Starter Active Member

    Apr 22, 2008
    85
    0
    hi, i have been fiddling again with that pc joystick i hav salvaged (it works perfectly though) that i intend to use to guide my humanoids. i found the +5v pin and also the ground pins, also i found the pin for the x-axis and the pin for the y-axis on the joystick .
    the problem is that they do not work as i expected.
    To test how they work i attached a led with at 300ohm resistor to the y axis pin and another same setup on the x-axis pin. when i turned the thing on both leds lighted dimmly ( there was a 47kohm output off both pins). when i pushed the joystick foward the resistance decreased ( thus making led brighter) and when i pushed the joystick backward the resistance growed. same thing happened with the other axis.

    my wish was to :
    -make the voltage polarity change when i pushed the joystick back
    -all movements away from the original centre mean decrease in resistance

    is there a way to turn it like this without involving "nand" or "nor" logic gates???:confused::confused:


    thanks beforehand, marlon:cool:
     
  2. redacejr

    Thread Starter Active Member

    Apr 22, 2008
    85
    0
    erm, i kinda need it soon plss if u may
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    If you want the polarity of the voltage to change, then you will need to use a bi-polar voltage supply. Currently, there is only +5 and ground being supplied to the joystick. In order to change the polarity, you will also need -5v, and a circuit like an operational amplifier to change the overall scale of the voltage from the joystick.

    The output you get from the X and Y axis joystick pots are actually voltage levels. When the joystick is centered, both outputs will be pretty much halfway between Vcc (+5V) and ground - or about 2.5v. If you push the joystick one way, the voltage will decrease to nearly zero, the other way, it will increase to nearly Vcc.

    Everything is relative. In this case, the 2.5v represents the "zero reference" for the control input. Everything higher than 2.5v means the joystick is being moved one way, and lower than 2.5v means it's being moved the other way.

    Does that make more sense to you now?
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    You might be able to reverse the direction by swapping the leads on either end of the pot.
     
  5. redacejr

    Thread Starter Active Member

    Apr 22, 2008
    85
    0
    yea thanks sergeant. is there a way to use an external circuit to turn the >2.5 v into positive and the <2.5v into negative???
    like some sort of dpdt relay set up but with the resistance increases/decreases??????
     
Loading...