In This Article
What is a Joystick?
A joystick refers to a specific type of input device used to control the movements of the pointer or cursor simply by maneuvering a lever, especially while using gaming or graphic applications.
Technically, a joystick is a handle-like input device that moves sideways, forwards, and backwards to control an object in a computer program or point towards it, based on the movement of the stick with reference to the X and Y coordinates.
- A joystick is an input device that controls the movements of the pointer in 2-D axes.
- There are two potentiometers for reading the analog output voltage along the two axes.
- The +VCC and Ground connect the potentiometers, acting as Voltage Divider Network.
- There is a freewheeling holder, and based on its movement, the position and resistance of the knob of the potentiometer change.
- There are different types of joysticks available, and their designs vary from one to the other.
A joystick refers to the controlling and pointing device. It is used to move the object on the screen for effective control in video games.
A joystick is also known by different names, such as:
- A flight stick
- A control column
You may think that a joystick is the same as a mouse, but joysticks usually have buttons, also referred to as triggers.
Also, the cursor keeps on moving in the direction of the joystick if it is not kept upright, as opposed to the mouse where the cursor does not move further unless the mouse is moved.
The modern joysticks are typically connected to the computer via different ports, such as:
- Universal Serial Bus (USB)
- Serial port
- Game port
Reading the values
It is very important to read the analog values of the joystick. The voltage of the analog signal output of the joystick ranges between 0 volts and 5 volts.
When the joystick is moved from one end to the other along the X-axis, the output deviates from 0 volts to 5 volts. The same thing happens when it is moved along the Y-axis.
On the other hand, when the joystick is in the rest position, that is, at the center, the output voltage is roughly half of Voltage Common Collector (VCC), that is, 2.5 volts.
The physical position of the joystick can be determined when this output voltage is fed to the Analog to Digital Converter (ADC) on a microcontroller.
What is the Structure of a Joystick?
Usually, the joysticks are two-dimensional, meaning they have only two axes of movement. However, there are a few models that are three-dimensional.
There are different hardware parts that make a joystick, such as:
- A handle or top
- A stick or shaft
- Mounting plate
- Dust washer
- Restrictor gate
- Wire harness
There are actually five pins in a traditional thumb joystick, and its pinout is as follows:
- Pin 1 – VCC
- Pin 2 – X-output
- Pin 3 – Y-output
- Pin 4 – the tactile switch
- Pin 5 – GND
The tactile switch is connected to the VCC via the resistor when not pressed and via the ground when it is pressed.
Types of Joysticks
Basically, there are two major categories of joysticks namely, the analogue joysticks and the digital joysticks. Each of these comes in various designs, models, and functionalities.
There are different types of analog joysticks available on the market, such as:
- Thumb or finger operated joysticks
- Hand operated joysticks
- Displacement joysticks
- Finger operated joysticks
- Hand-operated isometric joysticks
As for the digital joysticks, you will get:
- A paddle joystick
- A joypad
- An Atari-style joystick
How Does a Joystick Move?
Typically, the design of the joystick includes two slotted and rotatable shafts called gimbals. Between these two shafts, there is a thin rod. It is this rod that moves.
It is facilitated by one of the two shafts in the left and right direction, that is, along the X-axis, and the other shaft helps in moving in the up and down direction, that is, along the Y axis.
Therefore, the joystick pivots due to the rod and the two rotatable shafts, and it moves in the two following ways:
- When the joystick is moved back and forth, it is the shaft along the Y-axis shaft that pivots.
- When the joystick is moved from left to right or from right to left, it is the shaft along the X-axis that pivots.
However, both of these shafts pivot when you move the joystick diagonally.
Every shaft in the joystick is linked with a potentiometer. This rotates the wiper of the potentiometer corresponding to the shaft when it is moved. This means that:
- The wiper of the potentiometer will move to one end of the resistive track when the knob is pushed all the way forward.
- When you pull the knob all the way back, on the other hand, the wiper of the potentiometer will move to the other end.
The position of the knob is eventually determined by the reading of the potentiometers.
- It allows fast interactions during gaming.
- It has a simple design.
- It offers more effective and flexible control.
- It is relatively inexpensive.
- It is more intuitive.
- It is not easy to select options from the screen.
- The direction and extent of movements may be limited.
- Lateral or diagonal movements are usually not allowed.
- It is not as sturdy as other input devices.
- It is not compatible with most computer systems.
- The buttons may get stuck if used for a long time.
- Prolonged use may result in hand injuries, such as carpal tunnel syndrome, due to repetitive stress.
- It supports a limited genre of games.
What is a Joystick Used for?
A joystick is used for precise and direct pointing at an object and also to perform specific functions.
It is quite useful for people with movement disabilities since it allows moving and controlling an object more easily and appropriately.
What Sensor is Used in a Joystick?
Ideally, there are two potentiometers in a joystick that read the input from the user.
One of these sensors reads the analog output voltage when the stick is moved sideways, and the other reads it for movement along the Y-axis.
These sensors are connected to the unit via +VCC and ground to transfer the signals.
The joystick is a very useful input device, especially for gaming purposes, and has been around for quite a long time now.
It allows controlling movements of objects with accurate stability.
The design, the hardware, and the pinout all add to its operation and allow customization for varied uses and more precise control.