SW 420- A Vibration Sensor Module Guide

Published on May 27, 2022 , Last modified on October 24, 2024
by Hommer Zhao
A Normally closed vibration sensor module for Arduino and alarm systems

Vibration detection is critical in many security applications, such as theft alarms. Also, it is important to identify natural phenomena such as earthquakes. Hence, the SW 420 module for the vibration/tilt sensor is an important electronic device for simple and sophisticated projects. Take a look at this simple tutorial on the vibration module. 

What is an SW 420?

It is a digital vibration sensor module featuring an SW-420 Vibration Sensor and an LM393 Comparator IC. The cost-effective vibration sensor module also has a 10K potentiometer, which is essential for modifying the sensitivity.

Furthermore, the LM393 voltage comparator is useful in enabling a relatively smooth digital output. The comparator will detect an input vibration signal via a preset. Next, it gives an output indication of a high logic. However, the Builtin comparator circuit stays in its logic low state in the absence of vibration.  

Lastly, the module is simple to use, making it ideal for simple DIY projects in addition to sophisticated detection projects. 

SW 420 Pin Configuration

Pin NamePin Application
VccIt’s the module’s power supply pin that powers it with a 5V voltage. 
GNDThe module’s ground pin
DOIt is the module’s digital output pin useful 

SW 420 Features and Specs

The vibration sensor module is small in size

Fig 2: The vibration sensor module is small in size

  1. First, It’s a readily available, cheap, and small-sized module. 
  2. Then, You require an operating voltage of between 3.3V and 5V DC to run it. 
  3. Thirdly, it needs a 15mA operating current and has LEDs for showing power and current.
  4. Also, it comes with bolt holes to facilitate easy installation. 
  5. Finally, you can easily interface it with microcontrollers or a typical Digital/Analog IC.

Also, while shopping for an SW 420 module, you might come across the Grove – Vibration Sensor model. In addition to the above-highlighted features and specs, it will further have the following properties: 

  1. The non-directional module has high sensitivity and thus can detect vibrations at a low level of detection. 
  2. Also, it is waterproof and has an efficient response to a tilt or vibration.
  3. The digital interface module additionally has a compression resistance feature.
  4. Finally, the 140mm by 85mm by 10 mm module weighs 10g (gross weight). 

SW 420 Working Principle

An illustration of a vibration pulse wave

Fig 3: An illustration of a vibration pulse wave

The module operates as a switch that opens and closes an electrical contact. Also noteworthy, in its default state, it will remain closed. Therefore, the vibration switch is in a conduction state without vibration. 

However, when it detects a vibration, it opens the contacts, and consequently, there’s a rise in electrical resistance. It prompts the generation of a pulse, which will, in turn, trigger the circuit. The pulse is then passed to the LM393 comparator IC for digitization. Finally, the module outputs the pulse as a digital signal. 

SW 420 Vibration Sensor Interfacing with Arduino

You can interface the module with an Arduino UNO microcontroller

Fig 4: You can interface the module with an Arduino UNO microcontroller

For this exercise, the aim is to create a circuit whereby the detection of vibrations switches on an LED. The connection procedure is, therefore, as follows. 

First, connect either a 3.3V or 5V power supply to the module’s Vcc pin. Next, connect the Arduino Uno’s GND pin with the module’s ground pin. Lastly, connect the module’s digital pin to any Arduino Uno’s digital pins. 

The table below will be handy in making the above connections. 

Vibration Sensor ModuleArduino Uno
Vcc Pin5V power supply
GND Pin Ground pin (often black)
Digital Output (DO) Pin A5 (It’ll be green in color)

Next, connect the Arduino Uno to the LED as follows: 

Arduino UnoLED
D13Anode
Ground Pin (GND)Cathode

Arduino Code

Use the Arduino Code we have provided below to control the module.

How does the code work?

Note that you can effortlessly interface the SW 420 with Arduino UNO or, in other cases, the Eclipse IDE software. In the case of the code we’ve provided above, it is on Eclipse IDE software but features an Arduino extension. 

Therefore, the inclusion of the ‘Arduino. h’ header file, in this case, is inevitable for the code to work. But, if you can write this code on Arduino IDE, you don’t require an ‘Arduino. h’ header file. 

Applications of the SW 420 module

You can use the module in a burglar alarm system 

Fig 6: You can use the module in a burglar alarm system 

The module finds use in the following applications: 

  1. Alarm systems such as earthquake motorcycle, and theft alarms 
  2. Smart car applications 
  3. Vibration detections
  4. Triggering shock and game control 
  5. Identifying objects. 

Conclusion

The SW 420 module is a critical component in vibration detection systems that is simple to use and interface with microcontrollers. For now, that’s all on this module, but you can still reach out to us for further elaboration. 

Avatar photo
Hommer Zhao
Hi, I'm Hommer Zhao, the founder and Chief Editor at WellPCB. With extensive experience in the PCB industry, I oversee all content to ensure it meets the highest standards of accuracy and insight. We proudly serve over 4,000 customers globally. For inquiries or more information, don't hesitate to reach out. Your satisfaction is my top priority!