Interfacing With An Analog Joystick

[Firestorm_x1] put together a tutorial about interfacing an analog joystick with a microcontroller. These analog sticks are easy to find; he got his from Goodwill but we’ve got a couple in our junk box right now. The stick uses variable resistors to report its position so it’s just a matter of reading and interpreting that data. After explaining the concepts he demonstrates how to use the joystick to control a Basic Stamp 2 based robot, the Boe-Bot. This could easily be adapted for use with other robot platforms.

12 thoughts on “Interfacing With An Analog Joystick

  1. I did something that is somewhat similar to this. I hooked up an Atari 2600 controller to a Basic Stamp 2, and hooked that up to a computer so I could use it as a computer controller.

  2. yea its common, but I haven’t seen this good of a write up ever, usually your lucky to get a text file with some pin-outs and kinda have to kludge the conversion together in your brain

  3. This won’t work for most microsoft sidewinder products though, as they used a digital-over-analog protocol. A very nice chap over on the descent forums has a mostly open black-box that decodes the data from the joysticks and has a USB interface. It’s an OLD project, but the last update seems to have been in November. (Search for the words “project archive”, the text’s tiny)
    http://grendel.koolbear.com/3dpro.htm

    A slightly wasteful newer version using the Teensy microcontroller is here:
    http://www.descentbb.net/viewtopic.php?t=15526

    Should I submit something like this?

  4. When I use old analog joysticks I always pop them open and solder the 5V line (it’s already present) to the other side of the potentiometers. That converts the rheostat-type output to voltage-divider output. Then just use ADC inputs, no need to mess around with external capacitors, calibration, or low-functionality threshold based detection (or topheavy exponential calculations).

  5. A shortcoming-Most joysticks today employ USB, rather than the gameport.Most laptops and newer motherboards have completely removed support for the game port.
    A USB version of this same would be way cooler.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.