sumanskd
Published © GPL3+

Arduino-Based Vibration Alert System

Build an Arduino-based Vibration Alert System that sends real-time notifications to your Android phone via Bluetooth!

IntermediateProtip2 hours63
Arduino-Based Vibration Alert System

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
Grove - Vibration Sensor (SW-420)
Seeed Studio Grove - Vibration Sensor (SW-420)
×1
Battery Contact, PP3 (9V)
Battery Contact, PP3 (9V)
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Proteus
MIT App Inventor 2
MIT App Inventor 2
Arduino IDE
Arduino IDE

Story

Read more

Schematics

Vibration Detection System using Arduino, HC-05 & MIT App | Proteus + Real Hardware | Step-by-Step D

Download Arduino Code + MIT App (.aab + APK)

Code

Vibration Detection System using Arduino

C/C++
Code
#include <SoftwareSerial.h>

// Create SoftwareSerial on pins 10 (RX), 11 (TX)
SoftwareSerial bluetooth(10, 11);  // RX, TX

const int vibrationPin = 2;  // Vibration sensor connected to D2
const int buzzerPin = 8;     // Buzzer connected to D8

bool vibrationDetected = false;  // To track state

void setup() {
  pinMode(vibrationPin, INPUT);
  pinMode(buzzerPin, OUTPUT);

  Serial.begin(9600);        // Serial Monitor
  bluetooth.begin(9600);     // HC-05 Bluetooth module


}

void loop() {
  int sensorValue = digitalRead(vibrationPin);

  if (sensorValue == HIGH && !vibrationDetected) {
    vibrationDetected = true;
    digitalWrite(buzzerPin, HIGH);
    Serial.println("Vibration Detected");
    bluetooth.print("Vibration Detected\n");
    delay(500);
    digitalWrite(buzzerPin, LOW);
    delay(500);
  } else if (sensorValue == LOW) {
    vibrationDetected = false;  // Reset state when no vibration
  }

  delay(200);  // Small delay for stability
}

Credits

sumanskd
4 projects • 9 followers

Comments