How Joysticks Work

Boy playing game with a joystick on laptop
Joysticks can take video gaming to another level. Andersen Ross Photography Inc / Getty Images

Joysticks pull off a really neat trick. They take something entirely physical -- the movement of your hand -- and translate it into something entirely mathematical -- a string of ones and zeros (the language of computers). With a good joystick, the translation is so flawless that you completely forget about it. When you're really engaged in a game, you feel like you're interacting with the virtual world directly.

In this article, we'll find out how several common joystick designs handle this translation. As we'll see, the technology has evolved a great deal from the first game console designs to the sophisticated "force feedback" models available today.


The Simplest System: Design

An early Atari joystick
An early Atari joystick

The basic idea of a joystick is to translate the movement of a plastic stick into electronic information a computer can process. Joysticks are used in all kinds of machines, including F-15 fighter jets, backhoes and wheelchairs. In this article, we'll be focusing on computer joysticks, but the same principles apply to other sorts of joysticks.

The various joystick technologies differ mainly in how much information they pass on. The simplest joystick design, used in many early game consoles, is just a specialized electrical switch.


This basic design consists of a stick that is attached to a plastic base with a flexible rubber sheath. The base houses a circuit board that sits directly underneath the stick. The circuit board is made up of several "printed wires," which connect to several contact terminals. Ordinary wires extend from these contact points to the computer.

The printed wires form a simple electrical circuit made up of several smaller circuits. The circuits just carry electricity from one contact point to another. When the joystick is in the neutral position -- when you're not pushing one way or another -- all but one of the individual circuits are broken. The conductive material in each wire doesn't quite connect, so the circuit can't conduct electricity.

Each broken section is covered with a simple plastic button containing a tiny metal disc. When you move the stick in any direction, it pushes down on one of these buttons, pressing the conductive metal disc against the circuit board. This closes the circuit -- it completes the connection between the two wire sections. When the circuit is closed, electricity can flow down a wire from the computer (or game console), through the printed wire, and to another wire leading back to the computer.

The Simplest System: Communication

When the computer picks up a charge on a particular wire, it knows that the joystick is in the right position to complete that particular circuit. Pushing the stick forward closes the "forward switch," pushing it left closes the "left switch," and so on. In some designs, the computer recognizes a diagonal position when the stick closes two switches (for example, closing the forward switch and the left switch simultaneously would mean a forward/leftward diagonal position). The firing buttons work exactly the same way -- when you press down, it completes a circuit and the computer recognizes a fire command.

Two variations on the "switch" design: In both, the stick's motion closes movable metal contacts.
Two variations on the "switch" design: In both, the stick's motion closes movable metal contacts.

This design communicates joystick motion in a sort of shorthand -- it processes movement as absolute values instead of subtle gradations. In other words, it can't distinguish between pressing forward on the stick a little bit and pushing it as far as it will go -- there is only one value for forward.


This is fine -- even ideal -- for some games. It's the perfect design form something like Pac Man or Tetris, for example. But it can be fairly limiting for other games, such as flight simulators. In the next section, we'll look at the conventional analog joystick design that can pick up on subtle shifts in position.

Conventional Analog: Design

In order to communicate a full range of motion to the computer, a joystick needs to measure the stick's position on two axes -- the X-axis (left to right) and the Y-axis (up and down). Just as in basic geometry, the X-Y coordinates pinpoint the stick's position exactly.

In the standard joystick design, the handle moves a narrow rod that sits in two rotatable, slotted shafts. Tilting the stick forward and backward pivots the Y-axis shaft from side to side. Tilting it left to right pivots the X-axis shaft. When you move the stick diagonally, it pivots both shafts. Several springs center the stick when you let go of it.


To determine the location of the stick, the joystick control system simply monitors the position of each shaft. The conventional analog joystick design does this with two potentiometers, or variable resistors.

Conventional Analog: Potentiometers

Each potentiometer consists of a resistor, in the form of a curved track, and a movable contact arm. The computer power supply conducts electricity to the input terminal, through the curved resistor, through the contact arm and back to the joystick port on the computer.

By moving the contact arm along the track, you can increase or decrease the resistance acting on the current flowing through this circuit. If the contact arm is on the opposite end of the path from the input connection terminal, electricity will have to flow through a long length of resistor, so it will face maximum resistance. If the contact arm is near the input terminal, the potentiometer will have minimal resistance.


Each potentiometer is connected to one of the joystick shafts so that pivoting the shaft rotates the contact arm. In other words, if you push the stick all the way forward, it will turn the potentiometer contact arm to one end of the track, and if you pull it back toward you, it will turn the contact arm the other way.

Varying the resistance of the potentiometer alters the electrical current in the connected circuit. In this way, the potentiometer translates the stick's physical position into an electrical signal, which it passes on to the joystick port on the computer.

This electrical signal is totally analog -- it's a varying wave of information, like a radio signal. In order to make the information usable, the computer needs to translate it into a digital signal -- a strict numerical value.

Conventional Analog: Into Digital

Steering wheel and pedal controls work on the same basic system as conventional joysticks.
Steering wheel and pedal controls work on the same basic system as conventional joysticks.
Photo courtesy CH Products

In the conventional system, a card (a printed circuit board) inside the computer handles this with a very crude analog-to-digital converter. The basic idea is to use the varying voltage from each potentiometer to charge a capacitor, a simple electrical device that stores electricity (see How Capacitors Work for more information). If the potentiometer is adjusted to offer more resistance, it will take the capacitor longer to charge; if it offers less resistance, the capacitor will charge more quickly.

By discharging the capacitor and then timing how long it takes it to recharge, the converter can determine the position of the potentiometer, and therefore the joystick. The measured recharge rate is a numerical value the computer can recognize. The computer performs this operation whenever it needs to get a read on the joystick.


You can potentially apply this system to an infinite variety of controls by connecting a potentiometer to different rotating components. For example, conventional steering wheel controllers work exactly the same way, with the wheel rotating the potentiometer contact arm directly. Some joysticks use an additional potentiometer for a Z-axis, activated by rotating the stick itself.

Some joysticks also have a "top hat" -- a thumb-activated miniature controller on top of the stick. This small joystick uses the same switch system as the simple joystick in the last section.

The conventional analog system works okay, overall, but it does have limitations. In the next section, we'll find out what the major problems are and then look at some recent solutions.

The Flighterstick, a modern programmable USB joystick from CH Products, uses the same "hands-on throttle and stick" (HOTAS) system as real fighter jets -- individual buttons have unique shapes and textures so you can identify them by touch.
The Flighterstick, a modern programmable USB joystick from CH Products, uses the same "hands-on throttle and stick" (HOTAS) system as real fighter jets -- individual buttons have unique shapes and textures so you can identify them by touch.
Photo courtesy CH Products

The Problem with Analog

There are a couple of big problems with the conventional analog joystick system. First of all, the crude analog-to-digital conversion process isn't very accurate, since the system doesn't have a true analog-to-digital converter. This compromises the joystick's sensitivity somewhat.

Second, the host computer has to dedicate a lot of processing power to regularly "poll" the joystick system to determine the position of the stick. This takes a lot of power away from other operations.


Next, let's take a look at how designers have addressed these problems to date.

New Additions

Joystick manufacturers have addressed these problems in a couple of different ways. One solution is to add a sensitive analog-to-digital converter chip in a specialized game adapter card or in the joystick itself. In this system, the converter spits out digital information directly to the computer, which improves the accuracy of the stick and reduces the work load on the host processor. These new joystick models can usually connect to USB ports, which also improves speed and reliability (see How USB Ports Work for details).

Another solution is to skip the analog potentiometer technology all together. Many newer controllers use optical sensors to read stick movement digitally.


In this system, the two shafts are connected to two slotted wheels. Each wheel is positioned between two light-emitting diodes (LEDs) and two photocells (the graphic only shows one photocell, LED pair for simplicity's sake). When light from each LED shines through one of the slots, it causes the photocell on the other side of the wheel to generate a small amount of current. When the wheel rotates slightly, it blocks the light and the photocell doesn't generate current (or it generates less, anyway).

When the shaft pivots, it spins the wheel, and the moving slots repeatedly break the light beam shining on the photocell. This causes the photocell to generate rapid pulses of current. Based on the number of pulses that the photocells have generated, the processor knows how far the stick has moved. By comparing the patterns coming from both photocells monitoring one wheel, the processor can figure out which way the stick is moving. This is the same basic system used in many computer mice. (Check out Electronics Circuits Reference Archive for more information.)

One of the biggest additions to the world of joysticks is force feedback technology. In the next section, we'll find out how these joysticks let you experience the game on a new level.

Force Feedback

The basic idea of a force feedback joystick (also called a haptic feedback joystick) is to move the stick in conjunction with onscreen action. For example, if you're shooting a machine gun in an action game, the stick would vibrate in your hands. Or if you crashed your plane in a flight simulator, the stick would push back suddenly.

Force feedback joysticks have most of the same components as ordinary joysticks, with a few important additions -- an onboard microprocessor, a couple of electrical motors and either a gear train or belt system.


The X-axis and Y-axis shafts connected to the stick both engage a belt pulley. The other end of the belt for each axis engages a motor's axle. In this setup, rotating the motor axle will move the belt to pivot the shaft, and pivoting the shaft will move the belt to rotate the motor axle. The belt's function is to transmit and amplify the force from the motor to the shaft.

Both an electrical signal from the onboard processor and the physical movement of the joystick will rotate the motor axle. In this way, you can still move the joystick even when the motor is moving it.

On the opposite end of the motor, the axle is connected to the joystick's position sensors (its potentiometers or optical sensors, for example). Whenever the stick moves, whether due to the motor or the player, the sensors detect its position.

The joystick has a built-in ROM chip that stores various sequences of motor movement. For example, it might have a machine gun sequence that instructs the motors to rapidly change direction, or a bazooka sequence that instructs the motor to shift the joystick backward suddenly and then forward again. The game software requests a particular sequence, and the computer transmits the request to the joystick's onboard processor, which brings up the appropriate data from its own memory. This reduces the work load on the computer and makes for faster reaction times.

As joysticks continue to evolve, manufacturers will take force feedback technology to whole new levels. This is great for avid gamers, of course, but it could also have a big effect on the rest of the population. Force feedback controller technology could lead to significant changes in industrial machinery, wheelchairs and other equipment for handicapped people, and even medical care. Researchers are also developing force feedback controllers to let people "feel" the Internet as they surf.

The possible applications are endless! In the future, joysticks could be as ubiquitous as computer keyboards are today.

For more information on these future prospects, as well as current and past joystick technology, check out the links on the next page.