We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 8
F-Delivery
Joystick
ModulFy-Delivery scan
Contents:
1. Description
2. Specifications
3. Pin Configuration
4. Schematic Diagram
5. Wiring Diagram
6. Sample Sketch
7. How to test
8. Testing results
Joystick ModulA,-Delivery Joystick
Modul
1. Description
Lots of robotic projects need a joystick. This module offers an affordable solution to
that. The Joystick module is similar to analog joysticks found in gamepads. It is made
by mounting two potentiometers at a 90 degrees angle. The potentiometers are
connected to a short stick centered by springs.
This module produces an output of around 2.5V from X and Y when it isin resting
position, Moving the joystick will cause the output to vary from Ov to 5V depending
onits direction. If you connect this module to a microcontroller, you can expect to
read a value of around 512 in its resting position (expect small variations due to tiny
imprecisions of the springs and mechanism) When you move the joystick you should
see the values change from 0 to 1023 depending onits position.
2. Specifications
+ Directional movements are simply two potentiometers - one for each axis
+ Compatible with Arduino interface
+ The biaxial XY Joystick Module KY-023 applies ARDUINO
+ Dimensions: 1.57 in x 1.02 in x L26 in (4.0 cm x 2.6 cm x 3.2. cm)
+5Pin
+ Color: Black
3. Pin Configuration
1. GND: ground
2.45V:5VDC
3. VRx: voltage proportional to x position
4, VRy: voltage proportional to y position
5. SW: switch pushbutton
Joystick Modul Page 3.A-Delivery
Joystick
Modul
4. Schematic Diagram
5V input
i
5. Wiring Diagram
Joystick ModulA,-Deli Ver Joystick
Ur Mikroelekiro} Modul
6. Sample Sketch
const int SW_pin
const int Xpin =
const int Y_pin =
void setup {
pinMode(Sw_pin, INPUT);
digitalwrite(sw_pin, HIGH);
Serial .begin(9600) ;
void loop) {
serial.print("x: ");
Serial :printCanalogRead(x_pin));
Serial.print¢”
serial. BrintCanaloggead(y_pin));
Serial.print(”
Serial. printin(digitalRead(sw_| pin));
1 delay(250);
7. How to test
The components to be used are:
Microcontroller (any compatible arduino)
Joystick module
1Pin M-M connectors
Breadboard
USB cable
1 Connect the components based on the figure shown in the wiring diagram using a
M-M pin connector. +5V pins connected to the SV power supply, GND pinis
conected to the GND, the VRx and VRy pins are connected to the analog input pins
and the SW pinis connected to the digital I/O pin. Pin number will be based on the
actual program code.
2. After hardware connection, insert the sample sketch into the Arduino IDE.
3. Using a USB cable, connect the ports from the microcontroller to the computer.
4, Upload the program.
5. See the results in the serial monitor.
Joystick Modul Page 5.F7-Delivery Joystick
Inv Experte fOr Mikrogtekironik! Modul
8. Testing results
The serial monitor displays the X, Y and Z positions based on the position of
the stick.
Joystick ModulF-Delivery Joystick
Experte fur Mikroelekironik! Modul
When the stick was moved downward:
When the stick was moved upward:
Joystick Modul Page7.Fy-Delivery Joystick
Modul
When the stick was moved to the left:
nicest Fetes al|[roted —]
When the stick was moved to the right:
Joystick Modul Page 8.