KY-040 360 Degree Infinite Rotary Encoder Module 20 Pulse 5V with Knob for Arduino Raspberry Pi ESP32 STM32 Brick Sensor DIY

KY-040 360 Degree Infinite Rotary Encoder Module 20 Pulse 5V with Knob for Arduino Raspberry Pi ESP32 STM32 Brick Sensor DIY

1pcs KY-040
$10.85
Sale price  $10.85 Regular price  $0.00
Skip to product information
KY-040 360 Degree Infinite Rotary Encoder Module 20 Pulse 5V with Knob for Arduino Raspberry Pi ESP32 STM32 Brick Sensor DIY
KY-040 360 Degree Infinite Rotary Encoder Module 20 Pulse 5V with Knob for Arduino Raspberry Pi ESP32 STM32 Brick Sensor DIY
$10.85
Sale price  $10.85 Regular price  $0.00
Color
Description

SPECIFICATIONS

Brand Name: NONE

Choice: yes

Condition: New

High-concerned chemical: none

Origin: Mainland China

Type: Voltage Regulator

p{margin-block-start: 0; margin-block-end: 0}

Infinite Rotation, Precise Control! KY-040 360 Degree Rotary Encoder Module, 20 Pulse/Rev, with Knob & Push Button, 5V for Arduino/Raspberry Pi Menu, Speed & Position Control.

Key Features & Benefits:

🔄 360° Infinite Rotation, No Stops: Unlike potentiometers, it rotates clockwise/counter-clockwise indefinitely with no mechanical wear limit. Perfect for multi-turn adjustment or circular menus.

🎛️ High Precision & Bidirectional Counting: 20 pulses per revolution. Using two-phase output (CLK/DT), it precisely detects rotation direction and angle change for accurate digital control.

⏺️ Integrated Push Button, 2-in-1 Function: The shaft has a press button (SW) for "select", "confirm", or "reset", saving I/O pins and enhancing interaction.

🔌 Plug & Play, Wide Compatibility: Standard 5V operation, digital output. Clear pins (CLK, DT, SW, +, GND) for direct connection to Arduino, Raspberry Pi, ESP32, STM32, etc.

🛠️ Includes Knob, Easy Installation: Comes with a practical knob cap. Ready to use out of the box, no extra parts needed. Comfortable feel, easy adjustment.

Product Description:

The KY-040 rotary encoder module is ideal for adding precise rotational input to your projects. It converts mechanical rotation into digital pulses readable by microcontrollers, perfect for smart menu systems, parameter adjustment (volume, brightness, speed), robotic joint control, or any application requiring infinite rotation feedback.

🚨 Critical Notes Before Use:

❌ 【What This IS & IS NOT】:

This is an incremental rotary encoder, NOT a potentiometer (analog output) or absolute encoder. It outputs directional pulse signals. It cannot read absolute angle directly. You need microcontroller programming to count pulses for relative position.

⚠️ 【Wiring & Usage Tips】:

Pull-Up Resistors ARE REQUIRED! The CLK and DT signal lines MUST be pulled HIGH (e.g., to 5V) with pull-up resistors (internal or external) on the microcontroller side, otherwise signals will be unstable. Most Arduino tutorials use internal pull-ups.

Debouncing is a MUST: Mechanical encoders have contact bounce. You MUST implement software debouncing (e.g., check state change with delay) for accurate counting.

Voltage Match: Operating voltage is 5V. Do not apply higher voltage.

✅ 【Required Programming Knowledge】:

Basic microcontroller programming skills (e.g., Arduino C) are required.

You need to understand how to read the sequence of level changes on CLK and DT pins (via interrupts or polling) to determine direction and increment/decrement a counter.

Many ready-to-use KY-040 libraries and example codes are available online.

🔧 【Typical Connection】:

1. Connect module + and GND to the dev board's 5V and GND.

2. Connect CLK, DT, SW to three digital I/O pins.

3. In code, set these pins as INPUT, and enable internal pull-ups for CLK and DT.

4. Write an interrupt service routine or polling logic to handle rotation and button press events.

Specifications:

Model: KY-040

Operating Voltage: 5V DC

Pulse Count: 20 Pulses Per Revolution (20 PPR)

Rotation Type: 360° Infinite

Switch Type: Push Button (Normally Open)

Output Signal: Digital Pulses (CLK, DT), Button Signal (SW)

Interface: CLK, DT, SW, + (VCC), GND

Module Size: Approx. 31mm × 19mm × 29mm (incl. knob)

Mounting: Standard fixing holes

Package Includes:

1 x KY-040 Rotary Encoder Module

1 x Knob Cap


Free Shipping Over $199
  • 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
30-Day Return Policy
  • 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
Why Choose Us?
  • 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
Secure Payment Latest encryption technology
Money-Back Guarantee 30-day hassle-free returns
Quality Assured Factory certified products
Global Fast Shipping Worldwide express delivery

You may also like

Contact us

Subscribe to our emails

Be the first to know about new collections and special offers.