Stufin
Home Quick Cart Profile

2 Pin Mini On-Off SPST Rocket Switch (19 x 13mm) - Pack of 2

Buy Now on Stufin

Operating Temperature

-20C to 85C

Contact Resistance

<50m

Insulation Resistance

>100M

Operating Life

>10,000 cycles

Terminals

Through-hole, 2-pin

Dimensions

19 x 13mm

Weight

<5g

Applications

The 2 Pin Mini On-Off SPST Rocket Switch is suitable for a wide range of IoT applications, including

Robotics and automation systems

IoT devices and gateways

Wearable electronics

Smart home and building automation systems

Industrial control systems

Medical devices and equipment

Overall, the 2 Pin Mini On-Off SPST Rocket Switch is a reliable, compact, and easy-to-use component that is ideal for a variety of IoT applications.

Pin Configuration

  • 2 Pin Mini On-Off SPST Rocket Switch (19 x 13mm) Documentation
  • Overview
  • The 2 Pin Mini On-Off SPST Rocket Switch is a compact, single-pole single-throw (SPST) switch designed for use in IoT applications. This documentation provides a detailed explanation of the switch's pins and how to connect them properly.
  • Pin Description
  • The 2 Pin Mini On-Off SPST Rocket Switch has two pins, labeled as follows:
  • Pin 1: Common (COM)
  • Function: Connects to the power source or input signal
  • Description: This pin is the common terminal of the switch, which connects to the power source or input signal when the switch is in the ON position.
  • Typical Connection: Connect to VCC, V+, or the positive terminal of a power source.
  • Pin 2: Normally Open (NO)
  • Function: Connects to the load or output signal
  • Description: This pin is the normally open terminal of the switch, which connects to the load or output signal when the switch is in the ON position.
  • Typical Connection: Connect to the positive terminal of a load, such as an LED, relay, or sensor.
  • Connection Structure
  • To connect the pins properly, follow this structure:
  • 1. Power Source Connection
  • Connect Pin 1 (COM) to the positive terminal of a power source (VCC, V+, etc.).
  • 2. Load Connection
  • Connect Pin 2 (NO) to the positive terminal of a load (LED, relay, sensor, etc.).
  • 3. Ground Connection
  • Connect the negative terminal of the power source and the negative terminal of the load to a common ground (GND).
  • Switch Operation
  • The 2 Pin Mini On-Off SPST Rocket Switch operates as follows:
  • OFF Position: Pin 1 (COM) is disconnected from Pin 2 (NO), and the load is not powered.
  • ON Position: Pin 1 (COM) is connected to Pin 2 (NO), and the load is powered.
  • Important Notes
  • Ensure proper voltage and current ratings of the switch and load to avoid damage or overheating.
  • Use a suitable power source and load that match the switch's specifications.
  • Follow proper safety guidelines when working with electricity and electronic components.
  • By following this documentation, you should be able to connect and use the 2 Pin Mini On-Off SPST Rocket Switch correctly in your IoT projects.

Code Examples

Component Documentation: 2 Pin Mini On-Off SPST Rocket Switch (19 x 13mm)
Overview
The 2 Pin Mini On-Off SPST Rocket Switch is a compact, single-pole single-throw (SPST) toggle switch designed for use in a variety of electronic projects. It features a robust and reliable design, making it suitable for applications where a simple on/off switching mechanism is required.
Pinout and Parameters
Pin 1: Input (Connected to the power source)
 Pin 2: Output (Connected to the load)
 Operating voltage: 250V AC, 30V DC
 Current rating: 10A
 Dimensions: 19 x 13mm
 Packaging: Pack of 2
Example 1: Basic On/Off Switching with Arduino
In this example, we'll demonstrate how to use the 2 Pin Mini On-Off SPST Rocket Switch with an Arduino board to control an LED.
Hardware Requirements:
Arduino Board (e.g., Arduino Uno)
 2 Pin Mini On-Off SPST Rocket Switch
 LED
 220 Resistor
 Breadboard and jumper wires
Software:
```c++
const int switchPin = 2;  // Connect the switch to digital pin 2
const int ledPin = 13;   // Connect the LED to digital pin 13
void setup() {
  pinMode(switchPin, INPUT);
  pinMode(ledPin, OUTPUT);
}
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: Controlling a DC Motor with Raspberry Pi
In this example, we'll demonstrate how to use the 2 Pin Mini On-Off SPST Rocket Switch with a Raspberry Pi to control a DC motor.
Hardware Requirements:
Raspberry Pi (any model)
 2 Pin Mini On-Off SPST Rocket Switch
 DC Motor (e.g., 6V, 1A)
 L293D Motor Driver IC
 Breadboard and jumper wires
Software:
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
# Define the switch and motor control pins
switch_pin = 17
motor_forward_pin = 23
motor_backward_pin = 24
GPIO.setup(switch_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(motor_forward_pin, GPIO.OUT)
GPIO.setup(motor_backward_pin, GPIO.OUT)
try:
    while True:
        switch_state = GPIO.input(switch_pin)
        if switch_state == GPIO.HIGH:
            # Turn the motor on
            GPIO.output(motor_forward_pin, GPIO.HIGH)
            GPIO.output(motor_backward_pin, GPIO.LOW)
        else:
            # Turn the motor off
            GPIO.output(motor_forward_pin, GPIO.LOW)
            GPIO.output(motor_backward_pin, GPIO.LOW)
        time.sleep(0.1)
except KeyboardInterrupt:
    GPIO.cleanup()
```
Note: In both examples, ensure that the switch is properly connected to the power source and the load (LED or motor) according to the pinout and parameters specified above. Additionally, use appropriate voltage and current rating considerations when designing your project.