Stufin
Home Quick Cart Profile

4-Pins DIP Momentary Square Tactile Push Button Switch 5 Pieces - 12x12x12mm

Buy Now on Stufin

Component Documentation

4-Pins DIP Momentary Square Tactile Push Button Switch

Overview

The 4-Pins DIP Momentary Square Tactile Push Button Switch is a compact, surface-mountable switching component designed for various electronics and IoT applications. This switch features a durable square push button with a tactile feedback mechanism, providing a clear and distinct sensation when pressed.

Functionality

The 4-Pins DIP Momentary Square Tactile Push Button Switch is a normally open (NO) momentary switch, meaning it only connects the circuit when the button is pressed. When the button is released, the circuit returns to its open state. This switch is ideal for applications requiring a temporary connection or signal activation, such as

User interfaces (e.g., remote controls, keypads)

Industrial control systems

IoT devices (e.g., smart home automation, wearables)

Robotics and automation projects

Key Features

  • Compact Design: The switch measures 12x12x12mm, making it suitable for space-constrained designs and compact electronic assemblies.
  • 4-Pin DIP (Dual In-Line Package): The switch features a standard 4-pin DIP package, allowing for easy surface-mounting and integration into PCB designs.
  • Momentary Operation: The switch only connects the circuit when pressed, returning to its open state when released.
  • Tactile Feedback: The switch provides a distinct tactile "click" when pressed, ensuring a clear and intuitive user experience.
  • Durable Construction: The switch is built with a robust and reliable design, ensuring long-term performance and durability in various operating environments.
  • Multiple Units: This product includes 5 pieces of the 4-Pins DIP Momentary Square Tactile Push Button Switch, ideal for prototyping, development, and small-scale production.

Electrical Characteristics

Operating Voltage

12V DC ( maximum )

Contact Resistance

10m

Insulation Resistance

100M

Dielectric Strength

500V AC ( minimum )

Mechanical Characteristics

Operating Temperature

-20C to 70C

Storage Temperature

-30C to 80C

Vibration Resistance

10-55Hz, 1.5mm amplitude

Shock Resistance

100m/s, 11ms duration

Mounting and Handling

The switch is designed for surface-mounting and should be handled with care to avoid damage to the pins or switch mechanism.

It is recommended to follow proper soldering and assembly techniques to ensure reliable operation and prevent damage to the switch or surrounding components.

Certifications and Compliance

The 4-Pins DIP Momentary Square Tactile Push Button Switch complies with relevant industry standards and regulations, including RoHS and CE certifications.

Pin Configuration

  • Component Overview
  • The 4-Pins DIP Momentary Square Tactile Push Button Switch is a compact, surface-mountable switch designed for various IoT and electronic applications. The switch comes in a 12x12x12mm package and is available in packs of 5 pieces. This documentation provides a detailed explanation of the switch's pins and their connections.
  • Pin Description
  • The 4-Pins DIP Momentary Square Tactile Push Button Switch has four pins, labeled as follows:
  • Pin 1: NC (Normally Closed)
  • Function: Connects to the circuit when the switch is not pressed.
  • State: Closed when the switch is not pressed, open when the switch is pressed.
  • Typical Connection: Connect to a microcontroller or circuit ground.
  • Pin 2: COM (Common)
  • Function: Serves as the common connection point for the switch.
  • State: Always connected to either NC or NO.
  • Typical Connection: Connect to a microcontroller or circuit power source.
  • Pin 3: NO (Normally Open)
  • Function: Connects to the circuit when the switch is pressed.
  • State: Open when the switch is not pressed, closed when the switch is pressed.
  • Typical Connection: Connect to a microcontroller or circuit input.
  • Pin 4: GND (Ground)
  • Function: Provides a ground connection for the switch.
  • State: Always connected to ground.
  • Typical Connection: Connect to the circuit ground or a microcontroller's ground pin.
  • Pin Connection Structure
  • The following is a typical connection structure for the 4-Pins DIP Momentary Square Tactile Push Button Switch:
  • Pin 1 (NC): Connect to a 10k pull-up resistor, which is connected to the microcontroller's digital input pin.
  • Pin 2 (COM): Connect to the microcontroller's power source (e.g., VCC) or a circuit power source.
  • Pin 3 (NO): Connect to the microcontroller's digital input pin or a circuit input.
  • Pin 4 (GND): Connect to the circuit ground or the microcontroller's ground pin.
  • Example Connection Diagram
  • Here's an example connection diagram for the switch:
  • ```
  • +---------------+
  • | Microcontroller |
  • +---------------+
  • |
  • |
  • v
  • +---------------+ +---------------+
  • | 10k Pull-up | | Switch |
  • | Resistor | +---------------+
  • | | | Pin 1 (NC) |
  • | +-----------+ | +-----------+
  • | | | | | |
  • | | Digital | | | Digital |
  • | | Input Pin | | | Input Pin |
  • | +-----------+ | +-----------+
  • | | | |
  • | +-----------+ | +-----------+
  • | | | | | |
  • | | VCC | | | Pin 2 (COM) |
  • | +-----------+ | +-----------+
  • | | | |
  • | +-----------+ | +-----------+
  • | | | | | |
  • | | Digital | | | Pin 3 (NO) |
  • | | Input Pin | | +-----------+
  • | +-----------+ | |
  • | | | |
  • | +-----------+ | +-----------+
  • | | | | | |
  • | | GND | | | Pin 4 (GND) |
  • | +-----------+ | +-----------+
  • +---------------+ +---------------+
  • ```
  • Note: This is just an example connection diagram, and the actual connections may vary depending on the specific application and microcontroller used. Ensure to consult the microcontroller's datasheet and the switch's datasheet for more information on proper connections and usage.

Code Examples

Component Documentation: 4-Pins DIP Momentary Square Tactile Push Button Switch
Overview
The 4-Pins DIP Momentary Square Tactile Push Button Switch is a compact, surface-mountable switch designed for use in a variety of IoT projects. With its small footprint (12x12x12mm) and low profile, this switch is ideal for space-constrained applications. The momentary action switch requires a brief press to activate, making it suitable for applications where a temporary signal is needed.
Pinout
The switch has a standard 4-pin DIP (Dual In-Line Package) configuration:
| Pin | Function |
| --- | --- |
| 1 | NO (Normally Open) |
| 2 | COM (Common) |
| 3 | COM (Common) |
| 4 | NC (Normally Closed) |
Operating Characteristics
Operating Voltage: 12V DC
 Contact Resistance: 50m
 Insulation Resistance: 100M
 Operating Life: 100,000 cycles
Code Examples
### Example 1: Basic Debouncing with Arduino
In this example, we'll use the switch to control an LED connected to digital pin 13 on an Arduino board.
```cpp
const int buttonPin = 2;  // Connect switch to digital pin 2
const int ledPin = 13;   // Connect LED to digital pin 13
int buttonState = 0;     // Store the current button state
void setup() {
  pinMode(buttonPin, INPUT);
  pinMode(ledPin, OUTPUT);
}
void loop() {
  buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {
    digitalWrite(ledPin, HIGH);
  } else {
    digitalWrite(ledPin, LOW);
  }
  delay(50); // Debounce time
}
```
### Example 2: Using with Raspberry Pi and Python
In this example, we'll use the switch to toggle an LED connected to GPIO pin 17 on a Raspberry Pi.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
button_pin = 17  # Connect switch to GPIO pin 17
led_pin = 17    # Connect LED to GPIO pin 17
GPIO.setup(button_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(led_pin, GPIO.OUT)
try:
    while True:
        button_state = GPIO.input(button_pin)
        if button_state == False:
            GPIO.output(led_pin, GPIO.HIGH)
        else:
            GPIO.output(led_pin, GPIO.LOW)
        time.sleep(0.05)  # Debounce time
except KeyboardInterrupt:
    GPIO.cleanup()
```
Note: In both examples, a debouncing mechanism is used to prevent the code from reading multiple button presses as separate events. The debouncing time is set to 50ms, but you may need to adjust this value depending on your specific application.