Electronic – Simulate Encoder Using Buttons

encoder

I want to simulate a simple encoder wheel with two buttons (one for up and one for down). The output of the encoder is as follows:

Waveform

I want to accomplish this without the use of a micro. I have a solution in mind but it would require 3 555 timers to generate the wave form (one to create A pulse, one for delay time on B pulse and third for the B pulse). I am thinking 50 to 100 ms periods would be sufficient. Also, the waveform does not HAVE to repeat while a button is held down. So, the button CAN be repeatedly pressed to simulate a full rotation as opposed to being held down.

Anyone have an improvement on my 3 555s? It just seems so wasteful and I am sure there is likely a more elegant approach.

Best Answer

I would go for digital. Use a 74HC4017 Johnson counter which you reset at the 4th count, so that your sequence goes 0, 1, 2, 3, 0, 1, etc. Wired-OR outputs 2 and 3 with a pair of diodes to create channel A, and 1 and 2 to create channel B.

enter image description here

The BAT54CW is a double Schottky diode with common cathode, so you'll need only two of them. They also only drop 320 mV maximum at 1 mA, so are suitable for logic powered by 3.3 V or higher.

Instead of the diodes you can of course use real OR gates.

Related Topic