KY-040 Rotary Encoder Module with Push Button 20 Pulse/Revolution 5V for Arduino Menu Control Volume Motor Position
SPECIFICATIONS
Brand Name: NONE
Choice: yes
Condition: New
High-concerned chemical: none
Origin: Mainland China
Type: Voltage Regulator
π Precise Digital Control at Your Fingertips!
Upgrade from simple potentiometers to high-precision digital rotary encoders! The KY-040 module combines 360Β° infinite rotation with a push-button function, delivering 20 pulses per revolution. Itβs the perfect choice for menu navigation, parameter adjustment, and motor control in Arduino, Raspberry Pi, and other microcontroller projects
β¨ Key Features & Benefits
Infinite Rotation & Extended Lifespan: No physical stops allow continuous 360Β° rotation, eliminating mechanical wear and ensuring a much longer life than standard potentiometers.
High Precision & Bidirectional Detection: 20 clear pulses per revolution enable accurate detection of both rotation amount and direction (clockwise/counterclockwise) for fine-grained control.
Integrated Push-Button Function: The shaft can be pressed as a digital switch, combining rotation and click actions in one component to simplify UI design for selection confirmation or reset.
Plug-and-Play Integration: The module includes built-in pull-up resistors and debounce capacitors for clean digital signals. Simply connect the CLK, DT, and SW pins to your microcontrollerβs digital pins for quick setup.
π Product Description
The KY-040 Rotary Encoder Module elevates your projects from analog to precise digital control. Ideal for volume adjustment, menu selection, motor positioning, parameter setting, and various interactive applications, itβs a must-have for makers, electronics enthusiasts, and educational experiments.
β οΈ Important Notes / How to Use (Key to Preventing Negative Reviews!)
Voltage Compatibility Warning: This module is designed for 5V operation. Do NOT connect directly to 3.3V systems (e.g., ESP32, ESP8266) to avoid damaging GPIO pins! Use a logic level converter if interfacing with 3.3V devices.
Signal Decoding Required: Outputs quadrature encoder signals (CLK/DT). You must use a library or custom code to decode direction and pulse countβit does NOT output an analog value or absolute position directly.
Software Debouncing Essential: Although basic hardware debouncing is included, mechanical encoders inherently have contact bounce. Implement a software debounce algorithm in your code for reliable readings.
No Memory Function: This is an incremental encoder. It does NOT retain position after power loss. You must implement pulse counting and storage in your code if position memory is needed.
π Specifications
Model: KY-040
Operating Voltage: 5V DC
Resolution: 20 Pulses Per Revolution (20 PPR)
Rotation: 360Β°, Infinite
Built-in Switch: Push Button (press the shaft)
Output Signals: CLK (Clock), DT (Data), SW (Switch)
Interface: 5-pin (GND, +, SW, DT, CLK)
Module Size: 31Γ19Γ29mm
π¦ Package Includes
1 Γ KY-040 Rotary Encoder Module
1 Γ Knob Cap





- Standard Shipping: Standard Shipping (12β18 Business Days)
- Express Shipping: Expedited Shipping (5β9 Business Days)
- Free Shipping: Orders over $199 qualify automatically
- Tracking: Full tracking number provided for all orders
- Returns: 30-day hassle-free return window
- Condition: Items must be unused and in original packaging
- Refund: Full refund processed within 3-5 business days
- Factory Direct: ISO/TS 16949 certified manufacturer
- Quality: 100% electrical continuity tested before shipment
- Experience: 15+ years in automotive connector industry
- Support: Professional technical support available
You may also like
Blog posts
Title
Subscribe to our emails
Be the first to know about new collections and special offers.