KY-023 Joystick

A KY-023 two-axis analog thumb joystick with a push button, built from two potentiometers for X and Y control.

KY-023 Joystick: Two-axis analog input

What is the KY-023 Joystick?

The KY-023 is an analog thumb joystick like the ones on game controllers. Under the stick are two potentiometers, one for the X axis and one for the Y axis, plus a momentary push switch you activate by pressing straight down. It gives smooth, proportional two-axis control rather than just on and off.

It has five pins: VCC, GND, an X output, a Y output, and the switch (SW). Each axis outputs an analog voltage that swings from near ground to near the supply as you move the stick, sitting at roughly half the supply voltage when centered. A microcontroller reads X and Y on its analog inputs.

The board runs from about 3.3 to 5 V. The push switch is a simple button to ground, so it needs a pull-up like any momentary switch. Because the outputs are ratiometric, the centered value tracks whatever supply voltage you use.

KY-023 Joystick pinout

PinFunctionType
SW SW (Button)Digital push buttonDigital output
Y YAnalog Y-positionDigital output
X XAnalog X-positionDigital output
VCC +VPowerPower in
GND GNDPowerPower in

Specifications

Operating voltage
3.3 V (max 5 V)
Interface
analog
Dimensions
34 × 26 × 39 mm

Verified from the Tinkered component library · Joy-IT.

Circuit requirements

  • Power VCC from 3.3 to 5 V and share a common ground. Read the X and Y pins on analog-to-digital inputs and connect SW to a digital input.
  • Enable a pull-up on the SW pin. It is an open switch to ground and floats without one.
  • Expect the centered reading to be near the middle of the ADC range, not an exact value. Calibrate the center and add a small dead zone in software so a resting stick does not drift.
  • Match the supply to the ADC reference. Reading a 5 V-powered joystick with a 3.3 V ADC clips the top of each axis, so power it from the same rail as the ADC reference where possible.

Board compatibility

The KY-023 Joystick connects to any of the microcontrollers supported in Tinkered. Mind the 3.3 V logic level on 3.3 V boards.

Common KY-023 Joystick mistakes

Expecting an exact center value

The mechanical center rarely lands on a perfect midpoint, and it wanders slightly. Calibrate the resting value and apply a dead zone, or the project will react to a stick that is not being touched.

No pull-up on the button

The SW pin is a switch to ground. Without a pull-up it floats and reports random button presses. Enable the internal pull-up and read it as active low.

Supply and ADC reference mismatch

Because the outputs are ratiometric, powering the joystick at 5 V but reading with a 3.3 V ADC clips each axis near the top. Keep the joystick supply and the ADC reference on the same rail.

Reading the axes as digital

X and Y are analog. Reading them on a digital pin throws away the proportional position and only sees fully pushed versus centered.

KY-023 Joystick datasheet

Official KY-023 Joystick datasheetJoy-IT

Popular KY-023 Joystick projects

Robot or rover driving

Map X and Y to motor speed and steering for smooth remote driving.

Pan and tilt camera control

Drive two servos from the axes to aim a camera or sensor, with the button to recenter.

Game controller input

Use the two axes and button as a paddle or D-pad for simple Arduino games.

Menu and cursor navigation

Move a cursor or step through options on a display, clicking the stick to select.

Build with the KY-023 Joystick.

Drop the KY-023 Joystick into a circuit, write firmware, and simulate it in your browser, then deploy to real hardware. All in one editable Tinkered project.