PS2-Style Analog Joystick Module
Two-axis analog input for controllers and pan-tilt rigs.
The PS2-style analog joystick module is a two-axis, spring-centered thumbstick built from two potentiometers — one for the X axis and one for the Y axis — plus a momentary push-button triggered by pressing straight down on the stick. It reports smooth analog positions on each axis rather than simple on/off directions, making it the standard input for robot controllers, pan-tilt camera rigs, and any project that needs proportional, joystick-style control.
Specifications
| Axes | 2-axis analog (X and Y), each driven by an independent 10kΩ potentiometer |
| Operating voltage | 3.3V–5V DC |
| Output type | Analog voltage per axis, proportional to stick position (read with analogRead()) |
| Center position output | ~half of supply voltage (e.g. ~2.5V at 5V supply) when stick is at rest |
| Push-button | Momentary switch (SW pin), activated by pressing the stick down, active LOW |
| Interface | 2 analog pins (VRx, VRy) + 1 digital pin (SW) |
| Mechanical travel | Spring-loaded, self-centering in both axes |
Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | GND | Ground |
| 2 | +5V | Power, 3.3–5V DC |
| 3 | VRx | X-axis analog output — connect to an analog input pin |
| 4 | VRy | Y-axis analog output — connect to an analog input pin |
| 5 | SW | Push-button output, active LOW — connect to a digital input pin with pull-up enabled |
Each axis needs its own analogRead()-capable pin, and the SW button pin should be configured with INPUT_PULLUP since it pulls to GND when pressed. On 3.3V boards like the ESP32, the module still works fine at 3.3V supply, though the analog center-point and range will scale down accordingly.
Variants
The standard PS2-style breakout is the default choice for robot and pan-tilt control thanks to its low price and universal library support. Choose a rotary encoder instead if the project only needs discrete steps (like a menu selector) rather than smooth proportional input.
| Variant | Temp range | Hum range | Accuracy | Protocol | Price |
|---|---|---|---|---|---|
| PS2-style analog joystick (breakout) | ~$1-3 | ||||
| Rotary encoder | ~$0.50-2 | ||||
| Thumb joystick + shield (for game controllers) | ~$2-5 |