QB013/QB070 Vibration Sensor
1.Product Introduction
The vibration sensor adopts SW-18010P high sensitive vibration switch, a kind of spring non-directional vibration sensing device, which can be triggered at any Angle.
When the module is static without vibration, the two internal pins are disconnected, and the signal S port will output a high level.
When subjected to external force collision or shaking vigorously, spring deformation and central electrode contact conduction make two pins instantaneous conduction state, signal S port will output low level. When the external force disappears, the circuit resumes to the disconnected state, and the signal S port will output a high level.
Application reference: security system, smart home, vehicle anti-theft system, etc.
2.Parameter Specification
Parameter |
Value/Representation |
---|---|
Operating voltage |
3.3~5V |
Operating temperature |
-20°C~+70°C |
Output signal |
Digital signal |
Size |
3.16cm*2.38cm |
3.Wiring Diagram
Vibration Sensor |
UNO |
---|---|
VCC |
5V |
GND |
GND |
S |
Digital Pin 7 |
4.Sample Code
1void setup() {
2 pinMode(7,INPUT);//The signal pin of the vibration sensor is connected to the 7-pin of the arduino controller board
3 Serial.begin(9600);//Serial port initialization, baud rate 9600
4}
5void loop() {
6 Serial.println(digitalRead(7));//The serial port displays the detection value of the vibration sensor in real time
7}
5.Test Result
After uploading the code to the controller board, open the serial port monitor of the Arduino IDE, set the baud rate to 9600, and switch to the scroll mode.
When we shake the vibration sensor, it returns 0; When we don’t shake it, the sensor returns 1.
Hint
The SW-18010P pin is relatively thin, do not break it, just shake the test.
When the vibration sensor is shaking, it is instantly on and then off, so the data 0 May be difficult to capture.
6.Related Resources
7.Get One Now
B2B Business: info@acebott.com