Contents
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 Name | Pin Application |
Vcc | It’s the module’s power supply pin that powers it with a 5V voltage. |
GND | The module’s ground pin |
DO | It is the module’s digital output pin useful |
SW 420 Features and Specs
Fig 2: The vibration sensor module is small in size
- First, It’s a readily available, cheap, and small-sized module.
- Then, You require an operating voltage of between 3.3V and 5V DC to run it.
- Thirdly, it needs a 15mA operating current and has LEDs for showing power and current.
- Also, it comes with bolt holes to facilitate easy installation.
- 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:
- The non-directional module has high sensitivity and thus can detect vibrations at a low level of detection.
- Also, it is waterproof and has an efficient response to a tilt or vibration.
- The digital interface module additionally has a compression resistance feature.
- Finally, the 140mm by 85mm by 10 mm module weighs 10g (gross weight).
SW 420 Working Principle
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
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 Module | Arduino Uno |
Vcc Pin | 5V 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 Uno | LED |
D13 | Anode |
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
Fig 6: You can use the module in a burglar alarm system
The module finds use in the following applications:
- Alarm systems such as earthquake motorcycle, and theft alarms
- Smart car applications
- Vibration detections
- Triggering shock and game control
- 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.