---
product_id: 95765450
title: "/ 5Pcs KY-040 Rotary Encoder Module with 15×16.5 mm with Knobs Cap"
price: "€ 19.30"
currency: EUR
in_stock: true
reviews_count: 10
url: https://www.desertcart.gr/products/95765450-5pcs-ky-040-rotary-encoder-module-with-15-16-5
store_origin: GR
region: Greece
---

# 5V working voltage for stable performance 20 pulses per rotation for precise control Durable aluminium alloy knob, 15×16.5mm / 5Pcs KY-040 Rotary Encoder Module with 15×16.5 mm with Knobs Cap

**Price:** € 19.30
**Availability:** ✅ In Stock

## Summary

> 🔧 Turn up your innovation with precision and style!

## Quick Answers

- **What is this?** / 5Pcs KY-040 Rotary Encoder Module with 15×16.5 mm with Knobs Cap
- **How much does it cost?** € 19.30 with free shipping
- **Is it available?** Yes, in stock and ready to ship
- **Where can I buy it?** [www.desertcart.gr](https://www.desertcart.gr/products/95765450-5pcs-ky-040-rotary-encoder-module-with-15-16-5)

## Best For

- Customers looking for quality international products

## Why This Product

- Free international shipping included
- Worldwide delivery with tracking
- 15-day hassle-free returns

## Key Features

- • **Prototyping Made Easy:** Breakout board design simplifies wiring and accelerates your development workflow.
- • **Robust Aluminium Knob:** Sleek, durable 15mm diameter knob designed for professional-grade handling.
- • **Precision Pulse Control:** 20 pulses per rotation ensure ultra-responsive input for your projects.
- • **Resettable Encoder Button:** Instantly reset counts to zero with the built-in push button for flawless calibration.
- • **Universal 5V Compatibility:** Seamlessly integrates with Arduino and similar microcontrollers.

## Overview

The Taiss 5Pcs KY-040 Rotary Encoder Module set features 5 durable rotary encoders with aluminium alloy knobs (15×16.5mm), operating at 5V and delivering 20 pulses per rotation. Each encoder includes a built-in push button to reset counts, making it ideal for precise input control in prototyping and embedded projects. Compatible with Arduino and similar platforms, these modules combine reliability and ease of use for professional developers and makers.

## Description

Taiss / 5Pcs KY-040 Rotary Encoder Module with 15×16.5 mm with Knobs Cap: desertcart.com: Industrial & Scientific

Review: A good product that does the job! - The breakout board makes them easy to use for prototyping. They are well made and work good.
Review: Works great, but super noisy. - They work great, ... as long as the noise is filtered out. I needed to run the signal on wire over 45 feet. This destroyed any ability to simply read DT -- it was just bouncing all over. I tried putting in a 0.1uF cap and tried pull up resistors. Neither was able to filter out the noise. So I wrote some code that seems to be working great. This should run on Arduino and similar devices. Keep in mind that this approach does NOT use interrupts, so it is possible that turns could possibly be missed if your MCU gets busy on other things (though unlikely, unless you're running very long processes). uint16_t debounceDuration = 100; uint8_t clkVal = 0; uint8_t dtVal = 0; uint8_t dtValPrev = 0; uint32_t dtValLows = 0; uint32_t dtValHighs = 0; uint32_t millisR = 0; bool activePeriod = false; bool dir = false; uint8_t clkPin = A0; uint8_t. dkPin = A1; uint32_t currentMillis = 0; void setup() { pinMode(clkPin, INPUT_PULLUP); pinMode(dkPin, INPUT_PULLUP); } void loop() { currentMillis = millis(); clkVal = pinReadFast(clkPin); if (clkVal == LOW && !activePeriod && currentMillis - millisR > debounceDuration) { // happens one time once CLK goes low. millisR = currentMillis; activePeriod = true; dtValLows = 0; dtValHighs = 0; } if (activePeriod) { dtValPrev = dtVal; dtVal = pinReadFast(dkPin); if (currentMillis - millisR  debounceDuration && activePeriod) { // finished active period. fired once dir = (dtValHighs > dtValLows); activePeriod = false; Serial.print("dir: "); Serial.println(dir); } }

## Features

- Working voltage: 5V; One round number of pulse: 20
- The Material of Knob Cap: aluminium alloy；The Specification of Knob Cap: diameter: 15mm/ 0.59in; height: 16.5mm/ 0.65in
- The rotary encoder can count the number of pulse output during rotation in the positive direction and reverse direction through the rotation and this rotation counts are not limited
- With the key on the rotary encoder, you can reset to the initial state, that is, counting from 0
- Package content: 5pcs x Rotary Encoder Module + 5pcs black Knob .

## Technical Specifications

| Specification | Value |
|---------------|-------|
| Customer Reviews | 4.2 out of 5 stars 242 Reviews |

## Images

![/ 5Pcs KY-040 Rotary Encoder Module with 15×16.5 mm with Knobs Cap - Image 1](https://m.media-amazon.com/images/I/71w01-F75EL.jpg)

## Customer Reviews

### ⭐⭐⭐⭐⭐ A good product that does the job!
*by D***. on May 5, 2026*

The breakout board makes them easy to use for prototyping. They are well made and work good.

### ⭐⭐⭐⭐⭐ Works great, but super noisy.
*by D***N on June 25, 2021*

They work great, ... as long as the noise is filtered out. I needed to run the signal on wire over 45 feet. This destroyed any ability to simply read DT -- it was just bouncing all over. I tried putting in a 0.1uF cap and tried pull up resistors. Neither was able to filter out the noise. So I wrote some code that seems to be working great. This should run on Arduino and similar devices. Keep in mind that this approach does NOT use interrupts, so it is possible that turns could possibly be missed if your MCU gets busy on other things (though unlikely, unless you're running very long processes). uint16_t debounceDuration = 100; uint8_t clkVal = 0; uint8_t dtVal = 0; uint8_t dtValPrev = 0; uint32_t dtValLows = 0; uint32_t dtValHighs = 0; uint32_t millisR = 0; bool activePeriod = false; bool dir = false; uint8_t clkPin = A0; uint8_t. dkPin = A1; uint32_t currentMillis = 0; void setup() { pinMode(clkPin, INPUT_PULLUP); pinMode(dkPin, INPUT_PULLUP); } void loop() { currentMillis = millis(); clkVal = pinReadFast(clkPin); if (clkVal == LOW && !activePeriod && currentMillis - millisR > debounceDuration) { // happens one time once CLK goes low. millisR = currentMillis; activePeriod = true; dtValLows = 0; dtValHighs = 0; } if (activePeriod) { dtValPrev = dtVal; dtVal = pinReadFast(dkPin); if (currentMillis - millisR < 1) { if (dtVal == HIGH) dtValHighs++; else dtValLows++; } } if (currentMillis - millisR > debounceDuration && activePeriod) { // finished active period. fired once dir = (dtValHighs > dtValLows); activePeriod = false; Serial.print("dir: "); Serial.println(dir); } }

### ⭐⭐⭐⭐ Wish It Would Have Added Built-In Capacitors
*by B***N on December 30, 2023*

This took me awhile to get working properly because my Arduino code was incorrect. It needs 0.1uF capacitors from the CLK and DT outputs to GND, and I wish these were built in. It's missing a resistor on the switch part, which I'm not using. The parts I ordered have 15 PPR. Here is my Arduino code if this is helpful for anyone... const int i_A = 3; const int i_B = 2; int encoderPos = 0; bool encAValPrev = LOW; void setup() { Serial.begin(9600); pinMode(i_A, INPUT); pinMode(i_B, INPUT); } void loop() { bool encAVal = digitalRead(i_A); if ((encAValPrev == HIGH) && (encAVal == LOW)) { if (digitalRead(i_B) == LOW) { encoderPos--; Serial.println(String(encoderPos) + " Counter-Clockwise"); } else { encoderPos++; Serial.println(String(encoderPos) + " Clockwise"); } } encAValPrev = encAVal; }

## Frequently Bought Together

- Taiss / 5Pcs KY-040 Rotary Encoder Module with 15×16.5 mm with Knobs Cap
- Hosyond 5 Pcs 0.96 Inch OLED I2C IIC Display Module 12864 128x64 Pixel SSD1306 Mini Self-Luminous OLED Screen Board Compatible with Arduino Raspberry Pi(Blue and Yellow)
- ELEGOO 120pcs Multicolored Dupont Wire 40pin Male to Female, 40pin Male to Male, 40pin Female to Female Breadboard Jumper Ribbon Cables Kit Compatible with Arduino Projects

---

## Why Shop on Desertcart?

- 🛒 **Trusted by 1.3+ Million Shoppers** — Serving international shoppers since 2016
- 🌍 **Shop Globally** — Access 737+ million products across 21 categories
- 💰 **No Hidden Fees** — All customs, duties, and taxes included in the price
- 🔄 **15-Day Free Returns** — Hassle-free returns (30 days for PRO members)
- 🔒 **Secure Payments** — Trusted payment options with buyer protection
- ⭐ **TrustPilot Rated 4.5/5** — Based on 8,000+ happy customer reviews

**Shop now:** [https://www.desertcart.gr/products/95765450-5pcs-ky-040-rotary-encoder-module-with-15-16-5](https://www.desertcart.gr/products/95765450-5pcs-ky-040-rotary-encoder-module-with-15-16-5)

---

*Product available on Desertcart Greece*
*Store origin: GR*
*Last updated: 2026-06-22*