DPRG
DPRG List  



[DPRG] converting analog joystick

Subject: [DPRG] converting analog joystick
From: Dale Wheat dale at dalewheat.com
Date: Mon May 10 09:49:01 CDT 2004

Kip,

That's right for 100K, but that's only when the joystick is to one extreme.
It goes down to 0 ohms on the other side.

I thought I would put a 1K ohm resistor in series with the joystick, then
feed that into the "current to voltage converter" also listed in AN-31 (a
great collection of op amp circuits from National Semiconductor if anyone
else is interested).  I estimated (and I may be wrong) that I could also use
1K resistors for the feedback and input bias balance resistors.

Another thought I had was to put the pot in between two other resistors, say
1K, arranged as a voltage divider.  The voltage across the pot should then
change in relation to the overall resistance.  Referenced to ground, the
voltage at the bottom of the pot would vary from 0 to 2.5V, which is also
acceptable (not the 0-5V range I thought I originally wanted) because the
AVRs have an internal 2.56V bandgap reference voltage for the ADCs.

Thanks,

Dale Wheat
http://dalewheat.com
(972) 486-1317
(800) 330-1915, access code 00

----- Original Message ----- 
>From: "Kipton Moravec" <kip at kdream.com>
To: "DPRG List" <dprglist at dprg.org>
Sent: Monday, May 10, 2004 7:46 AM
Subject: RE: [DPRG] converting analog joystick


> If you have 5V to play with then you want V = I R => 5 = I 100000 => 50
> microamps of current.  For that amount an opamp can provide the current.
>
> See AN-31 from national semi
> http://www.national.com/an/AN/AN-31.pdf
>
> There is a circuit for a current source for the Constant current.
>
> Kip
>
>
> At 01:58 PM 5/9/04, you wrote:
> >Yes - put a constant current through the 2-wire connection through the
pot,
> >and you'll get a linear voltage across it.
> >
> >Ed Koffeman
> >
> >-----Original Message-----
> >From: dprglist-admin at dprg.org [mailto:dprglist-admin at dprg.org] On Behalf
Of
> >Dale Wheat
> >Sent: Sunday, May 09, 2004 1:41 PM
> >To: dprglist at dprg.org
> >Subject: [DPRG] converting analog joystick
> >
> >Electronics folk,
> >
> >I have an old PC joystick that I want to use for steering my robot.  It
has
> >X and Y axis potentiometers of ~100K.  I want to read a voltage directly
> >from the joystick, but the pots are not wired up as voltage dividers.  A
> >common +5V is attached to both pots, and the wipers are brought back to
the
> >X and Y axis pins.  The other side of the pot is not connected to
anything.
> >
> >What would be a simple circuit to convert this output to a linear 0V-5V
> >range?  I want to hook them up to a ADC input.
> >
> >Here's what I've tried so far:
> >
> >1)  I opened the joystick and grounded the other side of a pot.  Now it's
a
> >proper voltage divider, but it no longer works as a PC joystick.  :(
> >
> >2)  I removed the ground connection from the pot, and have tried tying
the
> >output pin to a fixed resistor to ground.  This produces a very
non-linear
> >voltage output.  :(
> >
> >Is there a simple opamp circuit that will convert the current to a
voltage?
> >I'm really not much of an analog guy, but I'm willing to learn :)
> >
> >Thanks,
> >
> >Dale Wheat
> >http://dalewheat.com
> >(972) 486-1317
> >(800) 330-1915, access code 00
> >
> >_______________________________________________
> >DPRGlist mailing list
> >DPRGlist at dprg.org
> >http://nimon.ncc.com/mailman/listinfo/dprglist
> >
> >_______________________________________________
> >DPRGlist mailing list
> >DPRGlist at dprg.org
> >http://nimon.ncc.com/mailman/listinfo/dprglist
>
>
> _______________________________________________
> DPRGlist mailing list
> DPRGlist at dprg.org
> http://nimon.ncc.com/mailman/listinfo/dprglist
>
>


More information about the DPRG mailing list

Copyright © 1984 - 2006 Dallas Personal Robotics Group. All rights reserved.
Website Design by NCC

For the latest robot news visit robots.net