Joystick Module

2-axis analog outputs based on position of joystick Description The Joystick Module provides 2-Axis analog outputs based...
Vendor: Keszoox
$1.59
$2.59
$1.59

Shipping

The shipping fee depends on your address

Standard: 9-15 business days,fee is down to $3.99

Express: 4-7 business days,fee is down to $5.99

Support Customization

WE'RE READY TO BUILD A CUSTOM PRODUCT FOR YOU.

If you're looking for a custom product, we can help. Kindly contact us via email support@keszoox.com and send us the details for your need, then we'll let you know how we can deliver the right solution.

Built And process your order

We make into production usually Within 1 - 3 Bussiness Days.

Expect customization orders.
Joystick Module

Joystick Module

$2.59 $1.59

Joystick Module

$2.59 $1.59

2-axis analog outputs based on position of joystick

Description

The Joystick Module provides 2-Axis analog outputs based on the X/Y position of the joystick as well as a pushbutton activation when the joystick is pressed.

PACKAGE INCLUDES:

  • Joystick Module w/ snap-on cap

KEY FEATURES OF JOYSTICK MODULE:

  • 2-Axis analog outputs based on the X and Y position of the joystick
  • Pushbutton action when joystick is depressed
  • 3.3 and 5V compatible

The joystick module is a fully functional joystick similar to what is found on many game controllers and can be used for a number of different control applications such as for controlling a robotic system.

An acrylic base is also available at the bottom of the page.

Joystick Controls

The module includes two spring loaded 5K potentiometers that provide X and Y analog outputs which can be input to two analog inputs on an MCU.  There is also a push button switch output if the cap is pressed down until an audible click is heard.  The pushbutton output can be connected to any digital input pin of an MCU.

For reference, the X-Axis is motion parallel to the header pins on the module while the Y-Axis is motion perpendicular to the header pins.

The analog inputs on an MCU read values over a range of 0-1023 (for typical 10-bit ADC inputs).  The X-Axis and Y-Axis controls should read around 512 (midpoint) when the control is at rest.  As the joystick is moved, one or both of the controls will register higher or lower values depending on how the control is being moved.  When the joystick is released, it is spring-loaded and will return to center.

The switch output is grounded (LOW) when the switch is pushed.  When the switch is at rest, the output is floating, so a pull-up resistor is needed to pull the output high.  When using with an MCU, the input pin that the switch is connected to should have the built-in pull-up enabled or else an external pull-up resistor can be used.

Module Connections

There is a 5-pin header on the assembly for making connections.

1 x 5 Header 

  • GND  = Ground
  • +5V = Vcc (3.3 – 5V)
  • VRx = Analog X-Axis output.  Connects to analog input on MCU
  • VRy = Analog Y-Axis output.  Connects to analog input on MCU
  • SW = Switch Output, active LOW.  Connects to digital input on MCU

Joystick Module Test Program

/*
Joystick Module Test

Basic code for monitoring the outputs of the module. 
*/
int xPin = A1;      // Use any analog input pin to read X-Axis pot
int yPin = A0;      // Use any analog input pin to read Y-Axis pot
int buttonPin = 2;  // Use any digital input pin to monitor button

int xPosition = 0;  // Variable to hold current X-Axis reading
int yPosition = 0;  // Variable to hold current Y-Axis reading
int buttonState = 0;// Variable to hold current button state
//===============================================================================
//  Initialization
//===============================================================================
void setup() 
{ 
  Serial.begin(9600); 
  
  pinMode(xPin, INPUT);
  pinMode(yPin, INPUT);
  pinMode(buttonPin, INPUT_PULLUP);   // Enables pull-up resistor on button pin
}

//===============================================================================
//  Main
//===============================================================================
void loop() 
{
  xPosition = analogRead(xPin);         // Read the current state of all 3 controls
  yPosition = analogRead(yPin);
  buttonState = digitalRead(buttonPin);
  
  Serial.print("X: ");                  // Print current state out to Serial Monitor window
  Serial.print(xPosition);
  Serial.print(" | Y: ");
  Serial.print(yPosition);
  Serial.print(" | Button: ");
  Serial.println(buttonState);

  delay(250);    // add some delay between reads.  Using long delay to make easier to read
                 // output on screen.  This delay would be shorter to improve responsiveness in
                 // live application.
}

BEFORE THEY ARE SHIPPED, THESE MODULES ARE:

  • Sample inspected and tested per incoming shipment

Notes: 

  1. This is similar to or the same as the KY-023 module.

Technical Specifications

Operating Ratings  Vcc Range 3.3 – 5V
 Analog Outputs 0 – Vcc
Pushbutton Output Active Low
 Dimensions L x W (PCB) 40 x 22mm  (1.6 x 0.9″)

WE'RE READY TO BUILD A CUSTOM PRODUCT FOR YOU.

Contact us:
Support@keszoox.com
What we can help:
If you're looking for a wire or cable assembly, we can help.
What we need your help next:
Kindly contact us via email support@keszoox.com and send us the details fo your need, then we'll let you know how we can deliver the right solution.

Shipping Policy

All orders are dispatched from our warehouse. The shipments are fully tracked—from our door to yours. Please allow 3-5 business days for your order to be processed in addition to the shipping times below.

Shipping Times

Standard: 9-15 business days. Express: 4-7 business days.

Please note that shipping providers are extremely busy during this time, and some orders might experience a delay on top of usual delivery times. If your order is late, please allow 5-10 days more than indicated in standard shipping times before contacting our customer service. Thank you for your understanding.

Tracking

All orders are 100% tracked. You’ll receive an email with a tracking number and a link to track your parcel once your order leaves our warehouse. Please allow 24-48 hours for the tracking link to start showing shipping information.

Related Products

Recently Viewed Products