Rotary counting switch, please explain.

Discussion in 'General Electronics Chat' started by Joe_M, Jan 2, 2015.

  1. Joe_M

    Thread Starter New Member

    Feb 19, 2013
    7
    1
    I have a rotary switch that was removed from a radio as a channel selector. It has 3 contacts on one side, and 3 opposite. The center is common on each side. The first set changes from an open to a short every 2 clicks on the left, and every 8 clicks on the right. The second set of contacts has a common in the middle, and changes from a open to a short every 4 clicks on the left, and every 1 click on the right.
    I see the pattern 1,2,4,8, so it must be counting, but there are simpler ways to do it, so what is the purpose of having so many contacts when they could have done it with one set of contacts instead of two. The contacts from each side of the switch only have contact with the common from the side it is on.

    What kind of circuit would read this switch?


    Thanks for any insight into how this switch was being used.

    Joe
     
  2. alfacliff

    Well-Known Member

    Dec 13, 2013
    2,449
    428
    binary or bcd input to change count in phase lock loop.
     
  3. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    It is an incremental rotary quadrature encoder. The external logic (might be implemented in software in a dedicated ucontroller) converts this to up/down counts to a register with controls the frequency synthesiser for the VFO.
     
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    A quadrature encoder only has two pulses, they have to be 90° apart (hence quadrature).
    Max.
     
  5. Joe_M

    Thread Starter New Member

    Feb 19, 2013
    7
    1
    Thanks, the Wikipedia page said it all, it is a Mechanical absolute encoder. To expand on my answer, the Wiki page said that they use a switch like this to maintain the position of the switch during power outage. The switch will read the same value when the device is turned on. So I have to assume if it had more contacts, it would be more precise. It's true that this was used as a volume, or channel control on the radio. What a switch like this is used for depends on its fabrication. Some use brushes, and others use metal disks. How many positions it can remember is related to accuracy of the switches position.

    Thanks guys, this was educational.



     
  6. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066

    No, read further down the Wiki. The ones used in most radios are incremental-quadrature encoders, with fewer wires.
     
  7. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    The only trouble with quadrature encoders they are not absolute in their own right, IOW do not normally retain a value when powered off, there would have to be extra circuitry to retain an absolute value.
    Quad enc are typically used in CNC machinery because of their low cost, but the machine has to be re-referenced at power up each time.
    CNC Robotics typically use the 9bit+ binary absolute variety which retain their position at power up.
    Max.
     
  8. Joe_M

    Thread Starter New Member

    Feb 19, 2013
    7
    1
    Thanks, I guess it would need de-bounce if I wanted to read it with a Arduino, or PIC?

    In any case, I am a collector of electronic parts. I didn't start out that way, but since I never through a useful part away, I guess I am a collector. I came across a porcelain acorn tube socket last night. I must have had it from the 70's when I was messing with old CB radios. They were old in the 70's, that would make them ancient today. :)
     
  9. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    By its very nature, quadrature encoding of rotary position does not need to be de-bounced. Debouncing is intrinsic because only one of the two bits is poised to transition; the other is firmly a one or zero...
     
  10. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    But quadrature encoders have to be constantly mobile in order to count a value, as opposed to an absolute style of encoding where a static position can be read ??
    The OP appears to be talking about a rotary switch?
    Max.
     
  11. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    No, the 2meter Ham rig and the HF rig on my radio bench both have a quadrature encoders for setting the VFO/Channel memory and other operating parameters. I haven't touched either, the knobs have been stationary for hours, and yet I can walk up to them at any time, move them either clockwise or counterclockwise, and cause the VFO to tune up or down one step at a time.

    Incremental quadrature encoders can be static. Only if the up/down counting logic loses power do you have to re-index them to a known starting position, which would not be necessary with an absolute encoder.
     
  12. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    Well I have worked with quadrature encoders since the developments by Ferranti-Packard back in the 60's/70's and have yet to come across a standard quadrature encoder that stores an absolute value, particularly after power off etc, without the use of external storage or processing that is.
    I have a fairly large inventory of different makes right now and none have the ability to output anything but 2 quadrature outputs at power up.
    The application you mention retains it, but what happens if you turn the equipment off?
    It sounds to me as though all you are doing is using it to increment an already stored or entered oscillator value recorded or tuned by the equipment in question.
    Max.
     
  13. Joe_M

    Thread Starter New Member

    Feb 19, 2013
    7
    1
    The switches I have can be read with power off, and they will retain the value they have for eternity. They are mechanical switches that have 4 layers of contacts, each layer makes and breaks contact between two common pins. Each pair of disks is tied to one common. What puzzles me, is that of the four outputs, there are two commons, one for each pair of outputs. So to read the switch via a micro-controller, it would take 6 leads. As each pair has to be compared to its own common. If the commons were tied together, it would short one pair of switch contacts with the other pair.

    As far as what Mike and Max are debating, I see both points, one could be that the settings are saved into memory and read out when the power is on. The thing that makes me think that is not the case is that memory reads and writes would be many, and the process would require a lot of processor time, reading and wring to memory on every click, just in case the next click is power off.
    On the other hand, If the switch has 16 possible combinations, and it retained those values during power outage, the volume could be turned all the way up, and you would not know until you applied power. That is not any condition that I have ever noticed. When my radios are off, the switches and buttons do nothing. Except for power on. So it is more likely that the encoders simply output pulses that are counted, and stored. I guess if the power down were under processor control, it could write the values on exit.
     
  14. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    I am guessing that this is a multi stack wafer switch made by the likes of Grayhill etc, who also make the usual BCD, HEX, and other various combinations etc, they also make custom to OEM spec.
    Being a simple contact closure item/switch, it should be possible to work out or record the various combinations at each rotary position.
    Max.
     
  15. Joe_M

    Thread Starter New Member

    Feb 19, 2013
    7
    1
    Yes, that is what I found, there are four contacts plus 2 commons, one for each side of the switch. Each opens and closes like this 1, 2, 4, 8 , so the first opens and closes every 1 click, the second every 2 clicks, then 4, and last;y 8. As I said, the odd thing is that 1 and 4 have a separate common than 2 and 8 So each common is sandwiched between two contact wheels. They came from a commercial radio.
     
Loading...