anti theft & automation using arduino
TRANSCRIPT
Anti-Theft & Automationusing
Arduino
Batch Members
Afroze Kabeer Khan. MRuthra Kumar. R
Vishal. V
Abstract
The Project is mainly to protect homes from rising threat of being robbed. It provides the ability to sense motion/activity in your home and alert you with an image of current status in your home. It also has the ability to sense if there is any kind of gas leakage and sends notification to you. The Project is also created with automation, which provides the ability to control your household electrical appliances through internet with password verification with SHA-256 Algorithm.
Advantages Dis-Advantages
• Control Equipment anywhere from world
• Sense range for 20 meters to detect activity
• Two motion sensors for precision• Gas sensor detects at 10000ppm
precision • MQ-6 detects Iso-Butane, LPG,
LNG• User will be notified through
SMS/Internet
• Possible connectivity issues• Misfires due to increase
sensitivity• IP address and port forwarding
required to gain control anywhere from world
• Internet connectivity is a must for usage
• Wireless router is required to gain access
Block Diagram (Electrical)
GSM Module
Arduino Ethernet Shield
Arduino BoardATmega2560Motion Sensor
(2)
Relay 12V 8-Channel
Ch1 Ch2 Ch3 Ch4 Ch5
AC
Siren Lights Motor Device 1 Device 2
Signal Line
Phase Line
Neutral Line
Ch....
SMPS
Connected to LAN
Connected to Mobile Network Devices
Connected to LAN use WebAPP
MQ - 6Gas
Sensor
Block Diagram(Cloud)
Server Machine(IP: 10.0.0.X)
LAN(10.0.0.1)
Arduino Server(IP: 10.0.0.Y)Performs Operation
Sends Response
MySQL (Port: 3306) Table(Login Details)
User Name
Password (SHA-256)
PHP(Port: 80)
QueryResponse
HTTP RequestTo
Arduino Server
HTTP ResponseFrom
Arduino Server Request
FromPHP Server
ResponseTo
PHP Server
QueryRequest
Connected to Internet
Serial CommunicationAbout
Serial communication is used to transfer data through wires in order to reduce number of IC’s used. Various methods where introduced in serial communication. In this project we have used
SDA – SCLRx - Tx
Rx/Tx Communication
SDA/SCL Communication
List of Electrical equipments
• Arduino Mega 2560 • Arduino Ethernet Shield• 220V-AC Supply• 12V – 8 Channel Relay• Electrical equipments to be controlled• SIM900A GSM Module• PIR Motion Sensor• MQ-2 Gas Sensor• Siren• SMPS• Patch chords , Plugs as required
List of Programming Languages
• PHP• MySQL• JavaScript• HTML/CSS• Arduino(C/C++)• AT Command Set
List of Softwares
• Arduino IDE• MySQL Server & WorkBench• Atom Text Editor• PHP Server
Electrical & Electronic Equipments
Explanation
Arduino Mega 2560
Specifications
• Atmega 2560 Microcontroller• 54 I/O Pins (15 PWM O/p)• 16 Analog I/P Pins• 7-12V Input Voltage • 5V Operating Voltage• 256KB of Flash Memory• 8KB SRam• 4KB EEPROM• 16MHz Clock Speed• 2 8-Bit Timer Counters• RTC with separate Oscialltor• SPI/I2C Interface• Serial / RxTx Interface• ICSP Communication
AboutArduino Mega is a Open source
microcontroller board with AtMega2560 Microcontroller it has been manufactured with a main focus on internet of things and industrial automation. It can be programmed with Arduino IDE provided by the manufacturer. The read/write operation is achieved through Serial Communication(USB)
Arduino Mega 2560PIN Diagram
Arduino Ethernet Shield
Specifications
• W5500 Ethernet Controller• 32K Buffer• 10/100 Mb Speed• 5V Operating Voltage• RJ45 Cable to communicate
through Internet
AboutArduino Ethernet Shield is Ethernet Controller Board with W5500 Ethernet
Controller which allows you to connect to internet through ICSP(In-Circuit Serial Programming). The Ethernet Shield communicates with Arduino Mega Board through SPI Connection with ICSP pins. It gets 5V Supply from Arduino Mega 2560. It also has an Onboard SD-Card slot which helps in Read/Write Operation
Arduino Ethernet ShieldPIN Diagram
Relay
Specifications
• 8 SPDT Switches• On board Optocoupler• 220-250VAC Switching• 12-24VDC Swtiching • 5-10Amps Current Range• 8 Digital Input Pins• NO/NC Included• 5V Operating Voltage• 5-9V Input Voltage
AboutThe 5V 8 Channel Relay operates based Optocoupler switching method. It
has 8 relays with NO/NC (Normally Open/Normally Closed). It has also has built-in 8 LEDS which indicates current status of each relay. It operates at 5V with7-9V of Input Supply.
Schematic Diagram Relay
PIR Sensor
Specifications
• Rectangular Shape• Very Inexpensive• Sensitivity Range upto 20 feet• 5V-12V Power Supply• 20 feet of Sensing Range• 110deg x 70deg Angle
detection• Built-in 3.3V regulator• Digital Pulse of Digital High &
Digital Low as Output• Sensitivty & Time period of
Excitation control using Potenitometer
• BIS0001 PIR Chip for regulating the output
AboutThe PIR Sensor which goes by
the acronym of Pyro-Electric/Passive Infrared Sensors are very cheap and available as modules which are very much sensitive to motion and produce relative output signals based upon their change in their signal width. The Fresnel Lens produce distorted IR rays which provide extended operation
PIR Sensor Schematic Diagram
Operating Angle of PIR Sensor
MQ-6 Gas Sensor
Specifications• Highly sensitive to LPG, iso-
butane, propane• 5V AC/DC Supply• Load Resistance 20KΩ• 200-10000ppm of detecting
concentration for LPG, iso-butane, iso-propane, LNG
• Sensitivity adjustment• Fast Response
AboutThe MQ-6 Gas Sensor requires 5V for supply and certain duration to heat up
and start sensing for the gas particles in atmosphere. It senses for various gases such as LPG(Liquid Petroleum Gas), Iso-Butane, Iso-Propane, LNG(Liquified Natural Gas). The Sensitivity can be adjusted by controlling the potentiometer. Additionally it can also sense alcohol, cooking fumes & cigarette smoke.
Schematic Layout of MQ-6 Gas Sensor
Sensitivity Characteristics of MQ-6
SIM900A GSM Module
Specifications
• Quad Band GSM Module 850/900/1800/1900 MHz
• Wire Antenna• 3.8 – 12V DC Input Voltage• TCP/IP Protocol Stack for internet
data transfer through GPRS• 9600-115200 Baud Rate Support• GPRS Class 10: 85.6 Kbps• Can be Interfaced through
RS232/Rx-Tx Communication
AboutSIM900A Dual Band GSM/GPRS Module requires a 3.8-12V Supply for
stabilized operation. It has a configurable baud rate between 9600-115200. It has SIMCOM enhanced AT Command Support. Can be interfaced with arduino through Serial communication
Required AT Commands
1.Command - AT+GMM Response - Manufacturer details to be used to configure at the time
of setup.
2.Command - AT+CMGF=1 Response - Sets the SMS to Text Mode
3. Command - AT+CMGS=“\”+91NUMBERTOSENDSMS\”\r” Response - Sets the Number to which the SMS to be Sent
4. Command – “MESSAGE TO BE SENT” Response – Sets the string data to be sent and Sends the Message
5. Command – “(char)26” Response – character ASCII keyword for Ctrl+Z combination to state
text has been entered
SMPS (Switched Mode Power Supply)
Specifications
• Input 220V AC/DC• Output 12V DC 2A
About
The Switched Mode Power Supply is a kind of AC to DC Buck Converter with transformer which reduces 220V AC Input Supply to 12V DC with the capacity to handle 2A. The main purpose of using a SMPS in this project is for the siren which requires 12V DC Supply. Which is in turn connected to the Relay.
SMPS Input/output Waveforms
Electrical and Electronic Equipment
Connection
Arduino Mega
( AT-Mega 2560 )
Arduino Mega Microcontroller with Arduino Ethernet Shield
Ardu
ino
Ethe
rnet
Shi
eld
MOSI
MOSIMISO
MISO
5V - Supply Vcc
GND GND
SCK SCK
Connected through ICSP PinsSDA SCL – Serial Communication
Arduino Connection with Relay
Arduino Mega
2560 Relay
Electrical Equipment
22
24
.
.
.
36
5V Vcc
IN1
IN2
IN8
GND GND
.
.
.
NC
COMM
NO
P N
220V ACSupply
P
N
Arduino Connection with PIR Sensor
Arduino Mega
2560
Arduino Connection with Gas Sensor
Gas
Sens
or
GND GND
3.3V Vcc
DO
AO49
Arduino Connection with SIM900A GSM Module
Arduino Mega
2560
SIM
900A
GSM
Mod
ule
16 – Rx2
17 – Tx2
Tx
Rx
GND GND
Vcc
12VSupply
Rx/Tx Serial Communication
Relay to Siren through SMPS
Relay
NOCOMM
NC
SMPS
220AC 12DCP N +ve -ve
220V ACSupply
P
N
SIREN
+ve -ve
Conclusion
The Project provides us the ability to control any house hold electrical equipment anywhere from the world. The Project is also focused on anti-theft & security to places that are prone to gas leakage , the device is equipped with the most advanced MQ-6 Gas sensor which detects smokes which are of commercial use in wide range of places. It also senses/detects activity around 20 meters from where the device is mounted. The user is notified through SMS & internet if any of these changes are detected in the preferred location. With prior to detection of motion user is requested to activate alarm through 4 digit passcode which is encrypted with SHA-256 algorithm.
The Project is aimed at providing global security to the upcoming generation with the power of Cloud & Electronics.
Thank You!
Batch MembersAfroze Kabeer Khan. M
Ruthra Kumar. RVishal. V
References
Books:
[1] “Modern PHP” by Josh Lockhart– Feb,2015[2] “Arduino Cook Book” by Michael Margolis – 2011[3] “SIM900 AT Commands Set” by Shanghai simcom wireless solutions, Inc. – 2015
Webpages:
[4] http://www.propox.com/download/docs/SIM900_AT.pdf[5] http://www.arduino.org/learning/reference[6] https://code.tutsplus.com/tutorials/http-headers-for-dummies--net-8039[7] https://learn.sparkfun.com/tutorials/serial-communication[8] http://php.net/docs.php [9] https://dev.mysql.com/doc/refman/5.5/en/[10] https://developer.mozilla.org/en-US/docs/AJAX/Getting_Started