ESP32 KY-023 Dual Axis Joystick Module

KY-023 Dual Axis Joystick Module image

KY-023

Protocol: Analog

Overview

The KY-023 is a dual-axis joystick module that provides analog outputs for X and Y positions, along with a digital output for a built-in push-button. It's ideal for applications requiring directional input, such as remote controls, gaming interfaces, and robotic navigation.

About KY-023 Dual Axis Joystick Module

The KY-023 Dual Axis Joystick Module is an input device that combines two potentiometers and a push-button switch, allowing for control in both the X and Y axes. Each axis corresponds to a potentiometer that outputs an analog voltage, which can be read by microcontrollers like the Arduino or ESP32. The module also features a push-button that activates when the joystick is pressed down. This joystick is commonly used in robotics, gaming, and other interactive projects.

Where to Buy

KY-023 Dual Axis Joystick Module

Starting from

$2 per unit

Amazon com
Amazon.com Ships worldwide
View Price
Amazon de
Amazon.de Ships to EU
View Price
Aliexpress
AliExpress Best value
View Price

Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.

Technical Specifications

Operating Voltage 3.3V - 5V
Output Voltage Range 0V to VCC
Dimensions 34 x 39 x 26 mm
Weight 12 g

Pinout Configuration

The VCC pin is used to supply power to the sensor, and it typically requires 3.3V or 5V (refer to the datasheet for specific voltage requirements). The GND pin is the ground connection and must be connected to the ground of your ESP32.

  • GND: Connects to ground.
  • +5V: Connects to 5V power supply.
  • VRx: Outputs analog voltage corresponding to X-axis position.
  • VRy: Outputs analog voltage corresponding to Y-axis position.
  • SW: Digital output for the push-button; active low when pressed.

Wiring with ESP32

  • GND: Connect to ESP32 GND.
  • +5V: Connect to ESP32 3.3V or 5V (ensure voltage compatibility).
  • VRx: Connect to an analog input pin on ESP32 (e.g., GPIO36).
  • VRy: Connect to another analog input pin on ESP32 (e.g., GPIO39).
  • SW: Connect to a digital input pin on ESP32 (e.g., GPIO34); configure with an internal pull-up resistor.

Troubleshooting Guide

Common Issues

❌ Joystick Not Responding

❓ Button Not Registering Presses

Debugging Tips

🔍 Serial Monitor

⚡ Voltage Checks

Code Examples

Arduino Example

C++
🔧

ESP-IDF Example

C++
🏠

ESPHome Example

YAML
🛠️

PlatformIO Example

C++
🐍

MicroPython Example

Python

Conclusion

The ESP32 KY-023 Dual Axis Joystick Module is a powerful KY-0xx module sensor that offers excellent performance and reliability. With support for multiple development platforms including Arduino, ESP-IDF, ESPHome, PlatformIO, and MicroPython, it's a versatile choice for your IoT projects.

For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.

Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.