How to use a rotary encoder as momentary/push buttons?

Hi all, there is an instructable where the guy is using a rotary encoder instead of the push buttons. I tried to get in touch with the him for the connection diagram, but no answer... :(
It doesn't look like he is using and micro controller, but most likely he is, under that small piece of perfboard...
Can you guys help me and others out with some knowledge?

Thank you!

sort by: active | newest | oldest

Most rotary encoder I had so far have three connectors.
1. one direction
2. common
3. other direction
If you want to use them as a "push button replacement" you have to keep in mind that some types provide a feelable click that is not related to the actual switching!
This means they can be stuck in the ON position for either switch instead of just giving a single pulse.
Might not be an issue for your project but in most cases some simple electronics or a microcontroller help to provide proper signals.
It is basically just checked if there is a signal or not and if the signal is steady, too short or too fast it will be adjusted on the output side.
In some old (quality) amps for your home theater you can also find similar encoders.
Difference with them is that they use a bigger spacing between the pulses so to speak and that they align with the feelable click, might be worth to do some scrap hunting ;)

GellertK (author)  Downunder35m1 year ago

First of all, thank you for the information and for taking the time to answer!

The encoder that I have and the guy was using is this: (it does have a feeble click when rotating)

with this pinout:


CLK Data output 1

DT Data output 2

SW Switch

+3 - 5V DC Input

GND Ground

This looks like a full digital encoder (I tried to check continuity between the pins with a multimeter and there is only one direct contact between GND and SW (when you push down the rotating bit)

So don't know what is going on... hope the guy who did the project will notice my struggle and give me a diagram :)

Without a datasheet it is hard to say but I would assume you should get get a signal between the DC input and the outputs or if in doubt between the SW and outputs.
A multimeter might be to slow to show you anything, try a led instead, you should see a very short flash so make sure the LED is bright enough.
If you have an Arduino you can also check with the rotary switch library or some simple code to count the inputs.

GellertK (author)  Downunder35m1 year ago

Thank you for the information, I will give it a try with the LED!

I managed to find this...

Well, that's giving you all the info you need.
Keep in mind that in the Instructable the controller reads the encoder, so there will be some microcontroller build into it.
Not sure how the guy connected it but it does not have to be working as shown in the video.
I did not see any up-down regulation with the encoder, only fixed or jumping numbers.
I am sure you can create a discrete transistor logic to get fixed impulses for left and right but might be easier to just allow access to the original buttons of the controller.

GellertK (author) 1 year ago

I did figure it out :-)

When I tried the first time with a continuous check on my multimeter it didn't work because I was turning it to fast and the multimeter wasn't picking up the changes as fast.
But if I turn it a bit slower it works. It turns the connection on and off :)

The connection:

GND + CLK = one push button

GND + DT = another push button


GND + SW = third push button

It doesn't need DC input in my case.

Thank you Downunder35m and steveastrouk for helping!

I don't see what he did - I've watched the video too. Maybe his switch outputs direction and pulses, then he's paralleled them with the set and UP/Dn buttons on the power supply.

GellertK (author)  steveastrouk1 year ago
I went ahead and bought an identical power supply (convert) and rotary encoder, as soon as they arrive I will try to make it work, hopefully I won't "break" anything :-)
Thank you for your answer and time :-)