The Adafruit Push Button Power Switch is a compact and convenient electronic component designed to control the power flow to your project with the ease of a push button. This board is particularly useful for projects that require a clean and simple method to turn on and off without the need for complex circuitry. Common applications include hobbyist projects, portable electronics, and any system that benefits from a user-friendly power interface.
Pin Name | Description |
---|---|
Vin |
Voltage input (3.3V to 14V DC) |
GND |
Ground |
Vout |
Voltage output (controlled by the push button) |
A |
Anode of the onboard LED |
K |
Cathode of the onboard LED |
To use the Adafruit Push Button Power Switch in a circuit, follow these steps:
Vin
pin to the positive terminal of your power source.GND
pin to the ground terminal of your power source.Vout
pin to the power input of your load (e.g., a microcontroller, motor, etc.).A
pin to Vin
and the K
pin to GND
.Vout
line if your load does not have one internally to prevent floating states when the switch is off.// Example code to control an LED using the Adafruit Push Button Power Switch
const int ledPin = 13; // LED connected to digital pin 13
void setup() {
pinMode(ledPin, OUTPUT); // sets the digital pin as output
}
void loop() {
// The LED will be controlled by the state of the Push Button Power Switch
// When the button is pressed, the power switch will turn on and the LED will light up
// When the button is pressed again, the power switch will turn off and the LED will turn off
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000); // waits for a second
digitalWrite(ledPin, LOW); // sets the LED off
delay(1000); // waits for a second
}
Note: This example assumes that the Arduino is powered through the Adafruit Push Button Power Switch. The ledPin
is used as an indicator and can be replaced with any other load you wish to control.
Vout
pin.A
and K
) are correctly connected to Vin
and GND
, respectively.Vin
and GND
connections.Vout
and GND
pins to smooth out any voltage spikes.Q: Can I use the power switch with a voltage lower than 3.3V? A: The power switch is designed to operate within the 3.3V to 14V range. Using it below 3.3V may result in unreliable performance.
Q: Is it possible to control the power switch programmatically? A: The power switch is designed for manual operation via the push button. To control power programmatically, you would need to use a different component, such as a relay or a transistor switch controlled by a microcontroller.
Q: How do I know if the power switch is on or off? A: The onboard LED indicator will light up when the power switch is in the 'on' state, providing a visual cue of the power status.