

A push button is a momentary switch that completes an electrical circuit when pressed and breaks the circuit when released. It is widely used in electronic devices for user input, such as turning devices on/off, resetting systems, or triggering specific actions. Push buttons are simple, reliable, and versatile components that are essential in many electronic projects.








Below are the general technical specifications for a standard push button:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 12V (typical) |
| Maximum Current Rating | 50mA to 500mA (depending on type) |
| Contact Resistance | ≤ 50 mΩ |
| Insulation Resistance | ≥ 100 MΩ |
| Operating Temperature | -20°C to +70°C |
| Mechanical Lifespan | 100,000 to 1,000,000 presses |
A standard push button typically has four pins, arranged in two pairs. The pins are internally connected as shown below:
| Pin Number | Description |
|---|---|
| Pin 1 | Connected to one side of the switch |
| Pin 2 | Internally connected to Pin 1 |
| Pin 3 | Connected to the other side of the switch |
| Pin 4 | Internally connected to Pin 3 |
Note: Pins 1 and 2 are electrically connected, as are Pins 3 and 4. This allows for flexible wiring in circuits.
Below is an example of how to connect a push button to an Arduino UNO and read its state:
// Push Button Example with Arduino UNO
// This code reads the state of a push button and turns on an LED when pressed.
const int buttonPin = 2; // Pin connected to the push button
const int ledPin = 13; // Pin connected to the onboard LED
void setup() {
pinMode(buttonPin, INPUT_PULLUP); // Set button pin as input with internal pull-up
pinMode(ledPin, OUTPUT); // Set LED pin as output
}
void loop() {
int buttonState = digitalRead(buttonPin); // Read the button state
if (buttonState == LOW) { // Button is pressed (LOW due to pull-up resistor)
digitalWrite(ledPin, HIGH); // Turn on the LED
} else {
digitalWrite(ledPin, LOW); // Turn off the LED
}
}
Note: The internal pull-up resistor ensures the button pin reads HIGH when the button is not pressed, avoiding floating pin issues.
Button Not Responding:
Button Produces Erratic Behavior:
Microcontroller Reads Incorrect State:
Button Feels Stuck or Unresponsive:
Q: Can I use a push button with high-current devices?
A: No, push buttons are designed for low-current applications. Use a relay or transistor to control high-current devices.
Q: How do I debounce a push button in software?
A: Introduce a small delay (e.g., 10-50ms) after detecting a button press to filter out noise caused by bouncing.
Q: Can I use a push button with analog signals?
A: Push buttons are typically used for digital signals (on/off). For analog signals, consider using a potentiometer or other analog input devices.