How to install and use a joystick

From STorM32-BGC Wiki V1
Revision as of 03:43, 22 January 2015 by OlliW (talk | contribs)
Jump to navigation Jump to search

There are plenty different types of joysticks. The most common type is the resistive joystick, there the joystick positions are detected by potentiometers, one potentiometer for each axis. Other types provide a PWM signal at their output. These types are usually easily identified by the electronic chips found on them - and by their significantly higher price.

The STorM32 can handle both types, but only the situation of a resistive joystick is considered here, since they are cheaper and provide more compact solutions.

Wiring

On a resistive joystick the stick positions are detected by potentiometers, one potentiometer for each axis. Every potentiometer has three connections, the center tap (slider, wiper) and two ends.

Each potentiometer is connected to the POT port on the STorM32 board (see Pins and Connectors) as follows:

  • The center tap goes to one of the pins POT-0, POT-1, or POT-2.
  • One of the ends goes to the GND pin, and the other end to the 3.3 V pin.
  • Be careful to not produce short cuts.

Often the joysticks also provide a button. It can be connected to e.g. the BUT port on the STorM32 board. Sometimes two wires must be routed to bot BUT pins, sometimes one is sufficient since GND has been provided already by having connected the potentiometers. The details need to be figured out case by case.

GUI Settings

The joystick can then be used for control in any available function by selecting the "Pot-0", "Pot-1", or "Pot-2" option, respectively, depending on whether the potentiometer associated to the stick has been connected to the POT-0, POT-1, or POT-2 pin.

A typical example would be to use the two joystick axes to control the pitch and yaw axis.

Wiring Examples

DYS Joystick Controller

Bruce356 at rcgroups has worked out the connection: Joystick Connection Scheme.

Storm32-wiki-joystick-dys-ivale-2-01.jpg Storm32-wiki-joystick-dys-1-01.jpg

Irun4fundotca's Joystick Solution

Irun4fundotca at rcgroups has worked out this example: Joystick Solution Details.

This joystick solution wont break the bank (about $5-10 USD). It's a joystick sold on ebay for about $3.59 USD with free shipping and comes with locking Molex. All that's needed is some wire, 3pin locking Molex housings, a 1-row 5-pin female Dupont header (to connect to POT pins GND, POT0, POT1, POT2, 3.3 V).

All power on the joystick's ports is shared, so only one ground and vcc is needed. The other 3 wires provide the X (Roll- POT0), Y (Pitch-POT1), Z (button-POT2) signal.

Here's the connection drawing to make it simple using roll instead of pan.

Storm32-wiki-joystick-irun4fundotca-1-01.jpg