

The Mini Analog Thumbstick by PiHut is a compact joystick designed for precise two-dimensional input. It is commonly used in gaming controllers, robotics, and other interactive devices where smooth and accurate control of movement is required. The thumbstick features two potentiometers for X and Y-axis control and a tactile push-button for additional input functionality. Its small size and versatility make it ideal for DIY electronics projects and prototyping.








The Mini Analog Thumbstick has the following key specifications:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V - 5V |
| X-Axis Resistance | 10 kΩ (Potentiometer) |
| Y-Axis Resistance | 10 kΩ (Potentiometer) |
| Push-Button Type | Momentary tactile switch |
| Dimensions | 26mm x 26mm x 20mm |
| Mounting Type | PCB through-hole |
The Mini Analog Thumbstick has 5 pins, as described in the table below:
| Pin | Name | Description |
|---|---|---|
| 1 | GND | Ground connection for the thumbstick. |
| 2 | VCC | Power supply input (3.3V or 5V). |
| 3 | VRx | Analog output for the X-axis (horizontal movement). |
| 4 | VRy | Analog output for the Y-axis (vertical movement). |
| 5 | SW | Digital output for the push-button (active LOW when pressed, HIGH when released). |
To use the Mini Analog Thumbstick in a circuit, follow these steps:
VCC pin to a 3.3V or 5V power source and the GND pin to ground.VRx and VRy pins to the analog input pins of your microcontroller (e.g., Arduino).SW pin to a digital input pin of your microcontroller. Use a pull-up resistor if necessary.Below is an example of how to connect the Mini Analog Thumbstick to an Arduino UNO:
| Thumbstick Pin | Arduino Pin |
|---|---|
| GND | GND |
| VCC | 5V |
| VRx | A0 |
| VRy | A1 |
| SW | D2 |
The following Arduino sketch reads the X and Y-axis values and detects button presses:
// Pin definitions
const int VRxPin = A0; // X-axis analog input
const int VRyPin = A1; // Y-axis analog input
const int SWPin = 2; // Push-button digital input
void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);
// Configure the push-button pin as input with pull-up resistor
pinMode(SWPin, INPUT_PULLUP);
}
void loop() {
// Read the X and Y-axis values (0-1023)
int xValue = analogRead(VRxPin);
int yValue = analogRead(VRyPin);
// Read the push-button state (LOW when pressed, HIGH when released)
int buttonState = digitalRead(SWPin);
// Print the values to the Serial Monitor
Serial.print("X: ");
Serial.print(xValue);
Serial.print(" | Y: ");
Serial.print(yValue);
Serial.print(" | Button: ");
Serial.println(buttonState == LOW ? "Pressed" : "Released");
// Add a small delay for stability
delay(100);
}
No Output from VRx or VRy Pins
VCC and GND pins are properly connected.Push-Button Not Detected
INPUT_PULLUP mode in your microcontroller or add an external pull-up resistor.Inconsistent Analog Readings
Q: Can I use the thumbstick with a Raspberry Pi?
A: Yes, the thumbstick can be used with a Raspberry Pi. Connect the analog outputs to an ADC (Analog-to-Digital Converter) module, as the Raspberry Pi lacks built-in analog input pins.
Q: What is the default position value for VRx and VRy?
A: When the thumbstick is in its neutral position, the VRx and VRy outputs typically read around half the supply voltage (e.g., ~512 for a 5V system).
Q: Is the push-button active HIGH or active LOW?
A: The push-button is active LOW, meaning it outputs LOW (0V) when pressed and HIGH (VCC) when released.