Motion detector and alarm system. - IITB-EE

Motion detector and alarm system. - IITB-EE
EE-318, Electronic Design Lab report, EE Dept., IIT Bombay, April 2007
Motion Detector and Alarm System
Group No. : D1
Arun Kumar Meena (04d07041) <>
Prince Negi (04d07042) <prince>
Yogesh Kumar Meena (04d07043) <>
Instructor: M.C. Chandorkar
Supervised By: D.K.Sharma
Abstract The aim of this project is to make a system which can detect the break-in. When beak-in is occur
it will raise a alarm system. This system will also keep record of the time of break-ins and
duration of break-ins, with the help of Real Time Clock generated by microcontroller. Data will
be saved in the flash memory provided by microcontroller. Information about the break-ins will
be displayed on the LCD screen.
1.Introduction. Our aim is to develop a sensor pairs and alarm system which can detect the break-ins at the room
windows. Our system will contain the Real Time Clock continuously displayed on LCD screen.
With the help of this Real Time Clock, system will show the time of break-ins on LCD screen
and ring the alarm.
In Later stage of this project USB interfacing will be done. That will transfer the data from
microcontroller flash memory to a Computer. The power supply for this system will be taken
from the Mains AC supply. Further we will use battery back-up for system to keep functioning
in case of power failure.
2. Block Diagram Fig. 1 Block Diagram 2.1 Microcontroller In this project we are using AT89C52 microcontroller. This microcontroller developed by
Atmel family, compatible with 8051 microcontrollers. .It’s a low-voltage, high performance
8-bit microcontroller with 8k bytes of flash programmable and erasable read only
memory(PEROM).The architecture combined with Three-level Program Memory Lock and low
power Idle and power-down modes. This device features a 256 x 8 bit internal RAM, 32
programmable I/O lines and three 16-bit Timer/Counters.
Typical application of this microcontroller includes the sensor system. It takes the analog signals
and converts them in digital form. The timers make the configuration very ideal to industrial
2.2 Keypad In this project we are using 4x4 matrix keypad for taking the user inputs. User can feed the date,
month, year and time. Also user can see the data saved in flash memory using this keypad.
2.3 LCD In this project we are using a LCD, which can show 16 characters x 2 lines on the screen.
This will be enough for our project, as we have to show only date and time of break-in at the
same time.
2.4 Sensor Pairs A laser and photodiode is used as a sensor pairs for this project. To amplify the signal across
photodiode we are used BC-547 a NPN transistor. The laser used will be enough powerful to
cover the range of window. The laser is fed by square wave generated by microcontroller. The
output of Photodiode is fed back to microcontroller to detect the break-in.
2.5 Buzzer Alarm In the case of break-in (determined by microcontroller) a signal generated by microcontroller and
1 KHz frequency generated by 555 timer will be fed to AND gate (7408). The output of AND
gate will be given to the LM 386 (Audio Amplifier), that will raise the alarm system.
2.6 Power Supply To supply the current to microcontroller, sensor pairs and alarm system we have used a 220-12V
transformer with the rated current of 0.5 Amp. The Ac supply from the transformer is regulated
by a bridge-rectifier and filter circuit. The system requires one voltage levels; 5V supply to
sensor pairs, buzzer circuit, LCD and microcontroller.
3. Software 3.1 Sensor Pairs input and output To feed the frequency input to laser we are generating the 40Hz frequency with the help of
microcontroller timers. For this purpose we used timer one. The input for the sensor pairs is
given on the port 2.
The output from the photo diode is given back on the port2. By comparing the off time/On time
of both signal microcontroller will be able to detect the break-in.
3.2 Keypad and real Time Clock The initial time is fed to the real time clock using the keypad. With the help of programming we
are able to save year, month, date, hour, minutes and seconds in the 16-bit registers. The real
time clock will be updated by receiving the 1 sec timer interrupt. Other registers can be used for
other temporary storage and data transfer.
3.3 LCD LCD is programmed in such a way that it can display the information about the break-ins in
terms of time of last break-in.
3.4 Flash Memory Storage
At the time of break-in information regarding the break-in is also stored, which can be seen later
using keypad and LCD. This data also can be transferred to a Computer using USB interfacing.
4. Hardware
4.1 Power Supply
Fig. 2 Power Supply
The Schematic shown above is able to supply the voltage levels as application is required.
4.2 Keypad
In this project we have used 4x4 matrix keypad. This will be interfaced with 89C52 using 8-bit
This keypad will be used to enter the preset time as well as to display the previous break-in
information. The circuit diagram is given below.
Fig. 3 4x4 Keypad
4.3 Laser (transmitter)
The square wave input to the laser is given by microcontroller. With the help of this input laser
radiates the visible pointed light. The circuit diagram is given below.
4.4 Photo diode (Receiver)
The Photodiode will receive the light signal from the laser. To amplify the photodiode signal we
used NPN transistor. The output of this transistor is going back to microcontroller. The circuit
diagram is given below.
Fig. 5 Photo Diode and NPN Transistor
4.5 Microcontroller
The 40-pin dip diagram of microcontroller AT89C52 is given below.
Fig. 6 Pin diagram of 89C52 Microcontroller
4.5 Buzzer Circuit
A signal given by microcontroller and frequency generated by 555 Timer will be fed to AND
gate and output of AND gate will given to LM 386, that will raise the alarm system.
Fig. 7 555 Timer and AND gate
Fig. 8 LM386 and speaker
5. Work done so far
We have made the sensor pairs using Laser-Photodiode combination.
5.2 Buzzer circuit is done with the help of LM386 and other capacitor and resistors.
5.3 The software part of Real Time Clock, Square wave generation, break-in detection code has
been checked.
5.4 At this time we are able to show the last break-in time with the help of Real-Time Clock on
LCD screen.
5.5 Instead of 4x4 matrix keypad, we are using 4 switches to set the Hours, Minutes, Seconds
and to check the last break-in time.
6. Remaining Work
6.1 Keypad interfacing with the microcontroller will be done.
6.3 In the later stage of this project USB interfacing with a Computer will be done.
7. Acknowledgements
We would like to acknowledge the immense help given by Prof. D.K.Sharma,
Prof.M.C.Chandorkar and Mr. V.K. Tandon, which helped out us from various problems
encountered during this project. Along with this we would like to thanks the lab assistance, TAs
and other senior students.
8. Referances
(a) Atmel , AT89C52 Data Sheets
(b) A.S Sedra Smith and K.C.kamath, Microelectronics circuit, Fourth Edition (1982), New
York, Oxford University Press, 2003.
(C) EE Department,IIT Bombay (electronics design Lab webpage) ,
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF