KY-040 Pre-Soldered Rotary Encoder Module for Arduino with Demo Code

SKU AB024

$6.99 USD Shipping & tax calculated at checkout
In stock· Order by 3pm ET and it ships today

KY-040 rotary encoder module detects knob rotation direction, step count, and push-button input via quadrature digital GPIO for Arduino, ESP32, Raspberry Pi, robotics, home automation, and prototyping.

  • Free Ground Shipping U.S. orders $35+
  • Ships from USA Domestic fulfillment
  • 30-day returns Free defect replacement
  • 7-day support Fast email replies
Frequently bought together
KY-040 rotary encoder module with pins and labeled connections for Arduino projects KY-040 Pre-Soldered Rotary Encoder Module for Arduino with Demo CodeNo reviews yet $6.99 This item
Total for 4 items
$23.47

Products related to this item

Product Overview

KY-040 rotary encoder module is an incremental rotary input sensor for Arduino that lets your project detect knob rotation direction, step count, and push-button presses for user interfaces, menu navigation, volume control, and parameter tuning. Based on the popular KY-040 design, it outputs standard quadrature signals and a switch signal that can be read by Arduino, ESP32, Raspberry Pi, and other microcontroller platforms using digital GPIO. Ideal for robotics, home automation panels, test equipment, and prototyping, this encoder module includes demo code to speed up wiring, reading pulses, and adding precise manual control to embedded projects. The header pins ship pre-soldered, so it works out of the box with no soldering required.

Frequently asked questions

Yes. The module outputs digital quadrature rotation signals plus a push-button switch signal, so Arduino, ESP32, Raspberry Pi, and similar microcontrollers can read it through GPIO pins with suitable code.
The header pins are pre-soldered, so no soldering is required before breadboard or jumper-wire use. It also includes demo code to help you wire the module, read pulses, and detect button presses.
It provides standard quadrature outputs for rotation direction and step counting, plus a separate switch output for the shaft push button. These are read as digital GPIO signals by the connected controller.
Yes. It is intended for manual input tasks such as menu navigation, volume control, parameter tuning, and control panels. Your code can use rotation direction, counted steps, and button presses to change settings.
Skipping or double-counting is usually caused by wiring errors, missed pulses in code, or mechanical switch bounce. Check the GPIO connections and common ground, then use encoder-reading code that handles quadrature state changes and debounce.

Have other questions?

Chat with our US-based team — we usually reply fast.

Features & Specs

KY-040 EncoderKY-040 incremental rotary encoder detects rotation direction, step count, and push-button input.

GPIO InterfaceOutputs standard quadrature signals plus a switch signal for reading on digital GPIO pins.

Platform CompatibilityCompatible with Arduino, ESP32, Raspberry Pi, and other microcontroller platforms.

User Input ControlSupports menu navigation, volume control, parameter tuning, and other manual input functions.

Project Use CasesSuitable for robotics, home automation panels, test equipment, and embedded prototyping.

Demo Code IncludedIncludes demo code to speed up wiring, pulse reading, and Arduino integration.

Documents

Full Product Manual KY-040 Rotary Encoder Module for Arduino with Demo Code | ShillehTek Product Manual In-depth setup guide with wiring, code examples, and troubleshooting.

Related Tutorials

Related Videos

Customer Reviews