







Buy anything from 5,000+ international stores. One checkout price. No surprise fees. Join 2M+ shoppers on Desertcart.
Desertcart purchases this item on your behalf and handles shipping, customs, and support to Israel.
🔧 Turn up your projects with precision and style!
The Taiss KY-040 Rotary Encoder Module set includes 5 high-quality encoders with durable aluminium alloy knobs (15mm diameter, 16.5mm height). Operating at 5V, each encoder outputs 20 pulses per rotation and features an integrated push button for resetting counts. Ideal for Arduino and similar microcontroller projects, these modules support precise rotational input with noise-filtering potential when paired with debounce code, making them a top choice for professional-grade DIY electronics and prototyping.





























































| ASIN | B07F26CT6B |
| Best Sellers Rank | #101,213 in Industrial & Scientific ( See Top 100 in Industrial & Scientific ) #18 in Switch Encoders |
| Date First Available | June 26, 2018 |
| Is Discontinued By Manufacturer | No |
| Item Weight | 1.76 ounces |
| Item model number | KY-040 |
| Manufacturer | Taiss |
| Package Dimensions | 4.49 x 3.46 x 1.42 inches |
D**N
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 < 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); } }
K**.
Switch bounce solved
I had a big problem with switch bounce when connecting clk, data, and switch to my Arduino Uno R4 Wifi, using the KY040 code from MediaFire. That program kept firing off a reset (switch depress) even when I was only rotating the dial. I also noticed that the switch was missing the 10KOhm pull-up resistor for the switch line, so I popped one off another switch and soldered that in. Bounce gone completely, and I can count up or down to my heart's content without a reset. Very nice, other than needing to buy a bunch of 10K 0805 chip resistors. Note that the program was supposed to provide pull-ups from the board, but that apparently did not happen properly. I note that two of the pins were analog optional pins, so perhaps that caused an issue. In any case, the switches appear to work well once modified.
B**N
Wish It Would Have Added Built-In Capacitors
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; }
I**T
good quality
Used these encoders on my Minidexed build. They worked better than others i had ordered. I suspect the caps were better at being a low pass filter and therefore i am getting better/cleaner signal.
S**.
Works well with Arduino. Has detents as you rotate.
I used this encoder with an Arduino. I used the Encoder.h library. CLK and DT are hooked to interrupt inputs of the Arduino. SW and GND are hooked to inputs to detect the button press. +5V was not connected. This encoder does not turn smooth. It has detents for each encoder pulse. But this was fine for my application as it helps prevent encoder movement when pressed.
=**=
Knobs don't fit, Missing resistor
The knobs don't fit on the D-shaft of the encoders. Also, while the pullup resistors for the CLK and DT pins were installed, the pullup on the pushbutton switch was missing. Other reviewers have had the same problems. Disappointing.
O**A
Look for another option
Knobs don’t fit the encoder which defeats the purpose of why I chose to buy these, also the electronics on it are not as advertised. Not recommended
R**É
Wrong Knob Cap to those items
Works perfectly fine. Unfortunately the knob cap doesn‘t fits (Left picture is, what i got) (Right picture is, where it fits)
A**R
I'm using them with WLED and they work flawlessly. I'm using the rotary encoder and four line display usermod that I customized and it's amazing now. Brightness adjustment with the knob, double click to change presets and long press to power off and on. Cut the side with the holes off to fit it in my car.
S**E
Conforme a ce que j'ai commandé.
ترست بايلوت
منذ شهرين
منذ 4 أيام