Dual Axis XY Joystick Module
This is a high-quality Dual Axis XY Joystick Module. Dual Axis XY Joystick Module can be used to sense movements in 2 directions(axes). It also has an inbuilt switch which can be activated by pressing the stick. Directional movements are simply two potentiometers – one for each axis. Pots are ~10k each.
With the help of this Joystick Module, you can measure position coordinates on the X and Y axis by moving the “hat”. It also contains a switch that is pressable by pushing the “hat”.It also contains a switch that is pressable by pushing the “hat” down. Similar to the XBOX controller.
The X and Y axes are two 10k potentiometers that control 2D movement by generating analog signals. When the module is in working mode, it will output two analog values, representing two directions. This module uses the 5V power supply, and the value, when reading through analog input, would be about 2.5V, a value will increase with joystick movement and will go up till a maximum of 5V; the value will decrease when the joystick is moved in other direction till 0V.
Using a dual-axis joystick module is a simple and effective way to introduce analog control into your electronics projects. These modules feature two potentiometers, one for each axis (X and Y), and often include a digital button as well. Here’s a brief guide on how to use a dual-axis joystick module:
**1. Connections of Dual Axis XY Joystick Module:
- Connect the VCC pin to a 5V or 3.3V power source, depending on the module’s voltage requirements.
- Connect the GND pin to ground (GND) on your microcontroller or development board.
- Attach the VRx (X-axis) and VRy (Y-axis) pins to two separate analog input pins on your microcontroller (e.g., A0 and A1 for Arduino).
- If your module includes a digital button, connect its SW pin to a digital input pin (e.g., D2 for Arduino) and ensure you enable the internal pull-up resistor in your code.
**2. Code for Dual Axis XY Joystick Module:
- Write code for your microcontroller to read analog values from the VRx and VRy pins. These values typically range from 0 to 1023 for a 10-bit ADC.
- If your module has a button, include code to read its digital state (HIGH or LOW).
- You can use these values to control various aspects of your project, such as servos, motors, or LEDs. For example, you might use the X-axis for left-right movement and the Y-axis for up-down control.
**3. Calibration (Optional) of Dual Axis XY Joystick Module:
- Depending on your application, you might need to calibrate the joystick’s output values to match your project’s requirements. This calibration ensures that the joystick’s neutral position corresponds to the midpoint of the analog readings.
**4. Testing of Dual Axis XY Joystick Module:
- Upload your code to the microcontroller, open the serial monitor (if applicable), and monitor the analog values as you move the joystick. Verify that the values change smoothly and correspond to the joystick’s movement.
- Test the button to ensure it registers and presses correctly.
**5. Integration of Dual Axis XY Joystick Module:
- Once you have successfully read the joystick’s analog values, integrate them into your project’s logic to control the desired functions.
- You can use conditional statements to determine the direction and magnitude of movement and trigger actions accordingly.
In summary, using a dual-axis joystick module involves straightforward connections, reading analog values in your code, and integrating those values to control components or actions in your project. These modules are versatile and suitable for various applications, from robotics to gaming interfaces. With the analog control offered by the joystick, you can enhance the interactivity and functionality of your projects.
Specifications of Dual Axis XY Joystick Module:-
- Dimensions: 40 x 27 x 15 (LxWxH) mm
- Weight: 10gm (without Hat).
- 2.54mm pin interface leads
- Operating Voltage: 5V.
- Long service life and stable performance
- Standard interface and electronic building blocks
- Cross rocker as a two-way 10K resistor, with the rocker in a different direction
Applications of Dual Axis XY Joystick Module:
- 1. A square wave signal generator which generates a square wave signal
- 2. To provide a signal to the stepping motor driver
- 3. Adjustable pulse generation for chip use
- 4. Produce variable pulse signal, the control-related circuit (PWM dimming, speed)
Description of Dual Axis XY Joystick Module:
Frequency is divided into three ranges:
- XXX (no decimal point): the smallest unit is 1Hz, the range 1Hz-999Hz
- XX.X (decimal point in ten): The minimum unit is 0.1Khz; the range of 0.1KHz-99.9KHz
- X.X.X.(there is three decimal point): the smallest unit is 1Khz; the range 1KHz-150KHz
Frequency Display Example:
- ”100″ indicates that the PWM output pulse of 100Hz
- ”54.1″ indicates that the PWM output pulse of 54.1KHz
- ”1.2.4.” Indicates that the PWM pulse output 124KHz
- Duty Cycle in the range:0 to 100
- Three frequencies duty cycle is the same, all the parameters are non-volatile
- Important Links
- Package Includes:
- 1 x JoyStick Module PS2 Breakout Sensor + Knob Hat
* Product Images are shown for illustrative purposes only and may differ from the actual product.
You Can Also Buy ESP32 Dev Kit V1 From Here