Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Joystick: Examples, Pinouts, and Specs

Image of Joystick
Cirkit Designer LogoDesign with Joystick in Cirkit Designer

Introduction

The AZDelivery Joystick (Part ID: Joystick) is an input device designed for precise control in applications such as video games, robotics, and computer graphics. It features a pivoting stick that allows users to report directional input and button presses to the connected system. This versatile component is widely used in projects requiring analog and digital input, making it a popular choice for hobbyists and professionals alike.

Explore Projects Built with Joystick

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino Nano Joystick-Controlled Bluetooth Module with Battery Power
Image of padelpro transmitter: A project utilizing Joystick in a practical application
This circuit is a wireless joystick controller that uses an Arduino Nano to read analog signals from a KY-023 Dual Axis Joystick Module and transmits the data via an HC-05 Bluetooth Module. The system is powered by a 18650 Li-Ion battery with a rocker switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Based Analog Joystick Interface
Image of PILAPIL_JOYSTICK: A project utilizing Joystick in a practical application
This circuit consists of an Arduino UNO microcontroller connected to an analog joystick. The joystick's vertical and horizontal movements are read by the Arduino through analog pins A0 and A1, respectively. The microcontroller is programmed to read these analog values and output the joystick's position to the serial monitor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO-Based Analog Joystick Interface
Image of Joystick: A project utilizing Joystick in a practical application
This circuit consists of an Arduino UNO microcontroller connected to an analog joystick. The joystick's vertical and horizontal movements are read by the Arduino's analog pins A0 and A1, respectively. The embedded code on the Arduino reads these analog values and outputs the joystick's position to the serial monitor.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32 Bluetooth-Controlled Dual Joystick Motor Driver System
Image of sumo: A project utilizing Joystick in a practical application
This circuit is a remote-controlled motor system using two ESP32 microcontrollers and joystick modules. One ESP32 reads joystick positions and transmits them via Bluetooth to the second ESP32, which controls two DC motors through a TB6612FNG motor driver. The system includes LEDs for status indication and is powered by a 9V battery and a LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Joystick

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of padelpro transmitter: A project utilizing Joystick in a practical application
Arduino Nano Joystick-Controlled Bluetooth Module with Battery Power
This circuit is a wireless joystick controller that uses an Arduino Nano to read analog signals from a KY-023 Dual Axis Joystick Module and transmits the data via an HC-05 Bluetooth Module. The system is powered by a 18650 Li-Ion battery with a rocker switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of PILAPIL_JOYSTICK: A project utilizing Joystick in a practical application
Arduino UNO Based Analog Joystick Interface
This circuit consists of an Arduino UNO microcontroller connected to an analog joystick. The joystick's vertical and horizontal movements are read by the Arduino through analog pins A0 and A1, respectively. The microcontroller is programmed to read these analog values and output the joystick's position to the serial monitor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Joystick: A project utilizing Joystick in a practical application
Arduino UNO-Based Analog Joystick Interface
This circuit consists of an Arduino UNO microcontroller connected to an analog joystick. The joystick's vertical and horizontal movements are read by the Arduino's analog pins A0 and A1, respectively. The embedded code on the Arduino reads these analog values and outputs the joystick's position to the serial monitor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of sumo: A project utilizing Joystick in a practical application
ESP32 Bluetooth-Controlled Dual Joystick Motor Driver System
This circuit is a remote-controlled motor system using two ESP32 microcontrollers and joystick modules. One ESP32 reads joystick positions and transmits them via Bluetooth to the second ESP32, which controls two DC motors through a TB6612FNG motor driver. The system includes LEDs for status indication and is powered by a 9V battery and a LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Game controllers and arcade systems
  • Robotics and remote-controlled vehicles
  • Computer-aided design (CAD) systems
  • DIY electronics projects
  • Interactive art installations

Technical Specifications

The AZDelivery Joystick is a dual-axis analog joystick with a built-in push-button. It provides two potentiometers for X and Y axis control and a digital switch for the button press.

Key Technical Details

  • Operating Voltage: 3.3V to 5V
  • Output Type: Analog (X and Y axes), Digital (button)
  • X and Y Axis Range: 0V to Vcc (typically 0V to 5V)
  • Button Type: Momentary push-button
  • Dimensions: 40mm x 26mm x 32mm (approx.)
  • Mounting: PCB with soldered pins

Pin Configuration and Descriptions

The joystick has a total of 5 pins. Below is the pinout and description:

Pin Name Type Description
1 GND Power Ground connection for the joystick
2 +5V Power Power supply (3.3V to 5V)
3 VRx Analog Output Voltage output for the X-axis (0V to Vcc)
4 VRy Analog Output Voltage output for the Y-axis (0V to Vcc)
5 SW Digital Output Digital signal for the push-button (LOW when pressed)

Usage Instructions

How to Use the Joystick in a Circuit

  1. Connect Power:
    • Connect the +5V pin to the 5V output of your microcontroller (e.g., Arduino UNO).
    • Connect the GND pin to the ground of your microcontroller.
  2. Connect the Axes:
    • Connect the VRx pin to an analog input pin on your microcontroller (e.g., A0 on Arduino UNO).
    • Connect the VRy pin to another analog input pin (e.g., A1 on Arduino UNO).
  3. Connect the Button:
    • Connect the SW pin to a digital input pin on your microcontroller (e.g., D2 on Arduino UNO).
    • Use a pull-up resistor if necessary, as the button outputs LOW when pressed.

Important Considerations and Best Practices

  • Ensure the joystick is powered within its operating voltage range (3.3V to 5V).
  • Use analog pins on your microcontroller to read the X and Y axis values.
  • Debounce the button input in software to avoid false triggers.
  • Avoid applying excessive force to the joystick to prevent damage.

Example Code for Arduino UNO

Below is an example Arduino sketch to read the joystick's X and Y axes and detect button presses:

// Define pin connections
const int VRxPin = A0; // X-axis connected to analog pin A0
const int VRyPin = A1; // Y-axis connected to analog pin A1
const int SWPin = 2;   // Button connected to digital pin 2

void setup() {
  // Initialize serial communication for debugging
  Serial.begin(9600);

  // Configure the button pin as input with internal pull-up resistor
  pinMode(SWPin, INPUT_PULLUP);
}

void loop() {
  // Read the X and Y axis values (0 to 1023)
  int xValue = analogRead(VRxPin);
  int yValue = analogRead(VRyPin);

  // Read the button state (LOW when pressed)
  bool buttonPressed = (digitalRead(SWPin) == LOW);

  // Print the joystick values to the Serial Monitor
  Serial.print("X: ");
  Serial.print(xValue);
  Serial.print(" | Y: ");
  Serial.print(yValue);
  Serial.print(" | Button: ");
  Serial.println(buttonPressed ? "Pressed" : "Released");

  // Add a small delay for stability
  delay(100);
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output from the Joystick:

    • Ensure the joystick is properly powered (check the +5V and GND connections).
    • Verify that the pins are securely connected to the microcontroller.
  2. Incorrect or Erratic Axis Readings:

    • Check for loose or faulty connections on the VRx and VRy pins.
    • Ensure the joystick is not damaged or worn out.
  3. Button Not Responding:

    • Verify the SW pin connection and ensure it is configured as an input.
    • Use a pull-up resistor if the button state is not being detected correctly.
  4. Joystick Values Not Centered:

    • The joystick may not return perfectly centered values when released.
    • Use software calibration to adjust for any offset.

FAQs

Q: Can I use the joystick with a 3.3V microcontroller?
A: Yes, the joystick operates within a voltage range of 3.3V to 5V, making it compatible with 3.3V systems like ESP32 or Raspberry Pi.

Q: How do I calibrate the joystick?
A: Read the X and Y axis values when the joystick is in its neutral position. Use these values as the center point in your software.

Q: Can I use the joystick for PWM control?
A: Yes, you can map the analog output values from the joystick to control PWM signals for applications like motor speed control.

Q: Is the joystick suitable for outdoor use?
A: The joystick is not weatherproof. For outdoor applications, consider using a protective enclosure.