Percussion Knock Sensor KY-031

Percussion Knock Sensor KY-031

Sensors
DET581
Part.No: KY-031
€2.00
In Stock
Immediate Dispatch
KY-031 Percussion Knock Sensor Module – detects vibration and impact signals, outputting a digital signal to trigger actions such as LED flashing on Arduino projects. Compact 30×18×6 mm board with built-in LED indicator.

 

The KY-031 Percussion Knock Sensor Module (MPN: KY-031) is a digital vibration/knock detection module designed for Arduino and compatible microcontroller projects. When a physical knock or percussion impact is detected, the sensor outputs a digital HIGH signal on its output pin, allowing your microcontroller to react instantly — for example by flashing an LED, triggering an alarm, or logging an event. Its compact footprint and simple 3-pin interface make it one of the easiest sensor modules to integrate into any beginner or intermediate project.

Key Features

  • Digital Output: Outputs a clean HIGH/LOW signal on impact → no ADC required, works directly with any digital pin
  • Built-in LED Indicator: On-board LED lights up when a knock is detected → instant visual feedback without extra components
  • Compact Form Factor: 30×18×6 mm PCB → fits easily inside enclosures and wearables
  • Simple 3-Pin Interface: VCC, GND, Signal → plug-and-play wiring in seconds
  • Arduino Example Code Included: Ready-to-use sketch available → ideal for beginners and classroom projects

Pinout & Wiring

PINSymbolDescription
1VCCPower supply positive (connect to 5V)
2GNDPower supply ground
3S (Signal)Digital output — connect to a digital input pin (e.g. D3)

Wiring Note: Connect VCC to Arduino 5V, GND to Arduino GND, and the Signal pin to digital pin 3. The built-in LED on the module will flash on each detected knock. For the example sketch, connect an additional LED (or use the built-in board LED) to digital pin 13.

Compatibility

  • Arduino UNO / Nano / Mega: Fully compatible — operates at 5V logic, connects directly to any digital GPIO pin without level shifting.
  • Other 5V microcontrollers: Compatible with any 5V digital-input microcontroller platform.

Typical Applications

  • Knock-activated switches: Turn on lights or appliances by tapping a surface — great for hidden panel triggers.
  • Anti-theft vibration alarm: Detect if a protected object is moved or struck and trigger an audible/visual alert.
  • Interactive art installations: Respond to drumming or tapping gestures in physical computing projects.
  • Educational robotics: Teach students digital sensor reading and interrupt-based programming with a tangible, fun input.
  • Percussion-triggered data logging: Count and timestamp knock events for sports training equipment or mechanical testing rigs.

Technical Specifications

InterfaceDigital output (3-pin: VCC / GND / Signal)
Output TypeDigital (HIGH on knock detected)
Dimensions30 × 18 × 6 mm (approx.)
MPNKY-031

FAQ

Q: Which Arduino pin should I connect the knock sensor signal to?
A: The example sketch uses digital pin 3 for the sensor signal and pin 13 for the LED. You can reassign these to any available digital pins by changing the variable definitions at the top of the sketch.

Q: Does the KY-031 work with ESP32 or Raspberry Pi?
A: The KY-031 is rated for 5V systems and is confirmed compatible with Arduino. Use with 3.3V platforms such as ESP32 or Raspberry Pi may require a level shifter or voltage divider on the signal line to avoid damaging the GPIO pin.

Package Contents: 1 × KY-031 Knock Sensor Module
Note: This module is designed for 5V operation. Do not connect directly to 3.3V GPIO pins without appropriate level shifting.
16 other products in the same category:
Product added to wishlist
Product added to compare.