Robot Pi Shop

Dual-axis XY Joystick Module

$1.25

Shipping calculated at checkout.

Quantity

Dual-Axis XY Analog Joystick Module with Push Button – PS2 Style

The Dual-Axis XY Joystick Module is a PS2-style analog joystick designed for robotics, Arduino projects, remote controls, menu navigation, pan/tilt systems and other applications requiring two-axis directional input.

The module combines two 10kΩ potentiometers for X and Y position sensing with an integrated push-button switch activated by pressing the joystick downward.

It provides two analog outputs and one digital switch output, making it easy to interface with Arduino and many other microcontrollers.

Technical Specifications

  • Type: Dual-Axis Analog Joystick Module
  • Style: PS2-Style Joystick
  • Axes: X and Y
  • Potentiometers: 2 × 10kΩ
  • X-Axis Output: Analog
  • Y-Axis Output: Analog
  • Push Button: Integrated Momentary Switch
  • Outputs: 2 × Analog + 1 × Digital
  • Typical Operating Voltage: 5V DC
  • Interface: 5-Pin
  • Pin Pitch: 2.54mm
  • Auto-Centering: Yes
  • Dimensions: Approx. 40 × 26 × 32mm
  • Connector Pins: GND, VCC, VRx, VRy, SW

Dual-Axis Analog Control

Two independent 10kΩ potentiometers measure movement along the X and Y axes.

The outputs are:

  • VRx: X-Axis Analog Position
  • VRy: Y-Axis Analog Position

When powered from 5V, the analog outputs are typically around 2.5V near the center position.

Moving the joystick changes the corresponding output toward approximately 0V or 5V, depending on direction.

Actual center and endpoint voltages can vary slightly between individual joystick modules.

Integrated Push Button

In addition to X and Y movement, the joystick can be pressed downward to activate an integrated momentary switch.

The SW pin typically goes LOW when the joystick is pressed when used with a suitable pull-up.

This provides an additional digital input that can be used for:

  • Select
  • Enter
  • Fire
  • Mode Change
  • Menu Selection
  • Emergency Stop Command
  • Other User-Defined Functions

Pin Configuration

GND – Ground

VCC / +5V – Power Supply

VRx – X-Axis Analog Output

VRy – Y-Axis Analog Output

SW – Push-Button Digital Output

Arduino Connection Example

A typical Arduino UNO connection is:

VCC → 5V

GND → GND

VRx → A0

VRy → A1

SW → Digital GPIO

The X and Y positions are read using the Arduino's analog inputs, while the push button is read using a digital input.

ESP32 Compatibility

The joystick can also be used with an ESP32, but there is an important voltage consideration.

Because ESP32 GPIO and ADC inputs are designed for approximately 3.3V logic, powering the joystick potentiometers from 5V can cause the VRx and VRy outputs to approach 5V, which is too high for direct connection to an ESP32 ADC input.

For ESP32 applications, power the potentiometer section/module from 3.3V where compatible, or use appropriate voltage scaling so the analog outputs remain within the ESP32 ADC input range.

Compatible Platforms

Suitable for use with:

  • Arduino UNO
  • Arduino Nano
  • Arduino Mega 2560
  • ESP32
  • ESP8266
  • Raspberry Pi Pico
  • STM32
  • PIC
  • AVR
  • Other Microcontrollers with Analog Inputs

For a standard Raspberry Pi running Linux, an external ADC is required to read VRx and VRy because standard Raspberry Pi GPIO does not provide built-in analog inputs.

How It Works

Moving the joystick horizontally changes the resistance of the X-axis potentiometer, producing a corresponding voltage on VRx.

Moving it vertically changes the Y-axis potentiometer, producing a corresponding voltage on VRy.

The spring-loaded mechanism automatically returns the joystick toward its center position when released.

Pressing the joystick downward activates the built-in switch.

Applications

Ideal for:

  • Robot Direction Control
  • Robotic Arms
  • RC Projects
  • Pan/Tilt Camera Control
  • Servo Control
  • Motor Speed & Direction Commands
  • DIY Game Controllers
  • Menu Navigation
  • Interactive Displays
  • Arduino Projects
  • ESP32 Projects
  • Raspberry Pi Pico Projects
  • Educational Electronics
  • STEM Projects
  • DIY Control Panels

Important Notes

  • This is an analog joystick, not a digital directional pad.
  • VRx and VRy are analog voltage outputs.
  • The SW pin is a momentary push-button output.
  • The joystick automatically returns toward the center when released.
  • Center voltage is typically approximately half the supply voltage, but calibration in software is recommended.
  • Do not apply a 5V analog output directly to a 3.3V-only ADC input.
  • Standard Raspberry Pi boards require an external ADC to read the X and Y analog signals.
  • This module is inspired by the style of PS2 controller joysticks; it is not a PlayStation controller or PlayStation communication interface.

Package Includes

1 × Dual-Axis XY Analog Joystick Module with Push Button