Stufin
Home Quick Cart Profile

Slide Switch 3 Pin 2 Way SPDT

Buy Now on Stufin

Component Name

Slide Switch 3 Pin 2 Way SPDT

Description

The Slide Switch 3 Pin 2 Way SPDT is a type of electromechanical switch used to control the flow of electrical current in a circuit. It is a simple, yet versatile switch that allows users to toggle between two states, often referred to as "on" and "off". This switch is commonly used in various IoT devices, such as robotics, automation systems, and electronic projects.

Functionality

The Slide Switch 3 Pin 2 Way SPDT operates by sliding a mechanical actuator to connect or disconnect the electrical circuit. The switch has three terminals
Common (COM)This terminal is connected to the input power source.
Normally Open (NO)This terminal is connected to the output circuit when the switch is in the "on" position.
Normally Closed (NC)This terminal is connected to the output circuit when the switch is in the "off" position.

When the switch is slid to the "on" position, the COM terminal connects to the NO terminal, allowing the electrical current to flow through the circuit. When the switch is slid to the "off" position, the COM terminal connects to the NC terminal, interrupting the electrical current flow.

Key Features

2-Position OperationThe switch has two distinct positions, allowing users to toggle between two states.
3-Pin ConfigurationThe switch has three terminals, making it easy to integrate into a variety of circuits.
SPDT (Single Pole Double Throw) ArchitectureThe switch can connect the common terminal to either the normally open or normally closed terminal, depending on the position of the actuator.

Compact Design

The switch has a small form factor, making it suitable for use in space-constrained applications.

Durable Construction

The switch is built with durable materials, ensuring long-term reliability and resistance to wear and tear.

Easy Actuation

The slide mechanism provides a smooth, tactile feedback, making it easy to operate the switch.

Voltage Rating

12V DC (maximum)

Current Rating

2A (maximum)

Contact Resistance

10m (maximum)

Operating Temperature

-20C to +70C

Storage Temperature

-40C to +85C

Durability

10,000 cycles (minimum)

Applications

IoT devices, such as robots, drones, and automation systems

Electronic projects, such as homemade robots, alarm systems, and LED circuits

Industrial control systems, such as motor control and lighting control

Medical devices, such as patient monitoring systems and medical imaging equipment

Caution

Ensure proper handling and installation to prevent damage to the switch or surrounding components.

Avoid exceeding the recommended voltage and current ratings to prevent overheating or electrical shock.

Regularly inspect the switch for signs of wear and tear, and replace it if necessary.

Pin Configuration

  • Slide Switch 3 Pin 2 Way SPDT Documentation
  • Overview
  • The Slide Switch 3 Pin 2 Way SPDT is a type of electromechanical switch commonly used in various IoT applications, such as robotics, automation, and DIY projects. It features a compact 3-pin design and provides a simple, intuitive way to switch between two circuits or states.
  • Pinout
  • The switch has three pins, each with a specific function:
  • Pin 1: Common (COM) Pin
  • Function: Connects to the common input/output of the switch
  • Description: This pin is the central connection point for the switch, providing a common path for the two possible output states
  • Pin 2: Normally Open (NO) Pin
  • Function: Connects to one of the two possible output states
  • Description: This pin is normally open, meaning it is not connected to the common pin when the switch is in its default position
  • Behavior: When the switch is slid to the "on" position, the NO pin connects to the COM pin, completing the circuit
  • Pin 3: Normally Closed (NC) Pin
  • Function: Connects to the other possible output state
  • Description: This pin is normally closed, meaning it is connected to the common pin when the switch is in its default position
  • Behavior: When the switch is slid to the "off" position, the NC pin connects to the COM pin, completing the circuit
  • Connection Structure
  • Here's a step-by-step guide to connecting the pins:
  • 1. Connect the device or circuit to be controlled to the Normally Open (NO) Pin:
  • Connect one end of the device or circuit to Pin 2 (NO)
  • This will ensure that the device is turned on or activated when the switch is slid to the "on" position
  • 2. Connect the device or circuit to be controlled to the Normally Closed (NC) Pin:
  • Connect one end of the device or circuit to Pin 3 (NC)
  • This will ensure that the device is turned off or deactivated when the switch is slid to the "off" position
  • 3. Connect the power source or signal to the Common (COM) Pin:
  • Connect the power source or signal to Pin 1 (COM)
  • This will provide the necessary power or signal to the device or circuit when the switch is in either position
  • Example Connection Diagram
  • Here's an example connection diagram for a basic LED circuit:
  • ```
  • +---------+
  • | Power |
  • | Source |
  • +---------+
  • |
  • |
  • v
  • +---------+ +---------+
  • | COM Pin | | LED |
  • | (Pin 1) | | |
  • +---------+ +---------+
  • | |
  • | |
  • v v
  • +---------+ +---------+
  • | NC Pin | | Resistor |
  • | (Pin 3) | | |
  • +---------+ +---------+
  • | |
  • | |
  • v v
  • +---------+ +---------+
  • | NO Pin | | GND |
  • | (Pin 2) | | |
  • +---------+ +---------+
  • ```
  • In this example, the power source is connected to the COM pin, the LED is connected to the NO pin through a resistor, and the ground connection is made to the NC pin. When the switch is slid to the "on" position, the LED turns on, and when it's slid to the "off" position, the LED turns off.

Code Examples

Slide Switch 3 Pin 2 Way SPDT Documentation
Overview
The Slide Switch 3 Pin 2 Way SPDT is a type of electromechanical switch that allows users to toggle between two circuits or states. It features three pins: one common output pin and two input pins. The switch has a simple, intuitive design, making it easy to integrate into various IoT projects.
Pinout
Pin 1: Common Output (COM)
 Pin 2: Input 1 (NC - Normally Closed)
 Pin 3: Input 2 (NO - Normally Open)
Operating Principle
The slide switch operates by connecting the common output pin (COM) to either input pin 2 (NC) or input pin 3 (NO) depending on the switch position. When the switch is in the "off" position, the COM pin is connected to the NC pin. When the switch is in the "on" position, the COM pin is connected to the NO pin.
Code Examples
### Example 1: Basic Toggle Switch using Arduino
In this example, we'll use the slide switch to toggle an LED on and off.
Hardware Requirements
Slide Switch 3 Pin 2 Way SPDT
 Arduino Board (e.g., Arduino Uno)
 LED
 220 Ohm Resistor
 Breadboard
 Jumper Wires
Code
```c++
const int ledPin = 13;  // Choose a digital pin for the LED
const int switchPin = 2;  // Choose a digital pin for the switch
void setup() {
  pinMode(ledPin, OUTPUT);
  pinMode(switchPin, INPUT);
}
void loop() {
  int switchState = digitalRead(switchPin);
  if (switchState == HIGH) {
    digitalWrite(ledPin, HIGH);  // Turn the LED on
  } else {
    digitalWrite(ledPin, LOW);  // Turn the LED off
  }
}
```
### Example 2: Debounced Switch using Raspberry Pi (Python)
In this example, we'll use the slide switch to control a Python script on a Raspberry Pi. We'll also implement debouncing to prevent false switch triggers.
Hardware Requirements
Slide Switch 3 Pin 2 Way SPDT
 Raspberry Pi (e.g., Raspberry Pi 4)
 Breadboard
 Jumper Wires
Code
```python
import RPi.GPIO as GPIO
import time
# Set up GPIO mode
GPIO.setmode(GPIO.BCM)
# Define switch pin and led pin
switch_pin = 17
led_pin = 23
# Set up switch pin as input with pull-up
GPIO.setup(switch_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(led_pin, GPIO.OUT)
# Debounce time in milliseconds
debounce_time = 50
while True:
    # Read switch state
    switch_state = GPIO.input(switch_pin)
# Debounce logic
    if switch_state == GPIO.LOW:
        time.sleep(debounce_time / 1000)
        if GPIO.input(switch_pin) == GPIO.LOW:
            # Switch is pressed, toggle LED
            GPIO.output(led_pin, not GPIO.input(led_pin))
# Wait for a short period before checking again
    time.sleep(0.01)
```
These examples demonstrate the basic usage of the Slide Switch 3 Pin 2 Way SPDT in different contexts. You can adapt these examples to fit your specific IoT project requirements.