Help with rotary pulse switch

Discussion in 'General Electronics Chat' started by triath5147, Jun 1, 2012.

  1. triath5147

    Thread Starter New Member

    Dec 20, 2010
    Hi everyone, I am having trouble coming up with a good way to use a rotary pulse switch.

    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)

    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.
  2. strantor

    AAC Fanatic!

    Oct 3, 2010
    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.
  3. BillB3857

    Senior Member

    Feb 28, 2009
    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.
  4. triath5147

    Thread Starter New Member

    Dec 20, 2010
    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.
  5. triath5147

    Thread Starter New Member

    Dec 20, 2010
    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.