


KY-040 Rotary Encoder Module
- Based on the Keyes KY-040 Rotary Encoder for precise rotational input detection
- Provides 360° continuous rotation with direction and position feedback
- Features an integrated push-button switch for additional user input
- Outputs 2-bit Gray code signals for reliable rotation tracking
- Compatible with Arduino, Raspberry Pi, ESP32, STM32, and other microcontrollers
- Ideal for volume controls, menu navigation, motor control, smart home, and automation projects
Product Details
KY-040 Rotary Encoder Module for Arduino, ESP32 & Raspberry Pi
The KY-040 Rotary Encoder Module is a versatile rotary input device designed for applications requiring accurate rotational position and direction detection. Based on the popular Keyes KY-040 encoder, it provides 360-degree continuous rotation along with an integrated push-button switch, making it ideal for user interface controls and embedded system projects.
The module generates a 2-bit Gray code output that allows microcontrollers to determine both the direction and amount of rotation. Common applications include volume control, menu navigation, motor speed adjustment, smart home devices, instrumentation systems, automotive electronics, digital potentiometers, and robotics projects.
🔧 Features
- 360° Continuous Rotation Encoder
- Integrated Push-Button Switch
- Direction and Position Detection
- 2-bit Gray Code Output
- Long Operational Life
- Low Contact Resistance
- Compatible with Arduino, Raspberry Pi, ESP32, STM32 and other controllers
- Suitable for User Interface and Control Applications
📋 Specifications
- Operating Voltage: 3.3V – 5V DC
- Full Rotation Angle: 360° (No Stop Point)
- Number of Pulses: 15
- Rotation Life: 30,000 ± 200 Cycles
- Contact Resistance: ≤ 100mΩ
- Insulation Resistance: ≥ 100MΩ
- Oscillation Time: < 10ms
- Working Temperature: -30°C to +80°C
- Output Type: 2-bit Gray Code
- Dimensions: 30 × 18 × 30 mm
- Weight: 10g
🔌 Pin Description
- CLK: Clock Output Signal
- DT: Data Output Signal
- SW: Push Button Switch Output
- VCC: Power Supply (3.3V–5V)
- GND: Ground
📦 Package Includes
- 1 × KY-040 Rotary Encoder Module
















