New to electronics, tackling a project that involves a switch matrix. Having grasped the concept of regular button matrices and modifier keys, it’s time to move on to explore alternative types of switches, such as rotary and slider switches. However, I came across the following issue:


Why does this happen? At first I wondered if this was some sort of manifestation of the ghosting phenomenon that I read about when learning about regular button matrices, but I’m doubtful: if I think about this wiring, if I had hooked up the first legs of button switches to the same Row1, and their second legs individually to Column1 and Column2 respectively, then I would only be getting one registered key press at a time. What makes this rotary switch wiring different?

(I thought I wouldn't need to wire all 11 positions until I get the principle to work with the bare minimum first.)

  • 2
    \$\begingroup\$ There are make before break and break before make switches - each have their use. Can't tell if your observation is correct per spec or not as there is no datasheet linked. \$\endgroup\$ – Arsenal Jan 31 '18 at 15:53
  • \$\begingroup\$ @Arsenal I'm having a hard time finding a data sheet because I can't find any markings on the component. But it looks exactly identical to this: chinadaier.com/rbs-1-rotary-switch/#1497680887430-8ec64b92-d87b the only difference is that the terminals don't have looped ends, and there is a hole and no pin in the location where position 12 should be. (See Download tab) \$\endgroup\$ – user158589 Jan 31 '18 at 16:06
  • \$\begingroup\$ a rotary switch can also suffer from switch bounce \$\endgroup\$ – jsotola Feb 1 '18 at 1:50
  • \$\begingroup\$ what about C1 and C3? \$\endgroup\$ – jsotola Feb 1 '18 at 1:50
  • \$\begingroup\$ @jsotola please see my own answer post, I think it indirectly answers to what happens with C1 and C3: Activity will be observed in whichever two positions, one of them being the position that gets switched on, and the other one the one that gets switched off as you "leave" from that position. I came across the term 'bounce' at some point but didn't get acquainted just yet, maybe I should now because it starts to get relevant. Articles on the concept seem to be easy to find. \$\endgroup\$ – user158589 Feb 1 '18 at 11:48

enter image description here

Figure 1. The "make before break" switch. Note the wiper (1) will bridge the adjacent contacts (2) when switching from one position to another.

These switches are used when you want to avoid disconnecting the signal completely when switching from one position to another. e.g., If your switch was used as a volume control with a chain of resistors wired between each contact tab then this will give a glitchless switching whereas a break-before-make switch will disconnect the audio momentarily resulting in a glitch.

The break-before-make variant will have a gap between contacts (2 above) to prevent short-circuiting.

I programmed three distinctly different sounds to play back per each rotary position, and indeed, they never play simultaneously, only one at a time, upon 'arrival'.

Without a schematic diagram I can't comment on what you have done here.

  • \$\begingroup\$ Thanks, that's a very good explanation of the difference. It would be strange for a volume dial to move in rigid notches or indeed cut off the sound completely every time it was adjusted, hence the wheel movement feels almost smooth. My rotary switch looks identical to that in the picture (except, no loops in pins). I believe that I have chosen the correct type for the project because in my plan, I'll be setting a slider switch and rotary dial positions first, and only then pressing a button that will perform a one time action depending on the chooser switches' positions. \$\endgroup\$ – user158589 Feb 1 '18 at 11:35
  • \$\begingroup\$ And on quoting my answer post; All I really mean is this: image.ibb.co/mDwWom/Issue2.jpg And these sound files are just for feedback purposes, not the type of thing that I will actually use the switch for. \$\endgroup\$ – user158589 Feb 1 '18 at 11:42

I connected a third throw to test how many things happen whenever the position is changed: is it always two, or as many as there are connected throws. With three connected, apparently it's still just two that activate, not three. That's an important clue.

On a closer inspection from the programming interface, it appears that the observed activity that happens in two positions simultaneously is not identical: The other activity is that switch going to ON position, and the other switch going to OFF position, as should be. For a further test, I programmed three distinctly different sounds to play back per each rotary position, and indeed, they never play simultaneously, only one at a time, upon 'arrival'.

Where I first observed the phenomenon that multiple key presses were being registered, it only indicates that actuating has happened, but it doesn't say if it's ON or OFF. Having used this with push buttons only up to now, I was under the impression that actuating indicators blink only when the button is switched to ON position. Now that I think of it, it's silly to assume that it wouldn't be equally important to report OFF messages: some types of switches are normally open, and being off is the state that's exceptional!

  • \$\begingroup\$ I don't think this is an answer to your question. Shouldn't you have added the information to your original post as an update? \$\endgroup\$ – Transistor Jan 31 '18 at 18:43
  • \$\begingroup\$ @Transistor Is it not though? The questions in my starting post were “why does this happen?” and “what makes this rotary switch wiring different (from a matrix of button switches)?”, and in this answer I have explained in detail why I observed two events instead of one, and there indeed isn’t anything different about the wiring as compared to buttons. Because I had an incorrect analysis of what I saw happening in the first place, and the means of arriving to a more correct conclusion, too, is clarified in this answer post. \$\endgroup\$ – user158589 Jan 31 '18 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.