Stufin
Home Quick Cart Profile

DPDT Switch

Buy Now

Component Name

DPDT Switch

Description

A DPDT (Double Pole Double Throw) switch is an electrical component that allows an electrical circuit to be connected or disconnected from two separate circuits. It is a type of switch that has two input terminals, two output terminals, and a common terminal, enabling it to control two separate circuits simultaneously.

Functionality

The primary function of a DPDT switch is to act as an electrical switch that can connect or disconnect two separate circuits. When the switch is in the "on" position, it connects the common terminal to one set of input and output terminals, and when it is in the "off" position, it connects the common terminal to the other set of input and output terminals. This allows the switch to control the flow of electrical current between the two circuits.

Key Features

  • Double Pole: The switch has two separate circuits, each with its own input and output terminals, allowing it to control two separate circuits simultaneously.
  • Double Throw: The switch has two positions, "on" and "off", which enables it to connect the common terminal to either of the two input and output terminals.
  • Common Terminal: The switch has a common terminal that acts as a reference point for the two circuits, allowing the switch to connect or disconnect the circuits.
  • Isolation: The switch provides electrical isolation between the two circuits when in the "off" position, ensuring that there is no electrical connection between the two circuits.
  • Operating Voltage: DPDT switches can operate at a wide range of voltages, from low-voltage applications to high-voltage industrial applications.
  • Current Rating: The switch has a specific current rating, which determines the maximum amount of electrical current it can handle.
  • Physical Construction: DPDT switches are available in various physical constructions, including toggle switches, push-button switches, and rocker switches.
  • Mounting Options: The switch can be mounted on a printed circuit board (PCB), a panel, or a DIN rail, depending on the application.

Applications

  • Industrial Automation: DPDT switches are used in industrial automation applications to control motors, solenoids, and other devices.
  • Audio and Video Equipment: DPDT switches are used in audio and video equipment to switch between different inputs or outputs.
  • Medical Devices: DPDT switches are used in medical devices to control electrical circuits and ensure patient safety.
  • Home Appliances: DPDT switches are used in home appliances, such as refrigerators, air conditioners, and washing machines, to control electrical circuits.

Operating Voltage

12V to 240V AC/DC

Current Rating

1A to 10A

Contact Resistance

<10

Insulation Resistance

>100M

Operating Temperature

-20C to 85C

Dimension

Varies depending on the physical construction

Certifications and Compliance

UL (Underwriters Laboratories) certification

CE (Conformit Europene) certification

RoHS (Restriction of Hazardous Substances) compliance

REACH (Registration, Evaluation, Authorization, and Restriction of Chemicals) compliance

Pin Configuration

  • DPDT Switch Documentation
  • A Double Pole Double Throw (DPDT) switch is a type of electrical switch that can control two circuits simultaneously. It has six terminals, consisting of two input poles and four output throws. The switch allows the user to connect either of the two poles to either of the two throws, making it a versatile component in various IoT applications.
  • Pin Description:
  • Here's a detailed explanation of each pin on a DPDT switch:
  • Pin 1: Pole 1 (P1)
  • Function: Input pole for circuit 1
  • Description: This pin connects to one end of the first circuit or device being controlled.
  • Pin 2: Throw 1-A (T1-A)
  • Function: Output throw for circuit 1, position A
  • Description: This pin connects to one possible output of circuit 1 when the switch is in position A.
  • Pin 3: Throw 1-B (T1-B)
  • Function: Output throw for circuit 1, position B
  • Description: This pin connects to the alternative output of circuit 1 when the switch is in position B.
  • Pin 4: Pole 2 (P2)
  • Function: Input pole for circuit 2
  • Description: This pin connects to one end of the second circuit or device being controlled.
  • Pin 5: Throw 2-A (T2-A)
  • Function: Output throw for circuit 2, position A
  • Description: This pin connects to one possible output of circuit 2 when the switch is in position A.
  • Pin 6: Throw 2-B (T2-B)
  • Function: Output throw for circuit 2, position B
  • Description: This pin connects to the alternative output of circuit 2 when the switch is in position B.
  • Connection Structure:
  • Here's a step-by-step guide to connecting the pins of a DPDT switch:
  • Circuit 1:
  • 1. Connect Pin 1 (P1) to one end of the circuit or device being controlled (e.g., a sensor or an actuator).
  • 2. Connect Pin 2 (T1-A) to the output of the circuit or device when the switch is in position A.
  • 3. Connect Pin 3 (T1-B) to the alternative output of the circuit or device when the switch is in position B.
  • Circuit 2:
  • 1. Connect Pin 4 (P2) to one end of the second circuit or device being controlled (e.g., a sensor or an actuator).
  • 2. Connect Pin 5 (T2-A) to the output of the second circuit or device when the switch is in position A.
  • 3. Connect Pin 6 (T2-B) to the alternative output of the second circuit or device when the switch is in position B.
  • Important Note:
  • When using a DPDT switch, ensure that the switch is properly Debounced to avoid electrical noise and incorrect switching. Debouncing can be achieved using external components or internal switch mechanisms.
  • By following this documentation, you can effectively use a DPDT switch in your IoT projects to control multiple circuits and devices with ease.

Code Examples

DPDT Switch Documentation
Overview
A Double Pole Double Throw (DPDT) switch is a type of electrical switch that can connect two independent circuits, each with two states (on/off). It has six terminals, with two poles that can be connected to two different circuits, and each pole has two throws that can be connected to either a normally open (NO) or normally closed (NC) contact. The DPDT switch is commonly used in IoT applications to control multiple devices or circuits with a single switch.
Pinout
The typical pinout of a DPDT switch is as follows:
Pole 1:
	+ Terminal 1: Common (COM)
	+ Terminal 2: Normally Open (NO)
	+ Terminal 3: Normally Closed (NC)
 Pole 2:
	+ Terminal 4: Common (COM)
	+ Terminal 5: Normally Open (NO)
	+ Terminal 6: Normally Closed (NC)
Code Examples
### Example 1: Controlling Two LEDs with a DPDT Switch (Arduino)
In this example, we will use a DPDT switch to control two LEDs, each connected to a separate circuit.
```cpp
const int led1Pin = 2;  // LED 1 connected to digital pin 2
const int led2Pin = 3;  // LED 2 connected to digital pin 3
void setup() {
  pinMode(led1Pin, OUTPUT);
  pinMode(led2Pin, OUTPUT);
}
void loop() {
  int switchState = digitalRead(4); // Switch connected to digital pin 4
if (switchState == HIGH) {
    digitalWrite(led1Pin, HIGH);
    digitalWrite(led2Pin, LOW);
  } else {
    digitalWrite(led1Pin, LOW);
    digitalWrite(led2Pin, HIGH);
  }
  delay(50);
}
```
In this example, when the switch is in one position, LED 1 is turned on and LED 2 is turned off. When the switch is in the other position, the states of the LEDs are reversed.
### Example 2: Controlling a Relay Module with a DPDT Switch (Raspberry Pi)
In this example, we will use a DPDT switch to control a relay module, which in turn controls a larger device such as a lamp or a motor.
```python
import RPi.GPIO as GPIO
# Set up GPIO mode
GPIO.setmode(GPIO.BCM)
# Set up GPIO pins
switchPin = 17
relayPin = 23
# Set up GPIO as inputs/outputs
GPIO.setup(switchPin, GPIO.IN)
GPIO.setup(relayPin, GPIO.OUT)
try:
    while True:
        switchState = GPIO.input(switchPin)
if switchState == GPIO.HIGH:
            GPIO.output(relayPin, GPIO.HIGH)
        else:
            GPIO.output(relayPin, GPIO.LOW)
# Wait for 50ms before checking the switch state again
        time.sleep(0.05)
except KeyboardInterrupt:
    # Clean up GPIO on exit
    GPIO.cleanup()
```
In this example, when the switch is in one position, the relay is turned on, connecting the larger device to the power source. When the switch is in the other position, the relay is turned off, disconnecting the device from the power source.
These examples demonstrate how a DPDT switch can be used to control multiple devices or circuits with a single switch, making it a versatile component in IoT applications.