Posted by Circuits Arena on Friday, 10 February 2017
GSM - SMS-based laser safety circuit with the Arduino is the artlcle explaining GSM - SMS-based laser safety circuit We always fear of scams, especially when we leave our property alone, that's where the security...
GSM - SMS-based laser safety circuit
We always fear of scams, especially when we leave our property alone, that's where the security system will come in handy. Loud alarm can be enough to attract the attention of the neighboring region of each and keep a thief.
SMS notification to alert the user to take the necessary measures only after the scammer broke into your property. Security systems must be implemented in a week in your home / office, such as doors and windows, sometimes multiple numbers of security systems necessary to ensure the maximum protection of the thief at different points in your home or office.
GSM - SMS-based laser safety circuit.
This GSM circuit consists of Arduino, the meaning of which the invasion and make decisions. GSM modem is instructed to send an SMS to the user and several other passive components for intrusion detection. Arduino scans a laser beam to interrupt a light 500 times per second. LDR to feel the presence of the laser light and gives a signal to the Arduino.
Divider 10k and LDR voltage waveform, the analog signal is taken from a point between the two components. When the intensity of incident light is reduced to some extent or completely cut-off light in the Arduino to recognize the invasion.
10K resistor that is connected to "activate button" acts as a pull down resistor, to prevent the pin from activating ARDUINO randomly. The transistor activates the relay in case of invasion and the diode protects the rest of the circuit from high voltage spikes when switching on and off the relay. In order to activate the security system, we have to press the activation button, the LED confirmed that the button is pressed.
When you get home to turn off the system, press the reset button. Solder Push-To-button on the terminal Arduino reset button, so that the reset button to turn off the system can be easily reached from outside the installation. After the intrusion detection scheme, the relay will be activated for 2 minutes on and off, and it will be ready to detect the next invasion.
Program:
#include <SoftwareSerial.h>
SoftwareSerial gsm(9,8);
int LDR = A0;
int OP = 7;
int start = 6;
int LED = 5;
int th = 300;
int x;
unsigned long A = 1000L;
unsigned long B = A * 60;
unsigned long C = B * 2;
void setup()
{
Serial.begin(9600);
gsm.begin(9600);
pinMode(LDR,INPUT);
pinMode(OP,OUTPUT);
pinMode(start,INPUT);
pinMode(LED,OUTPUT);
}
void loop()
{
if(digitalRead(start)==1)
{
digitalWrite(LED,HIGH);
delay(C);
A:
x = analogRead(A0);
Serial.println(x);
if(x<=th)
{
delay(2);
goto A;
}
if(x>=th)
{
digitalWrite(OP,HIGH);
Serial.println("Sending SMS......\n");
gsm.println("AT+CMGF=1");
delay(1000);
gsm.println("AT+CMGS=\"+91XXXXXXXXXX\"\r"); // Replace x with mobile number
delay(1000);
gsm.println("Security Warning: Intruder detected."); // The SMS text you want to send
delay(100);
gsm.println((char)26); // ASCII code of CTRL+Z
delay(1000);
Serial.println("Message is sent\n");
delay(C);
digitalWrite(OP,LOW);
goto A;
}
}
}
//--------------Program developed by R.Girish---------------//
Please replace the “XXXXXXXXXX” with your phone number to receive SMS.