KY-031 Knock Sensor Vibration Detection Module (KY-031 Knock Tap Sensor Module) is a high-sensitivity percussion and physical tap detection board built with an internal spring-based vibration switch and an onboard 10kΩ pull-up resistor. When tapped or subjected to sharp mechanical knocks, the internal spring vibrates against the contact post, producing an instant digital active-LOW pulse suitable for percussion triggers, security alarms, and knock-activated switches.
Key Features:
- Percussion Spring Mechanism: Internal helical spring detects sharp mechanical taps, knocks, and sudden impacts with high responsiveness.
- Integrated 10kΩ Pull-Up Resistor: Onboard pull-up resistor maintains a steady digital HIGH level in resting state, preventing floating pins.
- Fast Digital Pulse Output: Delivers instantaneous active-LOW digital trigger signals upon mechanical percussion.
- Direct Interrupt Pin Compatibility: Interfaces directly with hardware external interrupt pins on Arduino, ESP32, and Raspberry Pi.
- Ultra-Low Power Consumption: Consumes practically zero current when idle, making it ideal for battery-operated tamper devices.
- Standard 3-Pin Interface: Clearly marked Signal, VCC, and Ground pins allow direct mounting to sensor shields and breadboards.
Technical Specifications:
- Operating Logic Voltage: 3.3V to 5.0V DC
- Operating Current: Less than 1 mA when triggered
- Sensor Type: Internal mechanical spring tap percussion switch
- Onboard Resistor: 10kΩ metal-film pull-up resistor
- Output Format: Digital TTL (HIGH at rest; momentary LOW pulses upon percussion)
- Response Time: Less than 2 ms
- Operating Temperature: -20°C to +70°C
Mechanical Specifications:
- Form Factor: Standard rectangular sensor breakout module
- PCB Construction: Double-sided FR4 fiberglass board with green solder mask
- Sensor Housing: Protective cylindrical plastic enclosure shielding the spring switch
- Header Type: 3-pin male header with 2.54mm pitch
- Weight: Approximately 2.5 g
Dimensions:
- Overall Length: 25.0 mm
- Overall Width: 15.0 mm
- Overall Height: 9.0 mm
Pinout and Wiring:
- – (GND): Connects to microcontroller system power ground (0V)
- + (VCC): Connects to positive DC power supply (+3.3V to +5V DC)
- S (Signal): Digital output signal connected to microcontroller digital GPIO interrupt input
Datasheet Reference:
- Consult the mechanical knock switch specifications and KY-031 schematic for percussion response dynamics, switch closure durations, and software debounce routines.
Commonly Used in:
- Secret knock-activated electronic door locks and safe boxes
- Electronic percussion drums, musical triggers, and rhythm tap counters
- Theft deterrent alarms detecting physical tampering or pounding on enclosures
- Interactive arcade games, carnival strength testers, and kinetic art displays
Applications:
- Knock-to-unlock electronic access control
- Electronic musical drum trigger
- Anti-tamper enclosure alarm sensor
- Interactive kinetic sculpture trigger
- Classroom impulse and percussion physics projects
Equivalent Models:
- KY-002 Shock Vibration Switch Module
- SW-18010P Vibration Sensor Breakout
- Piezo Ceramic Knock Sensor Module
- Keyestudio Knock Sensor Module
Package Includes:
- 1 × KY-031 Knock Sensor Vibration Detection Module

Reviews
No reviews yet. Be the first to share your experience!