The Basics of DIP Switches

DIP – or dual inline package – switches have been in use since the 1970s. They are widely utilized to enable OEMs and end customers to change the functionality of Electronic devices after they have been manufactured. DIP switches are often used to set region codes for equipment that must work in different ways in different places, to change which radio channel a garage-door opener uses, or to tell a PC motherboard what kind of memory has been plugged into it.

DIP switch basics

The DIP switch is made up of a set of switches in a single unit, usually mounted on a PCB or breadboard. The switch’s very basic operation, in which the switch’s position must be set manually, means that its status is easy to determine during system start-up, unlike, for example, a membrane keypad that must be polled by a microcontroller. This simplicity makes the DIP switch ideal for providing input to basic system firmware ­since it does not take much computing power to determine whether a switch is closed or not.

The simplicity, flexibility, and low cost of DIP switches have ensured their continuing use in many electronics applications. They come in many sizes, configurations, styles, and power ratings.

Customers can choose the number of positions on their DIP switch based on the configuration need of their application. Some DIP switches can be actuated by hand, while others require a special tool or screwdriver to change the switch position.

The Basics of DIP SwitchesFigure 1: Example of a common DIP switch. (Image source: CUI Devices)

As with any switch, designers must specify how many ‘poles’ and ‘throws’ it must have. A single pole single throw (SPST) switch can either be closed, enabling the flow of current through it, or open, blocking that flow (See Figure 2).

circuit diagram” alt=”The Basics of DIP Switches”>Figure 2: SPST circuit diagram. (Image source: CUI Devices)

A single pole double throw (SPDT) switch is used to select between two different paths along which a current can flow as shown in Figure 3. The single ‘pole’, on the left in the diagram, has two terminal options on the right where the current can be ‘thrown’ or redirected.

circuit diagram” alt=”The Basics of DIP Switches”>Figure 3: SPDT circuit diagram. (Image source: CUI Devices)

Double pole, double throw (DPDT) switches control two circuits using two switches that are mechanically interconnected. When the position of one pole is changed, the other changes in the same way as shown in Figure 4. Each pole changes the direction of the current it is carrying to a different path in its circuit. This approach can be expanded so that several switches are paired together to enable multiple poles and multiple throws.

circuit diagram” alt=”The Basics of DIP Switches”>Figure 4: DPDT circuit diagram. (Image source: CUI Devices)

The number of switches in a package depends on the application and commonly ranges from 1 to 16 positions. A common DIP switch package has eight positions because it can be set in 256 different ways, which is equivalent to the 256 binary values expressed in an eight-bit byte. For more on switch functions and common switch types, read CUI Devices’ article on the Fundamentals of Switches.

Common DIP switch types

There are various types of DIP switches, each named for the way they are operated, including slide actuators, piano actuators, rotary actuators, and so on.

Slide DIP switches typically have two positions – either closed or open, on or off, 1 or 0 – and act as an SPST switch. There are also slide DIP switches with three positions, the middle of which is usually neutral. Contacts at each end of this type of switch means that it can be configured as on/off/on with the actuator moving between its two sides.

DIP switches can be configured so that their contacts are normally open, completing a circuit when actuated, or normally closed, breaking a circuit when actuated.

The Basics of DIP SwitchesFigure 5: 8-position slide DIP switch. (Image source: CUI Devices)

DIP switches are often used on boards that will be mounted in tight enclosures, so their shape and size as well as the way in which the actuators move is critical to enabling easy operation. For example, piano DIP switches offer the same functionality as slide DIP switches, but mount the switches horizontally, so that they can be actuated by an up and down motion. This contrasts the standard DIP switch which mounts the switches horizontally, allowing for actuation via a forward and backward motion.

The Basics of DIP SwitchesFigure 6: 8-position piano DIP switch with its up and down actuators. (Image source: CUI Devices)

Rotary DIP switches have an actuator that can be rotated between several positions, often using a knurled knob with a screwdriver slot in the top. As a user rotates the actuator, the output of the switch is changed between its various positions.

The Basics of DIP SwitchesFigure 7: Rotary DIP switches with flat or raised actuators. (Image source: CUI Devices)

The advantage of these DIP switches is that they can be used to encode quite a lot of information, and so board makers can use them to offer many options. For example, a rotary DIP switch with four output pins can produce up to 16 different output configurations in binary code – handy for setting hex values. Figure 8 shows a hexadecimal code chart for a 16-position rotary DIP switch with numbers 0 to 9 and letters A to F represented.

The Basics of DIP SwitchesFigure 8: Hexadecimal code chart for a 16-position rotary DIP switch. (Image source: CUI Devices)

Other styles of rotary DIP switches can be configured to act as an SPDT device with two, three, or four throws for a single pole. This could be used, for example, to route a single signal to up to four different destinations, dependent on the DIP switch’s setting.

The key specifications of DIP switches

DIP switches are simple, but that does not mean that they can be treated as having completely interchangeable specifications. To choose the best DIP switch for your application, seek out the manufacturers’ datasheets for competing parts and compare factors such as the number of positions and actuator type of the switch, as well as those shown in Table 1.

Specification Typical Offering Description
Mounting Style Surface or through-hole Surface-mounted DIP switches are suitable for PCBs. Through hole versions are used on breadboards.
Termination Style Gull wing, angled gull wing, J-hook gull wing, PC pin, and crimped PC pin These enable different mounting options.
Voltage Rating 2.4 to 50 VDC The maximum switching and non-switching voltages across the device. The switching rating refers to situations when the actuator is moving from one position to the next. The non-switching rating refers to situations in which the actuator is stationary. This rating is usually higher than the switching rating.
Current Rating 10 to 200 mA Maximum current through the device.
Pitch 1 to 2.54 mm or 0.039 to 0.1 inch The distance between the centers of the two pins.
IP Rating Rated or non-rated Gives an indication of the extent to which a DIP switch will resist moisture and dust ingress.

Table 1: Specifications to consider when choosing a DIP switch.

These specifications may seem simple, but they are important. Using a DIP switch in ways that are outside of its specified performance can lead to problems such as the formation of arcs between contacts (bad) or even contacts welding themselves shut (worse). Both behaviors can create safety issues, as well as potentially rendering a system inoperable.


DIP switches have been used to configure devices for decades and now have even been used to preconfigure IoT devices before they are deployed in the home or factory to limit downtime. Other common applications included programming garage door openers and remote controls, configuring PC motherboards, and enabling tests on industrial equipment without powering up the equipment.

There are many other forms of DIP switches. What they have in common is a combination of simplicity, flexibility, and low cost that means that they will continue to find new uses and applications. CUI Devices offers a range of DIP switches in slide, piano, and rotary actuator types to suit a variety of design needs.