KY-004 Key Switch Module – Digital Push Button Sensor for Arduino & ESP32
The KY-004 Key Switch Module is a compact push button module designed for manual input and control in electronic projects.
Featuring a momentary tactile push button, the module provides a digital signal when pressed, making it ideal for Arduino, ESP32, Raspberry Pi, robotics, and DIY electronics applications.
Its simple 3-pin interface allows easy integration with microcontrollers for user input, menu navigation, and control functions.
Key Features
Model: KY-004
Switch Type: Momentary Tactile Push Button
Output Type: Digital (HIGH/LOW)
Operating Voltage: 3.3V–5V DC
3-Pin Interface: Signal (S), VCC (+), GND (-)
Normally Open Push Button
Compact and Lightweight Design
Easy Integration with Microcontrollers
Suitable for Arduino, ESP32, and Raspberry Pi
Technical Specifications
Parameter
Specification
Model
KY-004
Product Type
Key Switch Sensor Module
Switch Type
Momentary Push Button
Contact Configuration
Normally Open (NO)
Operating Voltage
3.3V–5V DC
Output Type
Digital
Number of Pins
3
Pin Configuration
S / + / -
Board Dimensions
Approximately 18.5 × 15mm
Mounting Type
PCB Module
Pin Configuration
Pin
Function
S
Digital Signal Output
+
Power Supply
-
Ground
Arduino Connection Example
KY-004
Arduino Uno
S
D3
+
5V
-
GND
The Arduino reads the button state through its digital input pin. On common KY-004 modules, pressing the button produces a HIGH signal when the module is wired with a suitable pull-down arrangement.
Applications
Arduino and ESP32 Projects
Raspberry Pi GPIO Input
Robotics and Automation
Menu Navigation
Start/Stop Controls
User Input Buttons
DIY Electronics
Educational STEM Projects
Digital Input Testing
Important Notes
The KY-004 is a momentary switch, not a latching ON/OFF switch.
The button returns to its original state when released.
Use a suitable pull-up or pull-down resistor to ensure a stable digital signal.
Software debouncing may be required to avoid multiple detections from a single press.
For ESP32 and Raspberry Pi, use 3.3V logic levels.
Verify the pin labels and signal behavior of the supplied module before wiring.
This module is intended for low-voltage signal inputs, not direct switching of high-power loads.
Package Includes
1 × KY-004 Key Switch Module
KY-004 Key Switch Module
Default Title
Robot Pi Shop
Pickup available,usually ready in 1 hour
Ground Floor Shop, Sayde Street, Fanar Matn 1202 Fanar Lebanon