Grove Vibration Sensor SW-420 Datasheet by Seeed Technology Co., Ltd

«bseeedé
Grove - Vibration Sensor(SW-420)
The Grove - Vibration Sensor (SW-420) is a high sensitivity non-directional vibration
sensor. When the module is stable, the circuit is turned on and the output is high. When
the movement or vibration occurs, the circuit will be briefly disconnected and output low.
At the same time, you can also adjust the sensitivity according to your own needs.
All in all, this is a perfect module for vibration or tilt sensor.
Features
Non-directional
High sensitivity
Respond to vibration, tilt
Waterproof
Compression resistance
0 GND: connect this module to the system GND 0 VCC: you can use 5V or 3.3V for this module NC: none connected in this module . SIG: output the Vout voltage signal a Potentiometer: you can use a screwdriver to rotate the potentiometer which controls the sensitivity of this sensor. 6 GND: the GND pin of the potentiometer. . Vsen: the lower the voltage of Vsen, the higher the sensitivity 0 VCC: the VCC pin of the potentiometer. 9 SW»420: the Vibration Sensor
Specification
Item Value
Operatingvoltage3.3V/5V
InterfaceDigital
Applications
Car, bicycle, motorcycle burglar alarm
Game control
Vibration detection
Hardware Overview
Pin Map
orgmunzpw +smn Gym/e anu TPWQ- -
Schemaitc
First, let's begin with the SW1 which at the lower left corner. Actually, the SW1 is the
vibration module SW-420. When the module is in a stable state, the module is turned
on. Pin2 of U1A is connected to the GND though SW1.
The VR1 is the potentiometer, the Pin2 of the potentiometer is connected to the Pin3 of
the U1A
The U1A is a comparators. For the comparators,
Vout={High,ifV+>VLow,ifV+<VVout={High,if V+>VLow,if V+<V
V+ connects to Pin3, V- connects to Pin2, Vout connects to Pin1.
For the V+ you can adjust it by rotate the potentiometer, for instance, we can make
it VCC/2VCC/2.
For the V-, it depends on the SW1(SW-420):
If this module is in a stable state, the SW1 is turned on, Pin2 of U1A is connected to
the GNDthrough SW1. It will be:
V−=0VV+=VCC/2}Vout=HighV=0VV+=VCC/2}Vout=High
If the module vibrates or tilts, the SW1 will be turned off, the voltage of V- will be pulled up
by the VCC through R1. Once the V- is higher than the VCC/2, then:
V−>VCC/2V+=VCC/2}Vout=LowV>VCC/2V+=VCC/2}Vout=Low
Now you can set the V+ to adjust the sensitivity, just remember: the lower the voltage
of V+, the higher the sensitivity😆
The platforms mentioned above as supported isIare an indication of the module's hardware or theoritical compatibility. We only provide software library or code examples for Arduino platform in most cases. It is not possible to provide software library / demo code for all possible MCU platforms. Hence, users have to write their own software 1 Please plug the USB cable gently, othenlvise you may damage the port. Please use the USB cable with 4 wires inside, the 2 wires cable can't transfer data. If you are not sure about the wire you have, you can click hereto buy. 2 Each Grove module comes with a Grove cable when you buy. In case you lose the
Platforms Supported
Arduino RaspberryPiBeagleBoneWioLinkItONE
Caution
The platforms mentioned above as supported is/are an indication of the module's
hardware or theoritical compatibility. We only provide software library or code examples
for Arduino platform in most cases. It is not possible to provide software library / demo
code for all possible MCU platforms. Hence, users have to write their own software
library.
Getting Started
Play With Arduino
Hardware
Materials required
SeeeduinoV4.2 BaseShieldGrove‐VibrationSensorGrove‐Buzzer
Note
1 Please plug the USB cable gently, otherwise you may damage the port. Please use
the USB cable with 4 wires inside, the 2 wires cable can't transfer data. If you are not
sure about the wire you have, you can click here to buy.
2 Each Grove module comes with a Grove cable when you buy. In case you lose the
Grove cable, you can click here to buy.
Step 1. Connect the Grove - Vibration Sensor (SW-420) to the D2 port of the Base
Shield.
If we don't have Grove Base Shield, We also can directly connect this module to
Step 2. Connect the Grove - Buzzer to the D3 port of the Base Shield.
Step 3. Plug Grove - Base Shield into Seeeduino.
Step 4. Connect Seeeduino to PC via a USB cable.
Note
If we don't have Grove Base Shield, We also can directly connect this module to
Seeeduino as below.
Seeeduino Grove‐VibrationSensor
5VRed
GNDBlack
NCWhite
D2Yellow
Seeeduino Grove‐Buzzer
5VRed
GNDBlack
NCWhite
D3Yellow
measz—nozomslwouhuma If every thing goes well, everytime you move, shake or tilt the Grove - Vibration Sensor
Software
Note
If this is the first time you work with Arduino, we strongly recommend you to see Getting
Started with Arduinobefore the start.
Step 1. Open your Arduino IDE, start a new sketch.
Step 2. Copy all the code below, or you can just click the icon in upper right
corner of the code block to copy the following code into the new sketch.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// constants won't change. They're used here to set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int buzzer = 3; // the number of the buzzer pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output:
pinMode(buzzer, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop() {
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
digitalWrite(buzzer, LOW);
} else {
// turn LED off:
digitalWrite(buzzer, HIGH);
}
}
Step 3. Upload the demo. If you do not know how to upload the code, please check How to
upload code.
Success
If every thing goes well, everytime you move, shake or tilt the Grove - Vibration Sensor
the Grove - buzzer will ring.
Project This is the introduction Video of this product, simple demos, you can
have a try.
Tech Support Please do not hesitate to submit the issue into our forum
http://wiki.seeedstudio.com/GroveVibration_Sensor_SW420/11518