SW-420 Motion Sensor Module Vibration Switch Alarm

 

Test 2

 

Vibration sensor module alarm Motion sensor module vibration switch SW-420 module based on the vibration sensor SW-420 and Comparator LM393 to detect if there is any vibration that beyond the threshold. The threshold can adjust using an onboard potentiometer. When this no vibration, this module output logic LOW the signal indicates LED light, and vice versa.

If the module does not vibrate, the vibration switch was closed on state, the output of low output, the green indicator light. The product vibrates, vibration switches momentary disconnect, the output is driven high, the green light does not shine.

The output can be directly connected to the microcontroller, which to detect high and low level, so as to detect whether the environment exists vibration, play a role in the alarm.

It is useful for a variety of shocks triggering, theft alarm, smart car, an earthquake alarm, motorcycle alarm. This module when compared with a normally open pneumatic shock sensor module, shock triggered much longer can drive relay module the use of the company’s production of SW-420 normally closed type vibration sensors. comparator output signal clean wave well, driving ability, 15mA rated voltage and 3.3V-5V output: digital switching output (0 and 1) a bolt-hole for easy installation small Board PCB dimensions: 3.2cm x 1.4cm. using the wide LM393 voltage comparator.

Note:
  • Do not reverse the power directions, otherwise, it is possible to burn the chip
  • Signal LED light is output Low, signal LED OFF output is High
  • The output level close to the input voltage. 
  •  

ABOUT THIS PROJECT

 

In this project, we will connect Arduino with Vibration sensor and LED. When no vibration is detected, Vibration sensor output is 0 (low voltage),otherwise its output is 1(high voltage)。 If Arduino get 0 (no vibration) from vibration sensor it will turn on green LED and turn off Red LED. If Arduino get 1 from vibration sensor, it will turn on Red LED and turn off green LED.

 

SCHEMATICS

 

Testv

 

 

CODE

 

Vibration Sensor Module (Code)Arduino

 

int vib_pin=7;

int led_pin=13;

void setup() {

  pinMode(vib_pin,INPUT);

  pinMode(led_pin,OUTPUT);

}

 

void loop() {

  int val;

  val=digitalRead(vib_pin);

  if(val==1)

  {

    digitalWrite(led_pin,HIGH);

    delay(1000);

    digitalWrite(led_pin,LOW);

    delay(1000);

   }

   else

   digitalWrite(led_pin,LOW);

}

 

I hope you’ve found this guide useful. 
 

Les commentaires sont clôturés