Your cart is empty.
Your cart is empty. Length of Shaft: 20mm/ 0.79in
5 pins
Package Includes:
5× Rotary Encoder Code Switch Digital Potentiometer
5× Knob Cap
David Burnett
2025-08-13 13:18:33
What makes these rotary encoders stand out among a sea of equivalent products are the metal knobs!! They're beautifully machined, and the knurling in the grip area feels great. When you look at them, you want to touch them and spin them around and around.And of course, the rotary encoders work as you'd expect. For my particular geek project, I was using an ESP32 with ESPHome/HomeAssistant to read the rotary encoder and the momentary switch pushbutton that's built into the rotary encoder shaft. And I was using three of the five encoders that come in this kit to manually specify the set R, G and B values for an LED strip (WS2812). Pressing the rotary encoder triggers a script MP3 player (the DF Robot Mini) to play the Futurama theme song. This requires the use of 3 GPIO pins on the ESP32, two to read the clockwise/anticlockwise motion, and one for the momentary switch. And of course, you have to connect the rotary encoder to ground.While this is a pretty trivial ESPHome/HomeAssistant configuration, I'll include the YAML anyway just in case someone finds it useful. Of course, if you're programming directly in Arduino or using one of the other automation platforms, these encoders will work just fine.For the Rotary Encoder motion:# Rotary encoder to set the Red channel valuesensor: - platform: rotary_encoder name: "red_led_encoder" id: "red_led_encoder" publish_initial_value: true restore_mode: RESTORE_DEFAULT_ZERO resolution: 4 min_value: 0 max_value: 50 on_clockwise: - lambda: |- turn_on_todays_lights.execute(); # forces a refresh of the WS2812 with the new encoder value on_anticlockwise: - lambda: |- turn_on_todays_lights.execute(); pin_a: number: GPIO14 mode: input: True pullup: True pin_b: number: GPIO12 mode: input: True pullup: True# 1Momentary switch press plays the futurama theme song - platform: gpio pin: number: GPIO25 mode: INPUT_PULLUP inverted: true name: "futurama-theme-momentary-switch" device_class: running filters: delayed_on_off: 50 ms on_press: then: - logger.log: "Button Pressed: Playing Futurama theme." - script.execute: play_futurama_theme on_release:
CalcProgrammer1
2025-06-20 13:09:08
I've used these knobs on a few different projects and they work great. You can use them with the Encoder library on Arduino. Just note that each "click" of the knob is counted as 4 counts in the Arduino software if you use this library, so you will have to divide counts by 4 if you want the number of clicks. The button can be used with the Button library or just as a digital input. It mounts neatly to enclosures and the knob feels nice.I used one as a fan speed and LED brightness control on my OpenRGB desk fan project and we also used one for a model railroad turntable controller, where the knob selects which track to move the turntable to.
Quilpole
2025-05-04 16:02:29
These things look nice, they feel nice ... and they seem to perform well.However, figuring out how they work, in the complete absence of any documentation is a bit of a pain.There are three pins on one side, two pins on the other side. There are also two larger pins on the other sides, for mounting or alignment purposes.The two pin side is very straightforward, and represent the two pins of a normally-open switch.The three pin side is also straightforward, in that the center pin is the ground, and the other two represent what I will call encoder1 and encoder2.When you rotate the spindle, you will find that there are a total of 20 detents (bumps) during a rotation of 360 degrees.Each movement of the spindle from one detent to the next results in the encoder1 and encoder2 pins going through multiple transitions, not a single one (as you might expect).Assuming that you have tied the encoder pins to (say) 5V with a resistor, a rotation between detents, will produce a set of encoder transitions. For example: 11 10 00 01 11 (clockwise) or 11 01 00 10 11 (anti-clockwise).Thus, in the first state change from 11, you can tell whether the rotation is clockwise or anti-clockwise.So, a practical use of this, in either the Arduino, the Raspberry Pi, or some other platform, will require polling the two encoder pins, and monitoring the state transitions. When you see a full set of transitions from 11 back to 11, you can determine whether to increment or decrement the counter you are associating with the control.The polling speed is determined by how fast you expect the user to twirl the dial! I use 1 millisecond polling on my Raspberry Pi, and I cannot twirl the dial fast enough to lose any transitions. You can use slower polling, if necessary. In my case my Pi has little else to do, so why not a fast poll?I hope this helps others quickly get up-to-speed in using these devices.
Kevin T.
2025-02-19 10:28:46
I believe all Ender printers with the 360 knob develop the famous lockup. Saw someone post a link to these on a FB support group. Ordered a batch, replaced on my 3v2 and works perfectly as the OEM. May even be the OEM pot. It fits in the holes left after desoldering the old one.
Szymon
2025-01-09 17:32:54
The encoders arrived tightly packed in a small plastic box, barely large enough to hold the parts and accessories. Amusingly small plastic boxes are nothing new in electronic, but in this case the box does the actual job of preventing parts from hitting each other. All knobs arrived unscratched, none of the encoder legs were bent.Now, here's the thing: the Bildr code sample didn't work reliably at all. Maybe the code is OK and it's just not compatible with this particular encoder (even though people keep recommending it), but bottom line is that the final solution a exhibited very erratic behavior with lots of duplicate codes and practically no way to make a full turn without losing alignment. I was ready to blame the cheap encoders, but then I realized I haven't tried the proper Encoder library from Arduino. As it turns out, it worked flawlessly.If you're using these with Arduino, just grab the "official" Encoder library by Paul Stoffregen and save yourself some hassle.
Recommended Products