The RGB Button by Husa is a versatile push-button switch that integrates an RGB LED, allowing it to emit red, green, or blue light (or combinations thereof) based on the input signal. This component is ideal for applications requiring both tactile input and visual feedback, such as user interfaces, control panels, and decorative lighting systems. Its compact design and multi-functionality make it a popular choice for hobbyists and professionals alike.
Parameter | Value |
---|---|
Operating Voltage | 2.0V to 3.3V (per LED color) |
Forward Current (LED) | 20mA (typical per color) |
Button Contact Rating | 12V DC, 50mA |
LED Colors | Red, Green, Blue (RGB) |
Button Type | Momentary (push-to-make) |
Dimensions | 12mm x 12mm x 15mm |
Operating Temperature | -20°C to 70°C |
The RGB Button has 6 pins: 3 for the RGB LED and 2 for the button switch. The pinout is as follows:
Pin Number | Name | Description |
---|---|---|
1 | LED_R | Positive terminal for the Red LED |
2 | LED_G | Positive terminal for the Green LED |
3 | LED_B | Positive terminal for the Blue LED |
4 | GND_LED | Common cathode (negative terminal) for the LED |
5 | SW1 | Button terminal 1 |
6 | SW2 | Button terminal 2 |
Connecting the Button:
Driving the RGB LED:
Power Requirements:
Below is an example of how to connect and control the RGB Button with an Arduino UNO:
// Pin definitions for RGB Button
const int buttonPin = 2; // Button connected to digital pin 2
const int redPin = 9; // Red LED pin
const int greenPin = 10; // Green LED pin
const int bluePin = 11; // Blue LED pin
void setup() {
pinMode(buttonPin, INPUT_PULLUP); // Set button pin as input with pull-up
pinMode(redPin, OUTPUT); // Set red LED pin as output
pinMode(greenPin, OUTPUT); // Set green LED pin as output
pinMode(bluePin, OUTPUT); // Set blue LED pin as output
}
void loop() {
// Read the button state
int buttonState = digitalRead(buttonPin);
if (buttonState == LOW) { // Button is pressed
digitalWrite(redPin, HIGH); // Turn on red LED
digitalWrite(greenPin, LOW); // Turn off green LED
digitalWrite(bluePin, LOW); // Turn off blue LED
} else { // Button is not pressed
digitalWrite(redPin, LOW); // Turn off red LED
digitalWrite(greenPin, HIGH); // Turn on green LED
digitalWrite(bluePin, HIGH); // Turn on blue LED
}
}
LEDs Not Lighting Up:
Button Not Responding:
Incorrect LED Colors:
Flickering LEDs:
Q: Can I use the RGB Button without a microcontroller?
A: Yes, you can use external switches or a simple circuit with resistors to control the LED colors manually.
Q: What is the lifespan of the RGB Button?
A: The button is rated for approximately 100,000 press cycles, and the LEDs have a typical lifespan of 50,000 hours under normal operating conditions.
Q: Can I mix colors with the RGB Button?
A: Yes, by driving multiple LED pins simultaneously, you can create mixed colors like yellow, cyan, magenta, or white.
Q: Is the RGB Button waterproof?
A: No, the RGB Button is not waterproof. Avoid exposing it to moisture or liquids.
This concludes the documentation for the Husa RGB Button. For further assistance, refer to the manufacturer's datasheet or contact technical support.