Project Documentation UMIC

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Motivation :

With the development of technology, the concept of simple home has also been changing into
smart home and the concept of home has changed drastically during the last decade. It has
increased the risk of burglary and intrusion using the latest modern technologies
available. The busy lifestyle of human beings along with the increasing risk has led to the
necessity of remote surveillance of homes. It is the innovation in the keyless door lock by
adding extra security features.
There are different ways to have the surveillance but the easiest and most advanced
technology accessible to everybody is mobile phone surveillance.
The mobile phone can be used for different purposes with the help of the applications
developed for the phones. This project was a simple application project demonstrating a
smart home system.

Aim:
The microcontroller unit responds to the instructions sent by the mobile phone according to
the necessity of the application as well as triggers the alarm upon a critical situation.
The goal of the project was to implement a smart home system by controlling the electronic
devices at home remotely with a mobile phone and to receive alerts on movement around
restricted premises. The devices were controlled by sending instructions as an SMS or Call
and the alerts were received as SMS or Call.
However the system is limited to the GSM network available and will not work if the GSM
network is not available. The PIR sensor could be triggered with the movement of some
animals such as a rat around the premises or by light striking the sensor directly, which could
trigger a false alarm.
The mobile phone did not need to have any special application or hardware to be used as a
mobile station. Any mobile phone supporting the SMS could be used as a mobile station. The
project could be further extended by using other technologies for communication, for example
wireless communication using radio frequency, the Bluetooth technology or the Internet. The
ideas and information used in the design could be used for development of smart home
security system.

Components required :
Arduino Uno (1350/-)
GSM Sim900 Module(1200/-)
Servo Motor (1230/-)
PIR Motion sensor (230/-)
Battery 9V
Deadbolt Lock

Project Description :
The system mainly comprises two parts: the mobile station and the microcontroller unit. The
mobile station is responsible for giving the command and the control instruction to the devices
and sensors and to get the response from them. It is just a user interface and does not control
the devices. The second unit, the microcontroller unit, is responsible for controlling the

devices, processing information gathered from the devices as well as from the mobile station.
The microcontroller unit is the brain of the system and controls and processes information to
and from all other units of the system. The microcontroller unit consists of a sensors, Servo
Motor and a light along with the sim900 module. The Panasonic passive infrared sensor is the
motion detector of the system. The data from the sensors is continually processed by the
microcontroller and an alert is sent to the mobile station if something is sensed. These units of
the system are responsible for the security of a home.
The next part of the microcontroller unit is the light system which can be operated remotely
using the mobile stations. In this project, a simple led light is used to show the demo of the
remote light management system. The user could get information about the state of light,
whether it is ON or OFF, in the mobile station and control the state of light remotely from the
mobile station. The last is Servo Motor, which responsible for the locking and unlocking of the
lock. Servo motor is fixed with lock and it drives the pinion of the lock which result in pushing
the lock/unlock. The Sim900 GPRS/GSM module acts as the mediator between the
microcontroller unit and the mobile station and is responsible for the communication between
them. This unit is responsible for sending information from the microcontroller to the mobile
station and for sending the instruction from the mobile station to the microcontroller. The
instruction sent by the user from the mobile station is executed by the microcontroller.
In addition to the microcontroller unit, the second unit of the system is the mobile station
which is just a mobile phone. It does not require any special feature or any special application
for the mobile phone to be a part of the system. Any mobile phone supporting the messaging
application is suitable for the system. The instruction to the microcontroller is sent by using
text messages and the alert from the microcontroller is received as a text as well. The system
acts as a smart home system providing security to the home as well as providing a remote
management system for the devices inside the home.

Interfacing Sim900 GSM Module


The Sim900 module is an important part of the system responsible for communication
between the microcontroller and the mobile phone. AT commands are used to interface the
module as well as to configure it. AT commands are inserted in C-language as a string of
characters which are sent to the module using the terminal program. AT commands stands for
Attention commands.
The Rx and Tx pins of GSM Module is connected with Arduino Uno (2,3) pin means Rx of
GSM Module with pin number 2 and Tx with pin number 3.
[For more information why 2,3 had select to connect with GSM Module, please visit
https://www.arduino.cc/en/Reference/AttachInterrupt]
Sometime there may showing nothing when AT command is input in the command window.
Basicaly, When AT is input into the UNO command window, It should display OK, But it
doesnt most of the time. Therefore, Coolterm is free licensed software that allow smoothly
configuring Sim900.
[Download Colterm - http://freeware.the-meiers.org/]
The following code is for testing purpose that module and sim conncection are smoothly
working

After uploading code in Arduino and made connection with GSM Module, open coolterm
software, Click on Connect, then type AT, there must be ok as reply. This mean it is now
ready for further work.

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,3);
char inChar = 0;
void setup()
{
Serial.begin(9600);
Serial.println("Device ready");
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
}
void loop() // run over and over
{
if (mySerial.available()){
inChar = mySerial.read();
Serial.write(inChar);
delay(20);
}
if (Serial.available()>0){
mySerial.write(Serial.read());
}
}

#include <SoftwareSerial.h>
#include <Servo.h>
SoftwareSerial myserial(2,3);
Servo myservo;
char inchar=0;
int i=0;
int a;
void setup()
{
Serial.begin(9600);
myservo.attach(8);
myserial.print("AT+CLIP=1\r");
myserial.begin(9600);
myservo.write(180);
myserial.print("AT+CLIP=1\r"); }
void loop() { if(myserial.available()>0)
{ inchar=myserial.read(); if(inchar=='7')
{ delay(10); inchar=myserial.read(); if(inchar=='7')
{ delay(10); inchar=myserial.read(); if(inchar=='3') { delay(10); inchar=myserial.read(); if(inchar=='8')
{ delay(10); inchar=myserial.read(); if(inchar=='6') { delay(10); inchar=myserial.read(); if(inchar=='9')
{ delay(10); inchar=myserial.read(); if(inchar=='4') { delay(10); inchar=myserial.read(); if(inchar=='6')
{ delay(10); inchar=myserial.read(); if(inchar=='1') { delay(10); inchar=myserial.read(); if(inchar=='2')
{ delay(10); a=myservo.read(); if(a==0) { for(i=0;i<180;i++) { myservo.write(i); delay(10); } }
else{ for(i=180;i>0;i--) { myservo.write(i); delay(10); } } myserial.println("ATH"); }}}}}}}}}}}}

You might also like