🔧 Elevate Your Projects with Precision Control!
The 5Pcs 360 Degree Rotary Encoder Code Switch Digital Potentiometer is a versatile component designed for Arduino enthusiasts. Each unit features a 20mm shaft length, 5-pin connectivity, and a user-friendly push button, making it perfect for a variety of electronic projects. This pack of 5 ensures you have enough for all your creative endeavors.
D**T
The knobs are worth the price alone!
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_encodername: "red_led_encoder"id: "red_led_encoder"publish_initial_value: truerestore_mode: RESTORE_DEFAULT_ZEROresolution: 4min_value: 0max_value: 50on_clockwise:- lambda: |-turn_on_todays_lights.execute(); # forces a refresh of the WS2812 with the new encoder valueon_anticlockwise:- lambda: |-turn_on_todays_lights.execute();pin_a:number: GPIO14mode:input: Truepullup: Truepin_b:number: GPIO12mode:input: Truepullup: True# 1Momentary switch press plays the futurama theme song- platform: gpiopin:number: GPIO25mode: INPUT_PULLUPinverted: truename: "futurama-theme-momentary-switch"device_class: runningfilters:delayed_on_off: 50 mson_press:then:- logger.log: "Button Pressed: Playing Futurama theme."- script.execute: play_futurama_themeon_release:
C**1
Great for Arduino projects
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.
Q**E
Great, but downvoted because no documentation at all
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.
T**N
Nice encoders
Nice detent feel and knobs. I bought this to fix the volume control on my car stereo, unfortunately the directions are reversed so I can't use these. Not their fault.
K**.
Fixes the Ender 3 problem
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.
Trustpilot
3 days ago
2 weeks ago