Red PBS-11B 2PIN 12mm No Lock Push Button Momentary Switch 3A 250V
Red PBS-11B 2PIN 12mm No Lock Push Button Momentary Switch 3A 250V
The Red PBS-11B 2PIN 12mm No Lock Push Button Momentary Switch 3A 250V is a type of electromechanical switch designed for various applications in the Internet of Things (IoT) realm. This component serves as an input device, enabling users to interact with electronic devices and systems.
The primary function of this push button switch is to momentarily connect or disconnect an electrical circuit when pressed and released. It is a normally open (NO) type switch, meaning that the circuit is open when the button is in its normal, unpressed state. When the button is pressed, the circuit is closed, allowing electrical current to flow. When the button is released, the circuit returns to its open state.
The switch has a compact size of 12mm in diameter, making it suitable for applications where space is limited.
The device has a red button cap, providing visual feedback for the user.
The switch has a 2-pin configuration, with both pins having a thickness of 0.8mm and a spacing of 4.5mm.
The switch is rated for a maximum current of 3A and a maximum voltage of 250V AC/DC.
The contact resistance is typically less than 10m, ensuring low power loss and high reliability.
The switch has a momentary action, meaning it only closes the circuit while the button is being pressed.
The switch does not have a locking mechanism, requiring continuous pressure to maintain the circuit closure.
The operating force required to press the button is approximately 200gf, providing a clear tactile feedback.
The operating temperature range of the switch is -20C to 70C, making it suitable for a wide range of applications.
The switch is designed to withstand environmental stresses, including humidity and vibration.
The switch complies with relevant industry standards and regulations, including RoHS and CE.
The device is designed to meet the requirements of various applications, including IoT devices, industrial control systems, and consumer electronics.
| The Red PBS-11B 2PIN 12mm No Lock Push Button Momentary Switch 3A 250V is suitable for a wide range of applications, including |
IoT devices, such as smart home automation systems and wearables
Industrial control systems, such as machinery and equipment control panels
Consumer electronics, such as multimedia devices and gaming consoles
Medical devices, such as patient monitoring systems and medical equipment
The Red PBS-11B 2PIN 12mm No Lock Push Button Momentary Switch 3A 250V is a versatile and reliable component suitable for various IoT applications. Its compact size, low power consumption, and high reliability make it an ideal choice for designers and engineers looking to add user input functionality to their devices and systems.
Component Documentation: Red PBS-11B 2PIN 12mm No Lock Push Button Momentary Switch 3A 250VOverviewThe Red PBS-11B 2PIN 12mm No Lock Push Button Momentary Switch is a 2-pin push-button switch designed for momentary applications. It features a compact 12mm size, 3A current rating, and 250V voltage rating. The switch is ideal for use in various IoT projects, including robotics, automation, and interactive systems.PinoutThe switch has a simple 2-pin interface:Pin 1: Normally Open (NO)
Pin 2: Common (COM)Operating PrincipleThe switch operates as a momentary push-button switch. When the button is pressed, the normally open (NO) pin is connected to the common (COM) pin, allowing current to flow. When the button is released, the connection is broken, and the circuit is open.Code Examples### Example 1: Basic LED Control using ArduinoIn this example, we'll use the Red PBS-11B switch to control an LED connected to an Arduino board.Hardware:Red PBS-11B switch
Arduino Board (e.g., Arduino Uno)
LED
Resistor (e.g., 220)
Breadboard and jumper wiresSoftware:```cpp
const int ledPin = 13; // choose a digital pin for the LED
const int buttonPin = 2; // choose a digital pin for the switchvoid setup() {
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);
}void loop() {
int buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
digitalWrite(ledPin, HIGH); // turn the LED on
} else {
digitalWrite(ledPin, LOW); // turn the LED off
}
}
```Explanation:In this example, we connect the switch to digital pin 2 on the Arduino board, and the LED to digital pin 13. The `setup()` function configures the pins as input and output, respectively. In the `loop()` function, we read the state of the switch using `digitalRead()`. If the switch is pressed (HIGH), we turn the LED on using `digitalWrite()`. Otherwise, we turn the LED off.### Example 2: Raspberry Pi GPIO Control using PythonIn this example, we'll use the Red PBS-11B switch to control a GPIO pin on a Raspberry Pi using Python.Hardware:Red PBS-11B switch
Raspberry Pi (e.g., Raspberry Pi 4)
Breadboard and jumper wiresSoftware:```python
import RPi.GPIO as GPIO
import time# Set up GPIO mode
GPIO.setmode(GPIO.BCM)# Define the GPIO pins
button_pin = 17
output_pin = 23# Set up the GPIO pins as input and output
GPIO.setup(button_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(output_pin, GPIO.OUT)try:
while True:
button_state = GPIO.input(button_pin)
if button_state == False:
GPIO.output(output_pin, GPIO.HIGH) # turn the output on
else:
GPIO.output(output_pin, GPIO.LOW) # turn the output off
time.sleep(0.1)
except KeyboardInterrupt:
GPIO.cleanup()
```Explanation:In this example, we connect the switch to GPIO pin 17 on the Raspberry Pi, and an output pin (e.g., a relay or an LED) to GPIO pin 23. We use the RPi.GPIO library to interact with the GPIO pins. The script reads the state of the switch using `GPIO.input()` and sets the output pin accordingly using `GPIO.output()`.