Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use Rocker Switch (SPST): Examples, Pinouts, and Specs

Image of Rocker Switch (SPST)Design with Rocker Switch (SPST) in Cirkit Designer

Introduction

A rocker switch is a user-interface electronic component that operates as an on-off switch. The SPST (Single Pole, Single Throw) designation indicates that the switch has one input (pole) and one output (throw), making it a simple binary device that either completes or breaks a circuit. Rocker switches are commonly used in household appliances, office equipment, and industrial controls due to their ease of operation and reliability.

Explore Projects Built with Rocker Switch (SPST)

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of SPST Rocker Switch Array Circuit: A project utilizing Rocker Switch (SPST) in a practical application
SPST Rocker Switch Array Circuit

This circuit features a parallel arrangement of SPST rocker switches, each capable of independently controlling the connection of a separate circuit branch to a common line. It is likely designed for simple on/off control of multiple individual loads or signals, with each switch operating a distinct load or signal path.

Open Project in Cirkit Designer
Image of ESP32-Controlled Lighting and Ventilation System: A project utilizing Rocker Switch (SPST) in a practical application
ESP32-Controlled Lighting and Ventilation System

This circuit is designed to control multiple AC-powered devices, such as LED bulbs and fans, using an ESP32 microcontroller and an 8-channel relay module. The ESP32's GPIO pins are connected to the relay inputs, allowing it to switch the relays on and off, which in turn controls the power to the connected devices. Rocker switches are used to provide manual control over the GPIO pins, and a 5V adapter powers the ESP32 and the relay module.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Description
1 Input (Line Voltage)
2 Output (Load)

Note: The pin numbers are for reference and may vary based on the manufacturer's design.

Usage Instructions

How to Use the Rocker Switch in a Circuit

  1. Power Off: Ensure that the power supply to the circuit is turned off before installing the switch.
  2. Wiring: Connect the line voltage wire to pin 1 and the load wire to pin 2. Ensure that the connections are secure and insulated to prevent short circuits.
  3. Mounting: Install the rocker switch into the desired panel or enclosure, making sure it is firmly seated and aligned.
  4. Testing: Once installed, turn on the power supply and test the switch operation. The rocker should move smoothly between the on and off positions.

Important Considerations and Best Practices

Troubleshooting and FAQs

Common Issues and Solutions

FAQs

Example Code for Arduino UNO

If you're using a rocker switch with an Arduino UNO to control a device like an LED, here's a simple example code:

// Define the pin connected to the rocker switch
const int rockerSwitchPin = 2; 
// Define the pin connected to the LED
const int ledPin = 13; 

void setup() {
  // Set the LED pin as output
  pinMode(ledPin, OUTPUT); 
  // Set the rocker switch pin as input
  pinMode(rockerSwitchPin, INPUT); 
}

void loop() {
  // Read the state of the rocker switch
  int switchState = digitalRead(rockerSwitchPin); 

  // If the switch is in the 'on' position, turn on the LED
  if (switchState == HIGH) {
    digitalWrite(ledPin, HIGH); 
  } else {
    // If the switch is in the 'off' position, turn off the LED
    digitalWrite(ledPin, LOW); 
  }
}

Note: In this example, the rocker switch is assumed to be connected to the Arduino such that it closes the circuit when in the 'on' position, connecting the input pin to 5V. A pull-down resistor may be needed to ensure the pin reads LOW when the switch is open (off).