A rotary switch lets you select one of several circuit positions by turning a knob. It is the go-to component whenever you need multi-position selection — fan speed regulators, band selectors in radios, and mode selection in test equipment all rely on rotary switches.
How a Rotary Switch Works
Inside a rotary switch, a central rotor with a contact wiper turns within a ring of fixed contacts. As you rotate the knob, the wiper connects the common terminal to one of the output terminals. A detent mechanism (spring-loaded ball) clicks into notches to give you firm, defined positions.
Each click position corresponds to one electrical connection. The switch can have anywhere from 2 to 12 positions, and some specialised rotary switches support even more.
Types of Rotary Switches
Single-Deck vs Multi-Deck
A single-deck rotary switch has one layer of contacts. A multi-deck (wafer) switch stacks multiple layers on the same shaft, allowing you to switch several independent circuits simultaneously with a single knob.
Shorting vs Non-Shorting
- Non-shorting (break-before-make) — The wiper disconnects from the current position before connecting to the next. This is the standard type.
- Shorting (make-before-break) — The wiper briefly connects to both positions during rotation. Used in audio to avoid pops and clicks during switching.
Poles and Positions
Rotary switches are specified by poles (P) and positions (T for “throw” or “position”):
- 1P12T — 1 pole, 12 positions. One input, 12 selectable outputs.
- 2P6T — 2 poles, 6 positions. Two independent circuits, each with 6 selectable outputs.
- 3P4T — 3 poles, 4 positions. Three independent circuits, 4 positions each.
The total number of solder terminals = (poles x positions) + poles (common terminals).
Wiring a Rotary Switch with Arduino
To read a rotary switch position with Arduino:
- Connect the common terminal to GND.
- Connect each position terminal to a digital pin with the internal pull-up enabled.
- In your code, scan all connected pins. The pin reading LOW is the current position.
For switches with many positions, consider using an analogue approach: create a resistor divider network so each position produces a unique voltage, then read it with a single analogue pin.
// Read a 4-position rotary switch on analog pin A0
int val = analogRead(A0);
int position;
if (val < 256) position = 1;
else if (val < 512) position = 2;
else if (val < 768) position = 3;
else position = 4;
Common Applications in India
- Ceiling fan regulators — The traditional 4 or 5-speed fan regulator in Indian homes uses a rotary switch with a stepped resistance network.
- Multimeters — The range/function selector on analogue and digital multimeters is a multi-deck rotary switch.
- Guitar amplifiers — Channel select and tone shaping use rotary switches.
- Industrial panel boards — Selector switches for mode selection (manual/auto/off).
- DIY projects — Mode selection for Arduino-based devices, MIDI controllers, and LED pattern selectors.
Recommended Products from Zbotic
5A 3 Pin SPDT Toggle Switch
Mini Panel Mount DPDT Toggle Switch (Pack of 5)
1K Ohm 0.25W Carbon Film Resistors (Pack of 100)
Frequently Asked Questions
How many positions can a rotary switch have?
Standard rotary switches come in 2 to 12 positions. Some adjustable rotary switches let you set a physical stop to limit rotation to fewer positions than the maximum.
Can I use a rotary encoder instead of a rotary switch?
Yes, but they work differently. A rotary switch selects discrete positions, while a rotary encoder outputs pulses as you turn it. Encoders are better for continuous adjustment (volume control), while rotary switches are better for mode selection.
What is the difference between a rotary switch and a potentiometer?
A potentiometer provides a continuously variable resistance. A rotary switch provides discrete, fixed connections. If you need defined steps (like fan speeds), use a rotary switch. If you need smooth adjustment (like dimming), use a potentiometer.
How do I reduce noise in rotary switch circuits?
Add 100 nF ceramic capacitors between each position terminal and ground. For digital circuits, also add software debouncing with a 50 ms delay after detecting a position change.
Build Better Selector Circuits
Find switches, resistors, and prototyping supplies at Zbotic.in!
Add comment