About this item
๐ KY-040 Rotary Encoder Module
๐ก Incremental Encoder with Button Switch
The KY-040 is a compact, mechanical rotary encoder with a built-in push-button switch. It detects direction and step count of rotation and is ideal for adjusting values, navigating menus, or building interactive interfaces in embedded systems.
๐ก๏ธ Mechanical Reliability
- ๐ Rotates 360ยฐ continuously
- ๐ Integrated push-button (press the shaft)
- ๐งฒ Tactile feedback with 20 detents
- ๐ Standard 5-pin header (GND, +, SW, DT, CLK)
๐ฆ Compact & Versatile
With its small footprint, low power requirements, and compatibility with 3.3V and 5V systems, itโs a popular input device in DIY and prototyping projects.
๐ ๏ธ Applications
- ๐๏ธ Volume or menu controls
- ๐ค Arduino / ESP32 / Raspberry Pi user interfaces
- ๐น๏ธ DIY control knobs or game controllers
- ๐ Motor control input (step/feedback)
- ๐ Digital potentiometers
- ๐งฎ Rotary position tracking
โ ๏ธ Notes
- ๐งท Debouncing (hardware/software) may be needed for clean signals
- โฑ๏ธ Works best with interrupts for high-speed detection
- ๐ Outputs digital pulses, not analog values
- ๐ Can rotate infinitely in either direction
โจ Key Features
- ๐ Steps per revolution: 20 (mechanical detents)
- ๐ Operating voltage: 3.3Vโ5V
- ๐ฆ 5-pin interface: Easy jumper wire connection
- ๐ Encoder type: Incremental (quadrature output)
- ๐ Built-in switch: Momentary press on shaft
๐ Useful Links