A Round Rocker Switch is a simple yet essential electrical component used to control the flow of electricity within a circuit. It is characterized by its circular form factor and a rocker mechanism that allows users to switch between an "ON" and "OFF" state, thereby enabling or disabling the flow of current. These switches are commonly found in various applications, including household appliances, office equipment, automotive, and industrial machinery.
Pin Number | Description | Notes |
---|---|---|
1 | Input (Power Supply) | Connect to the live wire (L) |
2 | Output (Load) | Connect to the device or load |
3 | Ground (Optional) | For illuminated switches |
Note: The pin configuration may vary depending on the specific model and manufacturer.
Q: Can I use this switch with a DC power supply? A: Yes, but ensure the DC voltage and current do not exceed the switch's ratings.
Q: How do I know if the switch is in the ON position? A: Some switches have an indicator line or illumination to show the ON position.
Q: Is it possible to replace the switch in an existing device? A: Yes, as long as the replacement switch has compatible ratings and dimensions.
// Example code to control an LED using a Round Rocker Switch connected to an Arduino UNO
const int switchPin = 2; // Connect the output pin of the switch to digital pin 2
const int ledPin = 13; // Built-in LED on Arduino UNO
void setup() {
pinMode(ledPin, OUTPUT); // Set the LED pin as an output
pinMode(switchPin, INPUT); // Set the switch pin as an input
}
void loop() {
int switchState = digitalRead(switchPin); // Read the state of the switch
if (switchState == HIGH) {
digitalWrite(ledPin, HIGH); // Turn on the LED if the switch is in the ON position
} else {
digitalWrite(ledPin, LOW); // Turn off the LED if the switch is in the OFF position
}
}
Note: The above code assumes that the switch is wired to provide a HIGH signal to the Arduino when in the ON position. Adjust the code accordingly if your switch configuration is different.
This documentation provides a comprehensive guide to using a Round Rocker Switch. For specific models or additional technical support, please refer to the manufacturer's datasheet or contact their customer service.