KY-002 Vibration Switch Module
SKU: ELC1102

Arduino Vibration Switch Module KY-002 Keyes allows detection of shock and vibration. The KY-002 Vibration Switch Module consists of a conductive vibration spring and a 10k resistor, it will react to shock and vibration by closing the circuit.
Specifications:
- Operating Voltage: 5V
- Dimensions 18.5mm x 15mm [0.728in x 0.591in]
Connection Diagram
Connect the Power line (middle) and ground (-) to +5 and GND respectively. Connect signal (S) to pin 3 on the Arduino.
Example Code
The following Arduino sketch produces a shock flasher. Pin 13 (LED) on the Arduino will flash when KY-002 detects movement. Pin 3 is used as input from KY-002.
int Led = 13; // define the LED Pin
int shock = 3 // define the sensor Pin
int val; // define a numeric variable val
void setup () {
pinMode (Led, OUTPUT); // LED pin as output
pinMode (shock, INPUT); // input from KY-002 sensor
}
void loop () {
val = digitalRead (shock); // read the value from KY-002
if (val == HIGH ) {// when sensor detects shock, LED flashes
digitalWrite(Led, LOW);
} else {
digitalWrite (Led, HIGH);
}
}
Products you may like!








Secure Checkout
We are PCI-DSS compliant and use 256 bit SSL encryption.Instant Dispatch
99% of our orders are shipped within 24 hours.Bulk Orders
Use the contact form for bulk order quotes.Call us (Weekdays)
+91 93183 94903India: Rani Bagh, New Delhi 110034 +91 93183 94903
USA: 405, Kennedy Space Center, FL 32899 | +1 (321) 210-8472
Hong Kong: Unicorn Trade Centre, 127-131 Des Voeux Road, Central HK
Built by hackers for hackers. | Join our Telegram | Copyright © 2021 ThinkRobotics.in.