**KY-040 Rotary Encoder Module with Pushbutton Switch for Arduino & Raspberry Pi**Unlock versatile control with the KY-040 Rotary Encoder! This 360° continuous rotary input module features a built-in pushbutton, ideal for Arduino, Raspberry Pi, and ESP32 projects. Effortlessly navigate menus, adjust volume, or control motor speeds with precise, tactile response.**Key Features:**- **360° Continuous Rotation:** Enjoy unrestricted motion in both directions.- **20 Detents Per Revolution:** Experience tactile clicks every 18° for accurate input.- **Quadrature Output:** Reliable direction detection with dual-channel signals.- **Easy Integration:** Just connect with jumper wires; on-board 10kΩ pull-up resistors included.- **Compatible:** Works seamlessly with 5V and 3.3V systems.**Applications:**Perfect for menu navigation, volume control, and manual jog controls in CNC or 3D printers. **Fast Free US Shipping | Hassle-Free Returns | Responsive Customer Support**Elevate your electronic projects today!
Electronics for IoT, Prototyping & DIY
**KY-040 Rotary Encoder Module with Pushbutton Switch for Arduino & Raspberry Pi**Unlock versatile control with the KY-040 Rotary Encoder! This 360° continuous rotary input module features a built-in pushbutton, ideal for Arduino, Raspberry Pi, and ESP32 projects. Effortlessly navigate menus, adjust volume, or control motor speeds with precise, tactile response.**Key Features:**- **360° Continuous Rotation:** Enjoy unrestricted motion in both directions.- **20 Detents Per Revolution:** Experience tactile clicks every 18° for accurate input.- **Quadrature Output:** Reliable direction detection with dual-channel signals.- **Easy Integration:** Just connect with jumper wires; on-board 10kΩ pull-up resistors included.- **Compatible:** Works seamlessly with 5V and 3.3V systems.**Applications:**Perfect for menu navigation, volume control, and manual jog controls in CNC or 3D printers. **Fast Free US Shipping | Hassle-Free Returns | Responsive Customer Support**Elevate your electronic projects today! KY-040 Rotary Encoder Module with Pushbutton Switch for Arduino, Raspberry Pi, ESP32
The KY-040 Rotary Encoder Module is a continuous 360° rotary input device with a built-in pushbutton switch. It outputs digital quadrature signals that let your microcontroller detect both the direction and amount of rotation -- perfect for menu navigation, volume controls, and motor speed adjustment. On-board 10kΩ pull-up resistors on all signal lines mean you can connect directly to your Arduino with just jumper wires.
⚡ Key Features
- Continuous 360° Rotation -- No mechanical stops; spins freely in both directions
- 20 Detents Per Revolution -- Tactile clicks at every 18° for precise step-by-step input
- Quadrature Output (CLK + DT) -- Two-channel digital output for reliable direction detection
- Built-in Pushbutton Switch -- Press the shaft to activate a normally-open momentary switch (active LOW)
- On-Board Pull-Up Resistors -- 10kΩ pull-ups on CLK, DT, and SW lines -- no external resistors needed
- 5V and 3.3V Compatible -- Works with Arduino, Raspberry Pi, ESP32, STM32, and more
- Simple 5-Pin Interface -- CLK, DT, SW, +, GND -- connect with standard jumper wires
🔧 How It Works
- The encoder contains two internal switches that connect output pins A (CLK) and B (DT) to ground as the shaft rotates.
- At each of the 20 resting positions (detents), both switches are in the same state.
- When you rotate one click, both switches change state -- but the order they change tells you the direction: CLK changes first for clockwise, DT changes first for counter-clockwise.
- Your microcontroller reads these two signals and compares their states to determine direction and step count.
- The pushbutton is a separate switch -- press the shaft down and the SW pin goes LOW; release and it returns HIGH via the on-board pull-up.
📐 SpecificationsModelKY-040Encoder TypeIncremental rotary encoderOperating Voltage5V DC (also works with 3.3V)Detents Per Revolution20 (18° per detent)Pulses Per Revolution20RotationContinuous 360° (no mechanical stops)Pushbutton SwitchNormally open, momentary (active LOW)On-Board Pull-Up Resistors10kΩ on CLK, DT, and SWOutput Signal2-bit quadrature (Gray code)Module DimensionsApprox. 30 × 18 × 30 mm (1.18 x 0.71 x 1.18 inches) L × W × H📦 What\'s in the Box
- 1x KY-040 Rotary Encoder Module (with knob shaft)
- Mounting nut
Jumper wires, Arduino board, and knob cap are not included. Any standard 6mm D-shaft knob will fit.
🔌 Compatible With
- Arduino (Uno, Mega, Nano, Leonardo, Due, and compatibles)
- Raspberry Pi (all models -- use 3.3V logic)
- ESP32 / ESP8266
- STM32, Teensy, and other 3.3V–5V microcontrollers
- PIC and AVR microcontrollers
🎯 Typical Applications
- Menu navigation and selection on LCD/OLED displays
- Volume and brightness controls
- Parameter adjustment (set points, thresholds, timer values)
- Stepper and servo motor speed/direction control
- Scrolling through lists or data
- CNC and 3D printer manual jog controls
- DIY audio equipment (amplifiers, mixers)
- Robotics -- steering and configuration input
⚠️ Important Notes
- Mechanical encoders produce contact bounce -- use software debouncing or add 100nF capacitors between CLK/GND and DT/GND for clean signals.
- For best responsiveness, connect CLK and DT to interrupt-capable pins (Pins 2 and 3 on Arduino Uno).
- Keep jumper wires under 20cm (8 inches) to minimize electrical noise.
- The module includes pull-up resistors -- you generally do not need to enable Arduino\'s internal pull-ups for CLK and DT.
🏪 About Envistia Mall
Envistia Mall is a US-based electronics retailer specializing in development boards, sensors, modules, and components for makers, engineers, and educators. We ship from the United States with fast handling times. Product documentation and technical support are available at our dedicated support site.
📦 Fast Free US Shipping | 🔄 Hassle-Free Returns | 📧 Responsive Customer Support
Visit our store for compatible sensor modules, jumper wires, breadboards, OLED displays, and more accessories for your Arduino and Raspberry Pi projects.
Featured Products
PVD USA ZnSe CO2 Laser Focusing Focus Lens 25mm Diameter FL 50.8mm US Stk
$69.50
Nano V3.0 ATmega328 CH340G 5V 16M Micro-controller with Mini USB Cable
$9.95
ATmega328P CH340 Microcontroller Board with USB-C Connector
$9.39
2Pcs Pro Micro ATmega32U4 5V 16MHz Replaces ATmega328 Pro Mini
$17.49
2X Rotary Encoder Sensor Module w/ Pushbutton Switch KY-040 for Arduino AVR DIY
$7.69
Sensor Shield V5 Digital Analog Expansion Module for Arduino UNO R3 MEGA2560
$6.29
KY-023 Dual Axis XY Joystick Module Analog Thumb Stick Arduino ESP32 3.3V / 5V
$7.29
ATmega328P Starter Kit 830 Point Breadboard, 65 Jumpers, USB & Battery Cables
$14.29 Add suggested items to your listings - Check it out on 3Dsellers.com
· All Rights Reserved to My Store ·
listing template by 3Dsellers.com - Try for Free!
When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.