GSM Alarm System– This project is based on the Security system using PIR Sensor, Arduino Uno, and GSM module “SIM900A”. The PIR sensor is used for Intruder detection. Whenever an unauthorized person is detected a message is sent on the desired number. A relay module is also connected with the Arduino Uno which can be used to turn on an Alarm or it can be used to turn on any light as an indication that intruder is detected.
PIR Sensor
The PIR Motion sensor module is an automatic control module based on infrared technology. It adopts LHI788 probe, which has high sensitivity, high reliability, low voltage working mode and low power consumption. It can be widely used in various types of automatic induction electrical equipment.
GSM module
This is the GSM module that I will be using in the GSM Alarm System project, in the market we have different types of GSM modules, the one I will be using today is sim900A, the same code is also tested on sim900D, so if you want you can also use sim900A.
Circuit
Code :
SoftwareSerial SIM900(2, 3);
String textForSMS;
int pirsensor = 10;
int buzzer = 9;
int red = 7;
int green = 8;
void setup() {
randomSeed(analogRead(0));
Serial.begin(9600);
SIM900.begin(9600); // original 19200. while enter 9600 for sim900A
Serial.println(" logging time completed!");
pinMode(pirsensor, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(red, OUTPUT);
pinMode(green, OUTPUT);
digitalWrite(buzzer, LOW);
digitalWrite(red, LOW);
digitalWrite(green, LOW);
delay(100);
}
void loop() {
if ( digitalRead(pirsensor) == HIGH) //
{
textForSMS = "\Any Person in your Room Plz Check It ";
digitalWrite(buzzer, HIGH);
digitalWrite(red, HIGH);
digitalWrite(green, LOW);
sendSMS(textForSMS);
Serial.println(textForSMS);
Serial.println("message sent.");
delay(8000);
}
if ( digitalRead(pirsensor) == LOW) //
{
digitalWrite(buzzer, LOW);
digitalWrite(red, LOW);
digitalWrite(green, HIGH);
delay(1000);
}
}
void sendSMS(String message)
{
SIM900.print("AT+CMGF=1\r"); // AT command to send SMS message
delay(1000);
SIM900.println("AT + CMGS = \"+91******\""); // recipient's mobile number, in international format
delay(1000);
SIM900.println(message); // message to send
SIM900.println((char)26); // End AT command with a ^Z, ASCII code 26
delay(1000);
SIM900.println();
// give module time to send SMS
}
NextDFM Software From NextPCB2 / 4
A PCB Design Problems Detector, An Engineering Solution ProviderImport the Gerber file with one click. No need for complicated file reading steps to review easily and improve efficiency.
Help you quickly familiarize DFM design specifications and production needs to determine whether there are any manufacturing constraints
1 / 3
Features
Make PCB design more standard Prevent the quality flaw
Impedance calculation function and lamination automation
Automatically generate the best puzzle
CAM350 free alternative version
Check Gerber files anytime, anywhere and parse it with one click
Instate Quote and evaluate delivery time Reduce cost and improve benefit
these are advantage comparing to Eagle and Altium
Comments