Help with rotary pulse switch

Thread Starter

triath5147

Joined Dec 20, 2010
6
Hi everyone, I am having trouble coming up with a good way to use a rotary pulse switch.
http://dl.dropbox.com/u/66965217/switch.jpg

It seems to work like a rotary encoder, but instead of having overlapping outputs. It has a pulse on each of the leads as you turn it, CW or CCW. The switch will spin infinitely in both directions.
At least that's how it seems when I hook my ohm meter to it.

What I would like to do, is have something count up and down the pulses when I turn the switch different directions. to light some LED's. When it reaches the top of the bar graph I want it to stop counting and when It reaches the bottom I want it to stop counting.
I came up with the following circuit in Yenka, to try it, but I don't think I'm going about it the best way. It works OK in the Yenka simulation, but I don't know that it will be realiable with the rotary type pulses that may be fast(as fast as a person can turn the knob)

http://dl.dropbox.com/u/66965217/counter.jpg

When I look up circuits online most of the encoder circuits have to do with optic encoders or quadrature? encoders which I don't believe I have.
Any help is appreciated.
 

strantor

Joined Oct 3, 2010
6,782
The server I'm on has your images blocked. That's why it's recommended you upload the images here, so everybody can see them.
 

BillB3857

Joined Feb 28, 2009
2,570
Measure between the two outputs as well as each output to common. If your switch is a quadrature switch, there should be continuity during the transition from one position to the next. If you have a common for each channel, tie the two commons together for this test.
 

Thread Starter

triath5147

Joined Dec 20, 2010
6
There is no continuity between the two wires when I rotate the switch. Only continuity between each one and the common depending on direction of rotation.


Since I don't have an oscilliscope I don't know for sure that it is a square wave, but it acts like a momentary switch as you turn it. It makes contact as you turn and then when it gets to it's next detent it breaks contact. I guess since I can only turn it so fast, I may not need anything special, but I'm looking for some options on how to improve this circuit. It just seems like I'm taking a round about way, and there may be an ic or something I havn't heard of, that may do what I want with less parts.
 

Thread Starter

triath5147

Joined Dec 20, 2010
6
OK, I was playing with my Arduino and got the circuit to work with code instead. So feel free to add any hardware solutions in-case someone else searching for the same type of circuit can find a hardware solution Answer. Thanks.
 
Top