I am working on an FM transmitter with PLL, where the output frequency is controlled incrementally at 100kHz steps through an up/down momentary buttons. Needles to say, I fancy something different than two boring push buttons, so I turned to rotary designs.
It took quite some research to find what I need to accomplish an up/down switch based on the clockwise/counter-clockwise movement of a rotary switch.
The circuit here simulates a continuous turning of a rotary switch. An incremental rotary switch will have 2 outputs, and each turn will give you 90dgs phase shift between the two outputs. By using a bit of logic circuitry, you can find out the direction of the switch based on this unique phase shift quality of the rotary encoder. If the output B is trailing behind output A for a given position, then the switch is rotated in a clockwise position. A vice versa situation would mean the switch is rotating in the opposite direction.
As you can see, the circuit is fixed on the clockwise position right now. Click on the logic source to simulate a reversal of the direction of the rotary encoder, and the logic will start clicking the down button instead.
P.S. The two 555 timers are an easily simulateable version of a one shot trigger. In order for the circuit to work reliably, the output needs to always fall back to zero, regardless of the switch position. Without this monostable flip flop, one of the positions of the rotary switch will keep one of the outputs at a logic high (constantly ON state). There are better monostable flip flops than the 555 timer, but it works as a proof of concept
|