Introduction
Get this vibration sensor to build a burglar alarm system to protect your property. This cost-effective vibration sensor, characterized by high sensitivity, fast response and stable performance, is designed to detect vibration signals through its internal inductance coil. It supports 5~15V power supply and comes with digital signal output, adjustable sensitivity and onboard LED indicator for feeding back sensor status. When the vibration is detected, the sensor outputs Low and its indicator turns on. It can be connected with Arduino to make alarm system, vibration monitor, etc.
Specification
- Power Supply: 5-15V
- Output: switch quantity(output low)
- Output Current: ≤100mA(Max Load Current)
- Static Current: ≤6mA
Board Overview
Num | Label | Description |
---|---|---|
1 | GND | Sensor Power - |
2 | VCC | Sensor Power + |
3 | OUT | Sensor Signal Output |
Tutorial
Requirements
Hardware
- DFRduino UNO R3 (or similar) x 1
- Vibration Sensor x1
Software
Connection Diagram
Sample Code
/*!
* @File Infrared_Approach_Sensor.ino
* @brief Detect the status of IO3 and print it in serial port
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @licence The MIT License (MIT)
* @version V1.0
* @date 2021-03-15
*/
int OUT = 4;
int i = 0;
void setup()
{
Serial.begin(9600);
pinMode(OUT, INPUT);
}
void loop()
{
i = digitalRead (OUT);
Serial.println(i);
delay(5);
}
Expected Results
Read the IO3 status: when vibration detected, serial print 0, otherwise, serial print 1.
FAQ
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.