rotary encoder interface to counter

All you probably need for your counters are step & direction signals, very simple to do with cheap CMOS digital parts instead of trying to find a dedicated IC, her'es an example:
rot_enc.png
 
The problem with that is there are few up/down counter chips and they take up and down clocks normally, not step-direction, and usually aren't 1-of-N outputs either.

A microcontroller is the natural approach for this, can code any behaviour you want up in the software, including persistent state (if the µController has EEPROM).
 
Thanks all

I came up with this (all ICs at 3.3V). looks reasonable (?)
Best stay within the same family of logic, less timing problems,an 74HC74 flipflop.
IC21C in the clk line to prevent simultanious change of direction flipflop and counter.
R17 and R18 are useless, you can leave the unused outputs open.
Pull ups or pull down on the outputs depend on what you are driving.
Mona
 

Attachments

  • namlos.png
    namlos.png
    91.4 KB · Views: 442
Hey thanks for the hints, really appreciated. Outputs will drive a mux. Actually I inverted input with output in the prev schematics! ESP_xxx is a signal coming form an external uC to force a specific output. this should capture all the comments so far
 

Attachments

  • INPUT_SELECT.jpg
    INPUT_SELECT.jpg
    235 KB · Views: 867
Last edited:
Elm chips

Have a look at the Elm chips from Elm Electronics in Canada .They are 8_pin DIP and based on Pic microcontroller. They filter out u expected conditions. I use one of them in my big preamp with no problems. For volume control use make sure your selecting the 'right' number of pulses per revolution and the detection scheme. Also, optical encoders are said to produce cleaner signals vs mechanical ones,
 
Doing quadrature decoding correctly is a much harder problem than most combinatorial logic problems, people don't realize!

You need to be sensitive to 4 different edges, and generate a pulse for each of them, and the correct pulse!

Its actually much simpler to do this with a microcontroller unless you need really high speed.

The part most people stumble on is dither - when one input is switching up and down without the other changing - this should generate alternate up and down pulses, but most circuits don't work for this (certainly none in this thread so far). To do this correctly seems to require several flipflops and more than a dozen gates, as well as a pulse generator/delay element.


On reflection the neatest approach is probably to use 4 edge-trigger monostables and combine their outputs - this can probably be done with XOR gates and RC delays plus a few other gates.
 
Last edited:
Have a look at the Elm chips from Elm Electronics in Canada .They are 8_pin DIP and based on Pic microcontroller. They filter out u expected conditions. I use one of them in my big preamp with no problems. For volume control use make sure your selecting the 'right' number of pulses per revolution and the detection scheme. Also, optical encoders are said to produce cleaner signals vs mechanical ones,

ELM404 would fit

ELM404 – Elm Electronics
 
Yes, I think its quite elegant this way, assuming I've got it right (!)
quadrature_decode.jpg

The delays can be a gate driving an RC circuit followed by a schmitt-trigger gate, perhaps use 74HC14 inverters fore and aft for this. quad XOR, quad AND plus the remaining inverters plus 2 OR gates. 4 74HCxx chips, some R and C.