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

How to Use Joystick Module V2: Examples, Pinouts, and Specs

Image of Joystick Module V2
Cirkit Designer LogoDesign with Joystick Module V2 in Cirkit Designer

Introduction

The Joystick Module V2 is an analog input device commonly used in electronic projects for controlling movement in two dimensions. It operates similarly to a game controller joystick, providing X and Y axis movement data. This module is often used in robotics, gaming controls, and as an input device for various DIY projects.

Explore Projects Built with Joystick Module V2

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 Module V2 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
Wireless Joystick-Controlled Interface with Arduino Nano and NRF24L01
Image of Transmitter 11: A project utilizing Joystick Module V2 in a practical application
This circuit features an Arduino Nano interfaced with a KY-023 Dual Axis Joystick Module for analog input, and an NRF24L01 module for wireless communication. The joystick provides x and y-axis control signals to the Arduino's analog inputs and a switch signal to a digital input, while the NRF24L01 enables the Arduino to communicate with other devices wirelessly. The 2x 18650 batteries supply power to the Arduino, which in turn powers the joystick and the NRF24L01 module.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano Bluetooth-Controlled Dual Joystick Module
Image of Transmitter HC-05 Master: A project utilizing Joystick Module V2 in a practical application
This circuit features an Arduino Nano microcontroller interfaced with two joystick modules and an HC-05 Bluetooth module. The joysticks provide analog input to the Arduino, which can then transmit data wirelessly via the Bluetooth module. Power is supplied by a 9V battery, regulated through the Arduino's VIN and 5V pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32 Bluetooth-Controlled Dual Joystick Motor Driver System
Image of sumo: A project utilizing Joystick Module V2 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 Module V2

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 Module V2 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 Transmitter 11: A project utilizing Joystick Module V2 in a practical application
Wireless Joystick-Controlled Interface with Arduino Nano and NRF24L01
This circuit features an Arduino Nano interfaced with a KY-023 Dual Axis Joystick Module for analog input, and an NRF24L01 module for wireless communication. The joystick provides x and y-axis control signals to the Arduino's analog inputs and a switch signal to a digital input, while the NRF24L01 enables the Arduino to communicate with other devices wirelessly. The 2x 18650 batteries supply power to the Arduino, which in turn powers the joystick and the NRF24L01 module.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Transmitter HC-05 Master: A project utilizing Joystick Module V2 in a practical application
Arduino Nano Bluetooth-Controlled Dual Joystick Module
This circuit features an Arduino Nano microcontroller interfaced with two joystick modules and an HC-05 Bluetooth module. The joysticks provide analog input to the Arduino, which can then transmit data wirelessly via the Bluetooth module. Power is supplied by a 9V battery, regulated through the Arduino's VIN and 5V pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of sumo: A project utilizing Joystick Module V2 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

  • Robotics control interfaces
  • DIY gaming controllers
  • Cursor movement on displays
  • Educational projects to demonstrate analog input handling

Technical Specifications

Key Technical Details

  • Voltage: 3.3V to 5V
  • Current: 10mA (typical)
  • X and Y Axis Range: 0 to 1023 (analog output)
  • Dimensions: Varies by manufacturer, typically around 4cm x 2.5cm x 3.2cm

Pin Configuration and Descriptions

Pin Description
GND Ground
+5V Power supply (3.3-5V)
VRx X-axis analog output
VRy Y-axis analog output
SW Pushbutton switch

Usage Instructions

How to Use the Component in a Circuit

  1. Connect the +5V pin to the 5V output on your microcontroller (e.g., Arduino UNO).
  2. Connect the GND pin to a ground pin on your microcontroller.
  3. Connect the VRx pin to an analog input pin on your microcontroller to read the X-axis.
  4. Connect the VRy pin to another analog input pin to read the Y-axis.
  5. (Optional) Connect the SW pin to a digital input pin if you wish to use the built-in pushbutton switch.

Important Considerations and Best Practices

  • Ensure that the power supply voltage does not exceed the module's voltage rating.
  • Use pull-up resistors if necessary for the switch to ensure a stable HIGH signal when not pressed.
  • Calibrate the joystick's center position in your code to account for any offset in the resting position.
  • Debounce the switch input in software to avoid false triggering from mechanical noise.

Example Code for Arduino UNO

// Define the Arduino analog pins connected to the joystick
const int xAxisPin = A0;
const int yAxisPin = A1;
const int buttonPin = 2; // Digital pin connected to the joystick button

void setup() {
  pinMode(buttonPin, INPUT_PULLUP); // Set the button as an input with internal pull-up
  Serial.begin(9600); // Start serial communication at 9600 baud
}

void loop() {
  // Read the joystick position values
  int xPosition = analogRead(xAxisPin);
  int yPosition = analogRead(yAxisPin);
  // Read the button state (LOW when pressed due to pull-up resistor)
  bool buttonState = !digitalRead(buttonPin);

  // Print the X and Y positions and button state to the serial monitor
  Serial.print("X: ");
  Serial.print(xPosition);
  Serial.print(" Y: ");
  Serial.print(yPosition);
  Serial.print(" Button: ");
  Serial.println(buttonState ? "Pressed" : "Released");

  delay(100); // Add a small delay to make the output readable
}

Troubleshooting and FAQs

Common Issues Users Might Face

  • Inaccurate Readings: If the joystick is giving inaccurate readings, check for proper power supply and wiring. Also, ensure that the analog pins are correctly declared in your code.
  • Button Not Responding: If the button is not responding, ensure that it is wired correctly with a pull-up resistor, and the digital pin is set up properly in the code.
  • Drifting Values: If the joystick values drift, it may need recalibration in the software or there might be an issue with the module itself.

Solutions and Tips for Troubleshooting

  • Double-check all connections and ensure they are secure.
  • Use the analogReference() function in Arduino if you need to adjust the reference voltage for the analog inputs.
  • Implement software debouncing for the button to prevent false triggers.
  • Replace the joystick module if it appears to be faulty or damaged.

FAQs

Q: Can I use this joystick with a 3.3V system? A: Yes, the joystick can typically operate at 3.3V, but the analog range will be reduced.

Q: How can I increase the precision of the joystick readings? A: You can increase the precision by using the full range of the analog input and implementing software filtering or averaging.

Q: Is it possible to use the joystick without the button? A: Yes, the button is optional and does not need to be connected for the joystick to function.