Your cart is empty.
Your cart is empty. WayinTop: We aim to make your work Easier & Funnier!
Specification of Rotary Encoder Module:
Model: KY-040
Working Voltage: 5V
Material: PCB + Brass
Weight: 10g
Size: 32 x 19 x 30mm
The pin outs for this rotary encoder are identified in the below.
CLK: Encoder Pin A
DT: Encoder Pin B
SW: No Pushbutton Switch
+: 5V Supply
GND: Encoder Pin C
Pin connected to for Arduino:
CLK = [pin 3]
DT = [pin 4]
Button = [pin 5]
+ = [Pin 5V]
GND = [pin GND]
Pin connected to Raspberry Pi:
CLK = GPIO16 [pin 36]
DT = GPIO15 [pin 10]
SW = GPIO14 [pin 8]
+ = 3.3V [pin 1]
GND = ground [pin 6]
Package Include:
5 x KY-040 360 Degree Rotary Encoder Module
5 x Encoder Push Button Black
Andrii Mitnovych
Reviewed in Canada on February 24, 2025
The button sends several on/off events after release. Unusable.Rotary works.
Tom Tom
Reviewed in Germany on January 12, 2025
Super Produkt bin zufrieden!
niktb
Reviewed in Spain on December 17, 2024
What else do you want... Works as per spec... Good for me!
Anny
Reviewed in Canada on April 24, 2024
thanks
Mel S.
Reviewed in Canada on August 14, 2022
They work but I'm getting very jumpy readings on all 5 that I have tried so far. Not impressed. Had to revert back to potentiometers to control my servos.UPDATE: After much digging around the forums I found that when connected to an Arduino Nano and used with an interrupt service routine (ISR) function these encoders work quite well. They do have a tendency to "stall" the code if they get hung up halfway between two ticks but it's a rare and minor issue. Decent encoder for the price. I've upgraded my rating from 2 to 5 stars.
PinkPandaKatie
Reviewed in the United States on July 5, 2022
These rotors work really well for what I need. I had previously been using a rotary encoder I got from Sparkfun which worked, but it didn't have detents like these do. With the rotor in a detent, the rotor "CLK" and "DT" pins are disconnected from ground, so they get pulled to +5v just like "SW" when the button is not pressed. Spinning clockwise by one detent will pull CLK to GND first, then DT to GND, release CLK, then release DT. Counter-clockwise is obviously the reverse: DT low, CLK low, DT high, CLK high.Note that the image shows "5v supply", but all that's connected to is the 3 10k pull-up resistors that are connected to the two rotor contacts and the pushbutton. You could use any voltage you want to, or even swap 5v and ground so the pull-ups become pull-downs and the outputs are active high, or just leave it disconnected if you have external pull-ups.The pushbutton requires a bit more pressure than the other rotor, but it's hard to quantify.I connected all 5 to rotors (15 outputs in total) to a pair of PCF8574 GPIO expanders (with 8 GPIOS each). I connected the "CLK" pin of each to the first expander, and the "DT" pin to the second, then the INT line on both expanders to two GPIOs on the Raspberry Pi which are configured to interrupt on the falling edge - that way, even if there is a delay in reading the I2C bus, it still knows which way the rotor turned.The knobs appear to be anodized aluminum. I brushed the tops of the knobs and painted them with acrylic paint, then coated them with clear nail polish, and they look pretty good :)
Thomas
Reviewed in Canada on October 28, 2022
Works nicely, but occasionally "bounces" (eg. when I stop turning right, it sends one notch left). Button is a little harder to click down than I expected. But otherwise great, easy to use board and reasonably spaced detents (notches per turn) (I think about 20 per turn). Convenient to use as shown in Arduino examples online.
Andreas Miller
Reviewed in Canada on April 13, 2022
Good quality
Funfury
Reviewed in Canada on May 10, 2021
Perfect for my arduino projects.
fuginic
Reviewed in Italy on January 14, 2021
Devo dire che mi sono trovato molto bene con questi componenti. Usati per un progetto di home cockpit non ho avuto nessun tipo di problema.
Capital C
Reviewed in Canada on August 24, 2020
The encoder and caps are decent quality, and thanks to the standard D-shape stem, you could attach virtually any compatible knob cap you like to suit your style. There is a threaded collar to affix it to a panel. I'm not sure if I had mine wired backwards, but the encoder signal seemed to increase when rotating counter-clockwise and decrease when turning clockwise, so I just adjusted my code to match. Not a big deal, just something I need to remember.
Michael L.
Reviewed in Canada on June 11, 2020
Came with nut, washer and knob.Look like decent quality and function as intended.
didier omnes
Reviewed in France on November 12, 2020
tres bon produit
Recommended Products