Stufin
Home Quick Cart Profile

8 Way Slide Switch 2.54mm Pitch (Pack of 2)

Buy Now on Stufin

Component Name

8 Way Slide Switch 2.54mm Pitch (Pack of 2)

Description

The 8 Way Slide Switch 2.54mm Pitch is a type of electrical switch component designed for use in various electronic circuits and devices. This component is part of a pack of two identical switches, making it a cost-effective solution for projects requiring multiple switches. The switch features a compact design with a 2.54mm pitch, making it suitable for breadboarding, prototyping, and integration into compact devices.

Functionality

The 8 Way Slide Switch is a manual switch that allows the user to toggle between eight different connections or states. The switch features a sliding mechanism that moves between eight distinct positions, each corresponding to a specific connection or circuit path. This enables the switch to control multiple components, circuits, or devices, making it an ideal component for a wide range of applications.

Key Features

  • 8-Way Sliding Mechanism: The switch features a sliding mechanism that can be moved between eight distinct positions, allowing for the control of multiple components or circuits.
  • 2.54mm Pitch: The switch has a compact design with a 2.54mm pitch, making it suitable for breadboarding, prototyping, and integration into compact devices.
  • Manual Operation: The switch is manually operated, requiring the user to slide the mechanism to change the connection or state.
  • Pack of 2: The component is supplied in a pack of two identical switches, providing a cost-effective solution for projects requiring multiple switches.
  • Compact Size: The switch has a compact size, making it ideal for use in space-constrained devices and applications.
  • Easy Installation: The switch is easy to install and integrate into electronic circuits and devices, with a simple soldering process required for connections.

Number of positions

8

Pitch

2.54mm

Operating mode

Manual

Package quantity

2

Dimensions

[Insert dimensions]

Weight

[Insert weight]

Material

[Insert material]

Applications

The 8 Way Slide Switch 2.54mm Pitch is suitable for a wide range of applications, including

Electronic prototyping and development

Breadboarding and circuit testing

Robotics and automation

Industrial control systems

Medical devices

Consumer electronics

IoT devices and projects

Tips and Precautions

When handling the switch, ensure that the sliding mechanism is clean and free from debris to ensure smooth operation.

Avoid over-tightening or applying excessive force to the switch, as this can cause damage to the internal mechanisms.

When soldering connections, ensure that the soldering iron is set to the correct temperature and that the connections are secure to prevent damage or electrical shock.

By following the guidelines and specifications outlined in this documentation, developers and engineers can effectively integrate the 8 Way Slide Switch 2.54mm Pitch into their projects, leveraging its versatility and functionality to achieve their desired outcomes.

Pin Configuration

  • Component Overview
  • The 8 Way Slide Switch 2.54mm Pitch is a type of electromechanical switch that allows for the connection or disconnection of electrical circuits. This component is commonly used in IoT and electronics projects to control the flow of electrical signals. The switch comes in a pack of 2 and features a 2.54mm pitch, making it compatible with standard breadboards and PCBs.
  • Pinout Structure
  • The 8 Way Slide Switch has 16 pins, divided into two rows of 8 pins each. The pins are labeled as follows:
  • Row 1 ( Pins 1-8)
  • 1. COM1 (Common 1): This pin is connected to the first set of switches (1-4).
  • 2. NC1 (Normally Closed 1): This pin is connected to the first switch and is normally closed (connected) when the switch is in the off position.
  • 3. NO1 (Normally Open 1): This pin is connected to the first switch and is normally open (disconnected) when the switch is in the off position.
  • 4. NC2 (Normally Closed 2): This pin is connected to the second switch and is normally closed (connected) when the switch is in the off position.
  • 5. NO2 (Normally Open 2): This pin is connected to the second switch and is normally open (disconnected) when the switch is in the off position.
  • 6. NC3 (Normally Closed 3): This pin is connected to the third switch and is normally closed (connected) when the switch is in the off position.
  • 7. NO3 (Normally Open 3): This pin is connected to the third switch and is normally open (disconnected) when the switch is in the off position.
  • 8. NC4 (Normally Closed 4): This pin is connected to the fourth switch and is normally closed (connected) when the switch is in the off position.
  • Row 2 (Pins 9-16)
  • 9. COM2 (Common 2): This pin is connected to the second set of switches (5-8).
  • 10. NO4 (Normally Open 4): This pin is connected to the fourth switch and is normally open (disconnected) when the switch is in the off position.
  • 11. NC5 (Normally Closed 5): This pin is connected to the fifth switch and is normally closed (connected) when the switch is in the off position.
  • 12. NO5 (Normally Open 5): This pin is connected to the fifth switch and is normally open (disconnected) when the switch is in the off position.
  • 13. NC6 (Normally Closed 6): This pin is connected to the sixth switch and is normally closed (connected) when the switch is in the off position.
  • 14. NO6 (Normally Open 6): This pin is connected to the sixth switch and is normally open (disconnected) when the switch is in the off position.
  • 15. NC7 (Normally Closed 7): This pin is connected to the seventh switch and is normally closed (connected) when the switch is in the off position.
  • 16. NO8 (Normally Open 8): This pin is connected to the eighth switch and is normally open (disconnected) when the switch is in the off position.
  • Connection Structure
  • To connect the pins, follow these steps:
  • 1. Connect the COM pins (1 and 9) to the power source or signal input.
  • 2. Connect the NC pins (2, 4, 6, 8, 11, 13, and 15) to the outputs or devices that need to be controlled.
  • 3. Connect the NO pins (3, 5, 7, 10, 12, 14, and 16) to the outputs or devices that need to be controlled.
  • 4. When the switch is in the off position, the NC pins will be connected to the COM pin, and the NO pins will be disconnected.
  • 5. When the switch is in the on position, the NO pins will be connected to the COM pin, and the NC pins will be disconnected.
  • Note: Make sure to handle the switch with care, as the pins are delicate and can be easily bent or damaged.

Code Examples

8 Way Slide Switch 2.54mm Pitch (Pack of 2) Documentation
Overview
The 8 Way Slide Switch 2.54mm Pitch is a compact, surface-mount slide switch with 8 independent channels, each with a typical ON/OFF operation. This component is ideal for IoT projects that require multiple switch inputs, such as robotics, automation, and interactive installations. The switch features a 2.54mm pitch, making it compatible with standard breadboards and PCBs.
Pinout
The 8 Way Slide Switch has 16 pins, arranged in two rows of 8 pins each. The pinout is as follows:
| Pin | Function |
| --- | --- |
| 1-8 | Switch 1-8 Common Pins (CONNECTED to pin 9-16 when switch is ON) |
| 9-16 | Switch 1-8 Normally Open Pins (DISCONNECTED from pin 1-8 when switch is OFF) |
Example 1: Basic Switch Control with Arduino
In this example, we'll use the 8 Way Slide Switch to control 8 individual LEDs connected to an Arduino board.
Hardware Requirements:
8 Way Slide Switch 2.54mm Pitch
 Arduino Board (e.g., Arduino Uno)
 8 LEDs
 8 Resistors (220)
 Breadboard
 Jumper Wires
Software Requirements:
Arduino IDE (version 1.8.x or later)
Code:
```c++
const int switchPins[] = {2, 3, 4, 5, 6, 7, 8, 9}; // Pin connections for each switch
const int ledPins[] = {10, 11, 12, 13, 14, 15, 16, 17}; // Pin connections for each LED
void setup() {
  for (int i = 0; i < 8; i++) {
    pinMode(switchPins[i], INPUT);
    pinMode(ledPins[i], OUTPUT);
  }
}
void loop() {
  for (int i = 0; i < 8; i++) {
    if (digitalRead(switchPins[i]) == HIGH) {
      digitalWrite(ledPins[i], HIGH);
    } else {
      digitalWrite(ledPins[i], LOW);
    }
  }
  delay(50);
}
```
Example 2: Debouncing with Raspberry Pi
In this example, we'll use the 8 Way Slide Switch to control a Python script running on a Raspberry Pi, with debouncing implemented to prevent switch bounces from causing unwanted events.
Hardware Requirements:
8 Way Slide Switch 2.54mm Pitch
 Raspberry Pi (e.g., Raspberry Pi 3 or later)
 Breadboard
 Jumper Wires
Software Requirements:
Raspbian OS (version 10 or later)
 Python 3.x
Code:
```python
import RPi.GPIO as GPIO
import time
# Set up GPIO mode and pin numbering
GPIO.setmode(GPIO.BCM)
# Define switch and debounce constants
SWITCH_PIN = 17
DEBOUNCE_TIME = 50  # milliseconds
# Initialize switch pin as input
GPIO.setup(SWITCH_PIN, GPIO.IN, pull_up_down=GPIO.PUD_UP)
while True:
    # Read switch state
    switch_state = GPIO.input(SWITCH_PIN)
    
    # Debounce logic
    if switch_state == GPIO.HIGH:
        start_time = time.time()
        while GPIO.input(SWITCH_PIN) == GPIO.HIGH:
            if time.time() - start_time > DEBOUNCE_TIME / 1000:
                print("Switch has been turned ON")
                break
            time.sleep(0.01)
    else:
        print("Switch has been turned OFF")
    
    # Wait for a short period to avoid excessive polling
    time.sleep(0.01)
```
Note: In this example, we're using GPIO 17 as the switch pin, but you can choose any available GPIO pin on your Raspberry Pi.
Example 3: Reading Switch States with ESP32
In this example, we'll use the 8 Way Slide Switch to read the switch states using an ESP32 microcontroller board.
Hardware Requirements:
8 Way Slide Switch 2.54mm Pitch
 ESP32 Board (e.g., ESP32 DevKitC)
 Breadboard
 Jumper Wires
Software Requirements:
ESP32 Arduino Core (version 1.0.4 or later)
Code:
```c++
const int switchPins[] = {32, 33, 34, 35, 36, 37, 38, 39}; // Pin connections for each switch
void setup() {
  Serial.begin(115200);
  for (int i = 0; i < 8; i++) {
    pinMode(switchPins[i], INPUT);
  }
}
void loop() {
  for (int i = 0; i < 8; i++) {
    int switchState = digitalRead(switchPins[i]);
    Serial.print("Switch ");
    Serial.print(i + 1);
    Serial.print(": ");
    Serial.println(switchState == HIGH ? "ON" : "OFF");
  }
  delay(50);
}
```
These examples demonstrate how to use the 8 Way Slide Switch with popular microcontrollers and single-board computers. You can adapt these examples to fit your specific project requirements and integrate the switch with other IoT components.