Skip to content

Switches

Published On:
Jan 13, 2025
Last Updated:
Jan 15, 2025

Switches (mechanical) are electro-mechanical components which electrically connect and disconnect pins.

DIP Switches

DIP switches are a group of mechanical switches that are grouped together in a single DIP package. The older versions where through-hole and used the DIP package and thus the DIP name, however these days you can also purchase SMD versions (the “DIP switch” name is still used). This is a placeholder for the reference: th-and-smd-4-pos-dip-switches shows examples of standard through-hole and SMD DIP switches.

Examples of DIP switches. Left: TE Connectivity 1825057-3, a through-hole 4 position DIP switch. Right: TE Connectivity 1825058-7, a SMD 4 position DIP switch.1 2

DIP switches are designed for signalling, and are commonly used for configuring electronic devices at manufacturing or installation time (and sometimes allowing the user to configure it also). DIP switches can be used to:

A schematic showing how a DIP switch is typically connected to a microcontroller using pull-up resistors and standard GPIO pins configured as inputs.

They are a good way of allowing for multiple product variants to be supported without having to change either the PCB design of the firmware.

Schematic Symbols

DIP switches are often represented in schematics by just using an array of the simple switch symbol. This is a placeholder for the reference: dip-switch-schematic-8-position shows a common schematic symbol for a 8 position DIP switch.

A common schematic symbol for a 8 position DIP switch.

Number of Positions

The number of positions is the number of individual switches in the DIP switch. Typically this ranges from 2 to 24, with 4, 8 and 12 being some of the most common sizes.

Voltage and Current Ratings

DIP switches are designed for signalling, and thus are not rated for high voltage or current applications. The maximum current rating of each switch is usually around 25-100 mA. The maximum voltage rating is usually 12-30 VDC.3

Actuator Style

DIP switches are available with a number of different actuator styles. The actuator is the part of the switch that is moved by the user to select a position. The styles are:

  • Slide: The actuator slides linearly between two positions. This is the most common style. There are two sub-styles for the slide style, depending on the shape of the actuator:
    • Flat: The actuator does not protrude from the switch body. These typically require a small screwdriver to actuate, and make it harder for a user to accidentally change the position by hand.
    • Convex: The actuator protrudes from the switch body. These are designed to be actuated by a finger nail (or screwdriver tip).
  • Piano key: The actuator is a protruding lever which is pressed down to switch the position. This has two positions (i.e. binary), just like the slide style.
  • Rotary: The actuator rotates to select the position. This style typically has more than two position, with 10 (BCD) or 16 (hex) being common. See the Rotary DIP Switches section for more information.

These styles are shown in This is a placeholder for the reference: dip-switch-actuator-types.

Examples of the different actuator styles for DIP switches.

Rotary DIP Switches

Rotary DIP switches are a type of DIP switch where the actuator rotates rather the sliding linearly between two positions. Rotary DIP switches often only come with a single switching element per device, due to the larger size of each actuator. This is a placeholder for the reference: rs-te-connectivity-mrssv1dc16smjtr-hex-rotary-switch shows a 16 position hex rotary DIP switch.

A 3D render of the TE Connectivity MRSSV1DC16SMJTR, a 16 position hex rotary DIP switch from their MRSS series. It is designed to be actuated by a screwdriver.4

Rotary DIP switches output a digital signal on a number of leads depending on the selected position. The output pins are typically numbered “1”, “2”, “4”, “8”, etc to indicate how much they “add” to the output. “1” is the least significant bit, and “8” is the most significant bit. There are a number of different output patterns, including:

  • Real code: The output is the direct binary representation of the position. E.g. selecting position “A” would result in pin 8 = 1, pin 4 = 0, pin 2 = 1, pin 1 = 0.
  • Compliment code: The output is the inverse of the real code. E.g. selecting position “A” would result in pin 8 = 0, pin 4 = 1, pin 2 = 0, pin 1 = 1.
  • Gray code: Follow the Gray code sequence (a.k.a. reflected binary code or RBC5) and ensures that only one bit changes at a time. Gray coding is useful for preventing momentary spurious outputs when changing positions.

This is a placeholder for the reference: mrss-rotary-dip-switch-code-types shows the code types available for the TE Connectivity MRSS series of rotary DIP switches.

The code types available for the TE Connectivity MRSS series of rotary DIP switches. Both BDC (10 position) and hex (16 position) variants are available.6

The DigiKey DIP switch category can be found here.

Further Reading

  • If you want to control a mechanical switch using an electrical signal, you could use a mechanical relay. If you want no moving parts (i.e. purely electronic), and still need the isolation and current handling capacities of a relay, you could use a solid state relay.
  • If you were looking for low-power two-way analogue electrical switching, you could use a analogue switch (transmission gate).
  • If you are looking to electronically switch a circuit from another electrical signal (not two way) and don’t need isolation, you can use a transistor. A MOSFET or BJT might be suitable (both are common forms of transistors).

Footnotes

  1. DigiKey. Product Index > Switches > DIP Switches > TE Connectivity ALCOSWITCH Switches 1825057-3 [product page]. Retrieved 2025-01-13, from https://www.digikey.com/en/products/detail/te-connectivity-alcoswitch-switches/1825057-3/969174.

  2. DigiKey. Product Index > Switches > DIP Switches > TE Connectivity ALCOSWITCH Switches 1825058-7 [product page]. Retrieved 2025-01-13, from https://www.digikey.com/en/products/detail/te-connectivity-alcoswitch-switches/1825058-7/1021543.

  3. DigiKey. DIP Switches [product category]. Retrieved 2025-01-13, from https://www.digikey.com/en/products/filter/dip-switches/194.

  4. RS Components. Switches > DIP & Rotary Encoded Switches > DIP & SIP Switches > TE Connectivity 16 Way Surface Mount Rotary Switch 16P, Screwdriver Actuator [product page]. Retrieved 2025-01-14, from https://nz.rs-online.com/web/p/dip-sip-switches/2602246P.

  5. Wikipedia. Gray code [article]. Retrieved 2025-01-14, from https://en.wikipedia.org/wiki/Gray_code.

  6. TE Connectivity. MRSS - Miniature Rotary Switch Series [datasheet]. Retrieved 2025-01-14, from https://docs.rs-online.com/6e03/A700000009450073.pdf.