The KY-040 Rotary Encoder Brick Sensor Module is a mechanical rotary encoder that allows you to detect rotational position, direction, and speed in a digital format. Unlike traditional potentiometers, rotary encoders can be turned infinitely in either direction and do not lose position data when powered off, making them ideal for use as user input controls, volume adjustments, or menu navigation tools.
This module outputs two square wave signals (A and B channels) that allow microcontrollers to detect direction based on their phase difference. It also includes a push-button switch built into the shaft, providing additional input functionality. The KY-040 is compatible with 3.3V and 5V systems, making it ideal for use with Arduino, ESP32, Raspberry Pi, STM32, and other development boards.
The module features five easy-to-connect pins (GND, +, SW, DT, and CLK) and comes pre-mounted on a PCB with standard pin headers for effortless breadboard or jumper wire integration. Its compact form factor and mechanical robustness make it suitable for both temporary prototyping and permanent embedded applications.
Order your KY-040 Rotary Encoder Module now from eleberric.com, the trusted platform for electronics components in Sri Lanka.
Specification
-
Model: KY-040
-
Type: Incremental Rotary Encoder with push-button
-
Voltage: 3.3V–5V DC
-
Channels: 2 (CLK and DT) + 1 switch (SW)
-
Resolution: 20 pulses per revolution (PPR)
-
Shaft Type: D-shaped, 6mm diameter
-
Push Button: Normally open (momentary)
-
Output: Digital square wave (A/B phase)
-
Interface Pins: GND, + (VCC), SW (Switch), DT (Data), CLK (Clock)
-
PCB Dimensions: Approx. 32mm × 19mm
-
Mounting Holes: Yes
-
Weight: ~5g
-
Compatibility: Arduino, Raspberry Pi, STM32, ESP32, PIC, AVR
Key Features
-
Mechanical rotary encoder with endless rotation
-
2-bit quadrature output detects direction and steps
-
Built-in push-button for additional input
-
Breadboard-friendly 5-pin header
-
Compatible with 3.3V and 5V logic systems
-
Long lifespan and stable mechanical feedback
-
Simple interface for integration with microcontrollers
-
Open-source libraries available for quick development
Applications
-
Rotary volume and menu control knobs
-
Digital encoders for CNC and 3D printer interfaces
-
DIY electronics and embedded UI projects
-
Parameter tuning in robotics and automation
-
Encoder input for motor speed and position control
-
STEM educational kits and prototyping
There are no reviews yet.