Introduction and How it works:
This vehicle security system project uses a magnetic sensor with an Arduino microcontroller. The main purpose of this project is to provide security for your vehicle by sending you an SMS whenever there is an accident. Magnetic sensor is used to detect the accident here. magnetic sensor will detect in two ways:
- As soon as accident will happen the magnets near the magnetic sensor is going to be displaced and that displacement will be sensed by the magnetic sensor. Now in this situation the signal to microcontroller will be transmitted in real time, so that the microcontroller will take appropriate action.
- As soon as accident will take place the second thing happen is that the magnetic sensor glass tube ( Reed Switch )will be broken. So in this case as well the microcontroller will sense this and will consider it as an accident.
Whenever these two conditions will be met in case of the accident the microcontroller will send message to the family members. For further development of the project you can also use the GPS modem as well to share the location of the accident to the family members.
Components Required
Arduino Board or ATmega328 Microcontroller, Relay, Diodes , Capacitors, LED’s , Resistors, PCB, Crystal Oscillator, Pull up resistor , LCD, Transistor BC547, Buzzer, Magnetic Sensor, Magnet, Adaptor 12v with DC jack , GSM Modem, voltage divider circuit, 7805 Voltage Regulator etc.
Circuits Diagram of Main Microcontroller Board
- Microcontroller Section of the Project
Here in this section LCD will Display what’s happening in the project and microcontroller will act as heart of the project. microcontroller will receive signal from the magnetic sensor and will send the signal to the GSM modem.
2. Buzzer Section Circuit Diagram
As soon as accident will be detected the buzzer will create the sound signal and light signal for the alert of an accident so that anyone near and dear can approach the site.
3. GSM Modem Section
GSM modem will receive the signal from the microcontroller and will send the message to the family member.
4. Magnetic Section of the Project
Magnetic sensor will detect the accident and will send the signal to the microcontroller.
Code Of the Project
// Code Written and Developed by "Circuits Bazaar"
#include <LiquidCrystal.h>
LiquidCrystal lcd(3, 13, 9, 10, 11, 12);
int buz = 5; // 5th of arduino & 11 pin of avr controller ...
int mag = 6;
void setup()
{
pinMode(buz,OUTPUT);
pinMode(mag,INPUT);
Serial.begin(9600);
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Vehicle Accident");
lcd.setCursor(0, 1);
lcd.print("Alert System");
digitalWrite(buz,HIGH);
delay(1000);
digitalWrite(buz,LOW);
delay(1000);
digitalWrite(buz,HIGH);
delay(1000);
digitalWrite(buz,LOW);
delay(1000);
digitalWrite(buz,HIGH);
}
//Main Loop To Calculate RPM and Update LCD Display
void loop()
{
if(digitalRead(mag)==HIGH)
{
while(digitalRead(mag)==HIGH)
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Vehicle Got Into");
lcd.setCursor(0, 1);
lcd.print("An ACCIDENT");
init_sms();
send_data(" YOUR VEHICLE GOT INTO THE ACCIDENT ");
send_sms();
digitalWrite(buz,HIGH);
delay(500);
digitalWrite(buz,LOW);
delay(500);
digitalWrite(buz,HIGH);
delay(500);
digitalWrite(buz,LOW);
delay(500);
digitalWrite(buz,HIGH);
delay(500);
digitalWrite(buz,LOW);
delay(500);
digitalWrite(buz,HIGH);
delay(500);
digitalWrite(buz,LOW);
delay(500);
digitalWrite(buz,HIGH);
delay(500);
digitalWrite(buz,LOW);
delay(500);
digitalWrite(buz,HIGH);
delay(500);
digitalWrite(buz,LOW);
delay(500);
}
}
else
{
digitalWrite(buz,HIGH);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Vehicle Is In");
lcd.setCursor(0, 1);
lcd.print("Safe Condition");
while(digitalRead(mag)==LOW);
}
}
void init_sms()
{
Serial.println("AT+CMGF=1");
delay(200);
Serial.println("AT+CMGS=\"+918684884488\""); //
delay(200);
}
void send_data(String message)
{
Serial.println(message);
delay(200);
}
void send_sms()
{
Serial.write(26);
}
Video Demonstration:
This project is used to detect any kind of accident of the vehicle. The Magnetic Sensor can be installed in all the directions and if any damage will happen to the vehicle the SMS will be send to the family members or owner of the vehicle.
To book the project Click Here
It is really a nice and useful piece of info. I am glad that you shared this useful information with us. Please keep us informed like this. Thank you for sharing.