






Desertcart purchases this item on your behalf and handles shipping, customs, and support to Hong Kong.
🔄 Turn up your tech game with precision and style!
The Taiss KY-040 Rotary Encoder Module is a 5V-powered, high-precision input device featuring 20 pulses per rotation and a resettable push button. Each module comes with a durable 15mm aluminium alloy knob, ideal for professional-grade electronics projects requiring accurate rotational input and seamless bidirectional counting.





























































| Brand | Taiss |
| Manufacturer | Taiss |
| Model number | KY-040 |
| Number of Memory Sticks | 1 |
| Item Weight | 50 g |
| Package Dimensions | 11.4 x 8.79 x 3.61 cm; 50 g |
| Item model number | KY-040 |
| Are batteries included? | No |
A**R
Works great with WLED
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.
D**.
A good product that does the job!
The breakout board makes them easy to use for prototyping. They are well made and work good.
S**E
Conforme a ce que j'ai commandé.
Conforme a ce que j'ai commandé.
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); } }
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; }
Trustpilot
1 month ago
2 weeks ago