This 10-position Rotary Switch from Sparkfun Electronics (product number 13253) allows for 10 different states to be read from a single center spoke. A breakout board for this rotary switch can be purchased separately at this link and this tutorial shows how to put the two together. This switch can be used on higher voltage projects as it can handle a maximum voltage of 125VAC at 0.3A with a dialectic strength of up to 250VAC.
In this particular rotary switch, the knob (actuator) is rotated around a 0.9″ diameter base over 10 pins evenly placed over 3/4 of the diameter at each at a 30° angle. To rotate between these ten positions the knob can be turned both clockwise and counterclockwise, but only between for 3/4 of the diameter. The knob does not revolve 360°, therefore remaining 1/3 of the base is not part of the rotation of the knob. To get from pin 1 to pin 10, the knob must be turned in the opposite direction.
Rotary switches come in a range of sizes, from 3 positions to over 20 positions. Digi-Key is a great resource that offers a wide variety of rotary switches with various positions and max amperage options.
This site visually breaks down a single pole rotary switch quite nicely, labeling out the main parts of the switch.
The data sheet for Sparkfun’s 10-position Rotary Switch can be found at this link. Here is a summary of the specs:
- 1 pole, 1 deck
- Max Voltage: 125V at 0.3A
- Contact Resistance: 50 mΩ (maximum)
- The data sheet notes that after an operating life test of no load, the requirement is <200mΩ and after an operating life test with a load of 125VAC, the requirement is <500mΩ
- Insulation Resistance: 500DAC, 100 MΩ (minimum)
- The data sheet notes that after an operating life test of no load, the requirement is >50MΩ
- Rotation Torque: 1.0 +- 0.5 kg/cm torque required to turn
- Angle Between Positions: 30°
- Withstand Voltage: The Sparkfun description says its dielectric strength is 250VAC.
- The data sheet notes that it is 500VAC (per 1 minute), and the 250VAC accounts for is for operating life after the operating life test with with a load and without a load.
*Manufactured by Taiwan Alpha Electronic Co., LTD, Reference Number:SP14040026
With their keen ability to control specific state changes, rotary switches are a very common switch embedded in many every-day appliances including the radio, television sets, blenders, multimeter, lamps, automobiles and electronic and industrial equipment. Electronic equipment benefited from the reliability of the rotary switch. In automotive vehicles, rotary switches control everything from the AC to the lights and radio. Radios themselves have traditionally been equipped with rotary controllers.
Rotary switches are very common and found almost everywhere, even the kitchen sink.
Strengths and Weaknesses
Rotary switches generally offer reliable results. One strength of this switch particular rotary switch is that it has a high maximum withstand voltage of 125VAC. This rotary switch has the ability to control 10 circuits via one centralized knob, which puts a lot of control in one convenient place, however by switching between these states, it only allows for one particular connection to be high at one time. There are rotary switches that can control multiple poles at once with multiple decks. Check out this 1960 patent!
This rotary switch is a “shorting” style connection, which means that there is a narrower connection between switch changes and less chance for arcing (or sparking) in the connection changes. However, this type of connection might not be as beneficial when using the output pins as logic, as there may be a momentary contradictory read on the pins.
And again, this particular switch offers 10 states. If you needed more, there are other options available at places like Mouser and Digi-Key. (There are also coded rotary switches that noted as being very reliable.)
Example Circuit Schematics
Sample Microcontroller Code
There are no hard examples on the Sparkfun website for using the rotary switch on its own or with the rotary switch breakout board. There is this basic thread on the Arduino site. I was also able to find this sample code used for a project at the Global Game Jam.
I wrote this sample code that should work: