Skip to product information
1 of 2

Blue PCB Electronics

2D19 Normally open vibration sensor module; vibration switch; alarm module

2D19 Normally open vibration sensor module; vibration switch; alarm module

Regular price Dhs. 20.00
Regular price Sale price Dhs. 20.00
Sale Sold out
View full details

Description

The SW-18010P sensor is used to detect vibration. The sensor has a small spring inside a metal tube. When the sensor vibrates, the spring hits the metal tube and the sensor will be activated.

This sensor has two digital and analog outputs. When the sensor vibrates, the digital output changes from HIGH to LOW and the analog output changes from 1023 to 0.

Features:

  • Operating voltage: 3.3V to 5V
  • Including a fixed hole on board for easy installation
  • Potentiometer included to adjust sensitivity
  • Switch indicating LED

Pinout

This Module has 4 pins:

  • VCC: Module power supply – 3.3V to 5V
  • GND: Ground
  • D0: Digital Output
  • A0: Analog Output

You can see the pinout of this module in the image below.

SW-18010P Vibration Sensor Module Pinout

Required Material

Hardware components

  • Arduino UNO R3
  • SW-18010P Vibration Sensor Module
  • Male to Female jumper wire 

Step 1: Circuit

The following circuit show how you should connect Arduino to SW-18010P sensor. Connect wires accordingly.

SW-18010P Module Arduino circuit

Step 2: Code

Upload the following code to your Arduino.

#define Dig_pin 7
int Dig_out = LOW;
int Ana_out = 0;
 
void setup() {
   Serial.begin(9600);
}
 
void loop() {
   Dig_out = digitalRead(Dig_pin);
   Ana_out = analogRead(A0);
   Serial.print("Anaolog : ");
   Serial.print(Ana_out);
   Serial.print("          Digital :");
   Serial.println(Dig_out);
   delay(500);

In this code, you can see the sensor analog and digital output values after vibration. First, we set two digital and analog pins as input. Then the values of two inputs appear on Serial Monitor.

The output is as follows. As you can see, when the sensor vibrates the digital and analog output will be zero.

Â