minor project report

55
TR INST H Department Home A RIVHUBAN UNIVERSITY TITUTE OF ENGINEERING Himalaya College of Engineering t of Electronics and Computer Engineerin A Minor Project Report On Automation and Security System By Kuldeep Sharma (BEX-067-07) Puspanjali Shrestha (BEX-067-11) Rajim Ali Miya (BEX-067-12) Lalitpur Nepal 2013 ng

Transcript of minor project report

Page 1: minor project report

TRIVHUBAN UNIVERSITY

INSTITUTE OF ENGINEERING

Himalaya College of Engineering

Department of Electronics and Computer Engineering

A Minor Project Report

On

Home Automation and Security System

By

Kuldeep Sharma (BEX-067-07)

Puspanjali Shrestha (BEX-067-11)

Rajim Ali Miya (BEX-067-12)

Lalitpur Nepal

2013

TRIVHUBAN UNIVERSITY

INSTITUTE OF ENGINEERING

Himalaya College of Engineering

Department of Electronics and Computer Engineering

A Minor Project Report

On

Home Automation and Security System

By

Kuldeep Sharma (BEX-067-07)

Puspanjali Shrestha (BEX-067-11)

Rajim Ali Miya (BEX-067-12)

Lalitpur Nepal

2013

TRIVHUBAN UNIVERSITY

INSTITUTE OF ENGINEERING

Himalaya College of Engineering

Department of Electronics and Computer Engineering

A Minor Project Report

On

Home Automation and Security System

By

Kuldeep Sharma (BEX-067-07)

Puspanjali Shrestha (BEX-067-11)

Rajim Ali Miya (BEX-067-12)

Lalitpur Nepal

2013

Page 2: minor project report

TRIVHUBAN UNIVERSITY

INSTITUTE OF ENGINEERING

Himalaya College of Engineering

Department of Electronic and Computer Engineering

HOME AUTOMATION AND SECUTITY SYSTEM

SUBMITTED TO:

DEPARTMENT OF ELECTRONICS AND COMPUTER ENGINEERING

By:

Kuldeep Sharma (BEX-067-07)

Puspanjali Shrestha (BEX-067-11)

Rajim Ali Miya (BEX-067-12)

Lalitpur, Nepal

June 2013

Himalaya College of Engineering

Department of Electronic and Computer Engineering

TRIVHUBAN UNIVERSITY

INSTITUTE OF ENGINEERING

Himalaya College of Engineering

Department of Electronic and Computer Engineering

HOME AUTOMATION AND SECUTITY SYSTEM

SUBMITTED TO:

DEPARTMENT OF ELECTRONICS AND COMPUTER ENGINEERING

By:

Kuldeep Sharma (BEX-067-07)

Puspanjali Shrestha (BEX-067-11)

Rajim Ali Miya (BEX-067-12)

Lalitpur, Nepal

June 2013

Himalaya College of Engineering

Department of Electronic and Computer Engineering

TRIVHUBAN UNIVERSITY

INSTITUTE OF ENGINEERING

Himalaya College of Engineering

Department of Electronic and Computer Engineering

HOME AUTOMATION AND SECUTITY SYSTEM

SUBMITTED TO:

DEPARTMENT OF ELECTRONICS AND COMPUTER ENGINEERING

By:

Kuldeep Sharma (BEX-067-07)

Puspanjali Shrestha (BEX-067-11)

Rajim Ali Miya (BEX-067-12)

Lalitpur, Nepal

June 2013

Himalaya College of Engineering

Department of Electronic and Computer Engineering

Page 3: minor project report

i

ACKNOWLEDGEMENT

After a rigorous and continuous quantum of united efforts, we are glad to present this

report as an outcome of the minor project report on ‘Home Automation and Security

System’. Our project group was doer but there have been numerous and guidance to

succeed in out endeavor.

We express our sincere gratitude to those helping hands that come forward and

directed us towards the success of the whole project with the fine and desired output.

We extend out genuine thankfulness to our project co-coordinator and supervisor Er.

Hem Kanta Regmi sir for his valuable and great support and guidance in all the

happenings regarding to the project.

We must express out thanks to Er. Rajesh Kumar Paudyal HOD of electronics and

computer engineering ,and all the administrative members of the Himalaya college of

engineering for their continues support and help in managing the different

components related to the project.

The names which deserve the sincere and genuine thanks from the whole team

member are the Madan Gawali , Sudarshan Dahal and Kalambir Bista whose

continuous help, support, inspiration make us to make this project a reality.

Our sincere thanks goes to Er. Devendra Kathyat , Er. Samir Thapa ,Er. Alok Kafle ,

and all the teaches of the Himalaya College of Engineering.

We are highly indebted to the Department of Electronics and Computer Engineering,

Mechanical Workshop for providing support to add a step on out venture.

At last but not the least we express our thanks to all the Lab Assistants working in

HCOE, and to all the students who are directly or indirectly related to our project. We

would like to thank Mr. Puran Panthi for his great support in collecting and analyzing

information related to the project. All the Team Members……

Page 4: minor project report

ii

ABSTRACT

As we all know that technology is the key of the change of the world. Here in this

report we are talking mentioning about the change in human lifestyle using the

technology. This report is all about the change of the human lifestyle and making the

life secure as we all are facing the security problems every day.

“HOME AUTOMATION AND SECURITY SYSTEM” is all about how to make

home safe and automatic from unwanted damage or loss caused by different cause

like fire, unknown persons entering in home. In this report we are mentioning how to

save money by saving unwanted wastage of electricity and by protecting our home

solar or rechargeable battery from being overcharged and ultimately to damage.

Every home is provided with the tank to store water but every time we need to check

whether it is full or empty but here we are presenting how to on motor as the water

level goes below the lower level and off the motor as the tank become full with the

water, in doing so we will be able to save not only electricity but also the life of the

motor and in turn money. By, doing so we need not to worry about the water tank and

motor. As we can’t know about the status of the battery weather it is full or not, but

the battery level indicator is the one which helps us to know about the condition of

the battery and makes us to know the conditions whether the battery is full or damage

and so on. It will make us to know when to about the time when to replace the

battery.

Implementation of such automatic microcontroller based systems will make our life

style secure and comfortable.

Hence this report is all about the human comfort and reliability.

Page 5: minor project report

TABLE OF CONTENTS:

Acknowledgement I

Abstract II

1. INTRODUCTION 1

1.1 Introduction of Project 2

1.2 Features 3

1.3 Methodology 3

1.4 Significance of the project 4

1.5 Proposed project 4

1.6 Goals and objectives 5

2. SYSTEM OVERVIEW 7

2.1: System specification 8

2.2 Assumptions 8

2.3 Major constraints 8

2.4 Gantt chart 9

2.5 Project issues 9

3.DESIGN 12

3.1 Design background 13

3.1.1 Introduction to PIC16F877A 13

3.1.1.1 High performance RISC CPU 14

3.1.1.2 Peripheral features 14

3.1.1.3 Analog features 15

3.1.1.4 Special microcontroller features 15

3.1.1.5 CMOS Technology 16

3.1.2 Diodes 16

Page 6: minor project report

3.1.2.1Application of diodes 17

3.1.3OP-amp (operational amplifier) 17

3.1.4 LED 18

3.1.5 Relay 19

3.1.6 IR sensor 20

3.1.7 TSOP 21

3.1.8 Bridge rectifier 22

3.1.9 Wireless camera 23

3.1.10 Buzzer 24

3.1.11 ULN2003 IC 24

3.1.11.1 Features 24

4. THEORITICAL BACKGROUND 26

4.1 Embedded System and Technology 27

4.1.1 Advantages of Using Embedded system 27

4.2 Modules 28

4.2.1 Main board 28

4.2.2 Controlling Relay Board 31

4.2.3 Battery Level Indicator 32

4.2.4 Water Level Indicator 34

4.2.5 Unknown Person Detector 36

4.2.6 Programming of Microcontroller 38

4.3.2 Flowchart 39

5.FINAL 40

5.1 Problem faced 41

5.2 Limitation 41

5.3 Further Enhancement 42

5.4 Conclusion 43

Page 7: minor project report

5.5 Bibliography 44

5.6 Appendix A (Datasheets) 46

5.7 Appendix B (snapshots) 47

Page 8: minor project report

LIST OF FIGURE:

Fig1.6:Block diagram of the whole project 5

Fig 3.2.1: Diode 17

Fig 3.1.3: Op-amp 741 18

Fig 3.1.4: LEDs 19

Fig 3.1.5: Relay 20

Fig 3.1.6:IR sensor 21

Fig 3.1.7:TSOP 22

Fig 3.1.8:Bridge Rectifier 23

Fig 3.1.11:Darlington pair IC 25

Fig 4.1:Block Diagram of Embedded system 27

Fig 4.2.1.1: PCB board 29

Fig 4.2.1.2:Art work 30

Fig 4.2.2.1:PCB board for relay 31

Fig 4.2.2.2:Art work of relay 32

Fig 4.2.3.1:PCB for battery level indicator 33

Fig 4.2.3.2:Art work for battery level indicator 34

Fig 4.2.4.1:PCB for water level indicator 35

Fig 4.2.4.2:Art work for water level indicator 36

Fig 4.2.5.1:PCB for transmitter 37

Fig 4.2.5.2:Art work for transmitter 37

Fig 4.2.5.3: PCB for receiver of the IR 38

Fig 4.2.5.4:Art work for receiver of the IR 38

Fig 4.3.1:Flowchart of the whole project 39

Page 9: minor project report

List of Abbreviations

IR-Infrared

LED-Light emitting diode

IC-Integrated circuits

DC-Direct current

I/O-Input Output

LCD-liquid crystal display

NRs.-Nepalese rupees

Page 10: minor project report

LIST of Tables:

Table 2.6: GANTT Chart 9

Table2.7: Project Cost Table 9-11

Page 11: minor project report

1

CHAPTER 1

INTRODUCTION

Page 12: minor project report

2

1.1: INTRODUCTION OF PROJECT

Home automation is a hot topic, not just among the technologically savvy crowd and

remodeling enthusiasts, but also among increasing numbers of mainstream

homeowners.

Automation is quickly picking up speed as the must-have consumer technology, and

for good reason. From setting the alarm via microcontroller to turning on lights

automatically and turning on the air conditioning as the temperature goes above

normal temperature, setting the alarm as the home is caused by the fire, turning off of

the motor as the water in a tank become full, and turning off of the charging source of

the battery as it gets fully charged, technology bring enhanced convenience, comfort

and safety for consumers where they need it most-at home.

Many homeowners have already taken advantages of this technology, and more are

joining the rank every day. Homeowners who are planning to make the switch to an

automated or smart home should always implement the microcontroller based system

to make the home secure and automated.

With technology evolving at such a rapid pace, it’s easy to get overwhelmed by the

possibilities. To avoid feature overload, homeowners should think about what they

want out of their system and how those features will fit into their home, budget and

lifestyle. For example, security is the major concern, a system with automated fire

detector, and unknown person detector and rechargeable battery detector would be

near the top of the list. By thoughtfully creating a must-have list of components, a

homeowner will be able to clearly communicate the vision of a smart home to

professional who can turn it into reality.

This leads us to an important point: Designing and installing a home automation is a

task that’s best left to professionals. Home automation systems can be complex, and

should be installed by a licensed professional who is trained to understand the details

Page 13: minor project report

3

of a customized system. By using a professional with expertise in automation,

homeowners will receive a well-installed system, along with personalized attention

and training tailored specially to their needs.

When a homeowner installs a home automation system, a great amount of trust is

placed in the provider’s hands. Not only will a company enable homeowners to easily

control the everyday functions of the home. Such as lighting and temperature but they

will be responsible for ensuring the safety and security of the residents.

1.2: Features:

To implement the water level detector.

To implement the battery level indicator.

To implement the ac signal detector.

To implement the unknown person detector.

To control the wireless CCTV camera.

To control the water motor.

To control the cooling system of home.

To detect the fire in home and make system which indicate the fire at home.

1.3 Methodology

During the research related to our project we adopted various kind of research. At

first we search about our project on the world of internet, then we moved to our sir

and the guides who were going to help us throughout our project and consult with

them whether this project is feasible to carried out or not.

After receiving the positive response from our respected guide and teachers, we move

to our work and performed it quite beautifully. Besides all this we refer various

books research articles magazine and various research papers of the different people

around the globe via internet and other means of communication. By implementing

Page 14: minor project report

4

all these we carries to the state and the portion that we are asked to perform

something that is really part of human being

1.4 Significance of the project:

This is not a great project but it can affect human life in a great way. It can make a

life beautiful and comfortable. The whole project is concerned with the comfortable

life style of human and it directly related to .As we develop the modules which can

control almost all the electronic an electrical devices used in home automatically.

There is no need of human to save our property and our devices.

Hence, this project is quite useful to the entire human who wants comfortable life

style.

1.5: Proposed project:

The block diagram of the whole project is as shown in the given figure where we

have designed the power supply for the whole project which will provide the

electricity to the circuit. We have interfaced different sensors as specified in the block

diagram which will give the analog as well as the digital input signal to the

microcontroller and depending upon the input signal microcontroller will generate a

output signal to control the corresponding device. The person who can’t understand

the electronic circuit will be able to understand the whole operation with the help of

the message displayed in the LCD display.

Page 15: minor project report

5

Fig: block diagram of the whole project

1.6 Goals and Objectives:

The main objective of our minor project report is to present you the following:

To implement the system that detect the fire or the rise of temperature with the

help of LM35 and to protect the property from burning

To save electricity by implementing the system which will detect the wastage

of electricity

To operate the cooling system in home as the temperature increases above a

certain limit that well fill us cooler in summer days

Micro-controller

LCD Display for allhappening

Relay control tocamera, sound, fan,

and motor

Fire alarm

LM 35 sensor

IR Sensor

AC signal detector

Condition of batteryclock using currentand voltage sensor

Relay control toswitching ac mains

To check water levelusing not gate

Power supply panel

Page 16: minor project report

6

To implement the system that will detect whether the water tank available at

home is full or empty by detecting the corresponding condition of the tank, if

empty motor is made to ON and if full motor is made to OFF.

To implement the system using 555 timer and TSOP, this will enable us to

detect any unknown person in home and to make the buzzer to sound and to

make the CCTV on automatically.

To implement the system which will enable us to know the status of different

types of rechargeable battery and perform the required task of OFF and ON

of charger automatically. That is if battery is full then charger is disconnected

and if battery is empty then charger is connected. Doing this will make the life

of battery a bit long.

Page 17: minor project report

7

CHAPTER 2

SYSTEM OVERVIEW

Page 18: minor project report

8

2.1: System Specification:

The system specification shows the description of the function and the performance

of system. Our project “Home Automation and Security System” has different

objectives we believe that our system has immense scope. The project we have taken

can be used as a reference to implemented in any high security system not only in

case of home but also in case of the banks and different buildings.

2.2 Assumptions:

Certain assumptions to be considered to implement our project are listed below:

The water level will be detected automatically

If any unknown person enters home CCTV will take a video which will be

recorded

As the home will be caught by fire water will be available at home via

internally provided water supply

2.3 Major constraints:

During the project phase we encountered various problems and obstacle.

Beside our plan and schedule the working progress was not smooth. We have

to manage odd hours to meet deadlines avoiding load shedding and limited

time frame. Within a limited time frame we had started the project from the

initial research phase acquiring the knowledge about all the devices and

components that we have about to use and other phase of project including

coding, testing, debugging, documentation and implementation. We got

comfort when our college provide a great support in providing electricity and

various devices and components needed by our project

Hence we utilized the available resources, devices, time and work to finish the

project within the schedule.

Page 19: minor project report

9

2.4: Gantt chart

No. of activities

May June July August

1.Feasibility study

2.System specification

3.Requirement amount

4.Design

5.Documentation

6.Implementation

7.Implementation

2.5: Project issues:

S.N PARTICULARS DETAILS QUANITITY COST(in NRs)

1. PIC microcontroller 16F877A 1 350

2. LED(3mm) Different colored 20 60

3. 555 Timer ………………. 1 45

4. Voltageregulator(78xx)

7805,7809,7012(+ve) 4 60

5. Voltage regulator(79xx)

7912(-ve) 1 15

6. Voltageregulator(LM317)

Variable 1 15

Page 20: minor project report

10

7. Transformer 18-0-18 (2A) 1 700

8. Matrix board …………………. 1 100

9. Fuse 2 Amp 5 50

10. Fuse Base ………………… 5 50

11. Jumper wire ………………… 5m 50

12. Capacitor(Electrolytic)

1000uf(65v) 2 80

13. Ceramic Capacitor 104,102,22pf,33pf 1 pack 20

14. IR led ………………….. 1 5

15. Resistor Different valued 1pack 50

16. T-SOP 1838 1 40

17. Transistor BC557,BC547 1pack each 40

18. PCB board ………………….. 1 200

19. PIC base ………………… 1 100

20. Not gate IC 7404 1 20

21. Darlington pair IC ULN2003 1 30

22. Bridge Rectifier 1 40

23. Heat Sink ………………… 6 60

24. Relays 12v 7 175

25. Diode 1N4007 1 pack 20

26. LM35 …………………… 1 90

27. Push up button ………………… 1 5

28. LCD 16*2 display 1 350

Page 21: minor project report

11

29. Preset Different valued 1 pack 50

30. Op-amp 741 1 40

31. LM7014 ………………….. 1 40

32. Crystal 20Mhz 1 20

33. Connector ………………….. Few 100

34. Connector …………………. Few 100

35. Total 3180

Page 22: minor project report

12

CHAPTER 3

DESIGN

Page 23: minor project report

13

3.1 Design background:

The project titled “Home automation and security system“, is based in the use of

following components:

PIC 16F877A

Diode

IR sensor

LED

TSOP 1838

555 Timer

ULN2003

7404

Resistor

Capacitor

Buzzer

Relay

Lm 35

Wireless Camera

Op amp 741

3.1.1 Introduction to PIC 16F877A:

PIC167F877A is one of the PIC Micro Family microcontroller which is popular atthis moment, start from beginner until all professionals because it is very easy to use.The use of FLASH memory technology enables to write and erase until thousandtimes. The superiority of this Risc Microcontroller compared to other microcontroller8-bit especially at a speed and code compression. PIC16F877A have 40 pin by 33path of I/O.

Page 24: minor project report

14

PIC167F877A perfectly fits many uses, from automotive industries and controlling

home appliances to industrial instruments, remotes sensors, electrical door locks and

safety devices. It is also ideal for smart cards as well as for battery supplied devices

because of its low consumption EEPROM memory makes it easier to apply

microcontroller to device where permanent storage of various parameters is

needed(codes for transmitters, motor speed, receiver frequencies, etc.). Low cost, low

consumption, easy handling and flexibility make PIC16F877A applicable even in

areas where microcontroller had not previously been considered (example: Timer

functions, isnterface replacement in larger systems, coprocessor applications, etc.).In

system programmability of this chip (along with using only two pins in data transfer)

makes possible the flexibility of a product, after assembling and testing have been

completed. This capability can be used to create assembly-line production, to store

calibration data available only after final testing, or it can be used to improve program

on finished products.

3.1.1.1 High Performance RISC CPU:

Only 35 single-word instruction to learn.

All single-cycle instructions except for program branches, which are two-

cycle.

Operating speed: DC-20MHz clock input DC -200 ns instruction cycle.

Up to 8K*14 words of flash program memory, Up t0 368 * 8 bytes of data

Memory (RAM), Up to 256 * 8 bytes of EEPROM data memory.

Pinot compatible to other 28-pin or 40/44-pin PIC16CXXX and PIC16FXXX

microcontrollers.

3.1.1.2 Peripheral Features:

Timer0: 8-bit timer/counter with 8-bit pre scalar.

Timer1: 16-bit timer/counter with pre scalar, can be incremented during Sleep

via external crystal//clock.

Page 25: minor project report

15

Timer2: 8-bit timer/counter with 8-bit period register, pre scalar and post

scalar.

Two Capture, Compare, PWM modules.

Synchronous Serial Port(SSP) with SPITM (master mode) and I2CTM

(Master/Slave)

Universal Synchronous Asynchronous Receiver.

Transmitter (USART/SCI) with 9-bits addresses detection.

Parallel Slave Port (PSP)- 8 bits wide with external RD,WR and CS

controls(40/44-pin only).

Brown-out detection circuitry for Brown-out Reset(BOR)

3.1.1.3 Analog Features:

10-bit, up to 8-channel Analog-to-Digital Converter (A/D).

Brown-out Reset (BOR).

Analog Comparator module, Programmable input multiplexing from device

inputs and voltage reference, Comparator outputs are externally accessible)

3.1.1.4 Special microcontroller features:

100,000 erase/write cycle Enhanced Flash program memory typical.

1,000,000 erase/write cycle Data EEPROM memory typical

Data EEPROM Retention>40 years.

Self-reprogrammable under software control

In-circuit Serial Programmable under software control.

Single-supply 5V In-Circuit Serial Programming.

Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable

operation.

Programmable code protection.

Power saving sleep mode.

Selectable oscillator options.

Page 26: minor project report

16

In-Circuit Debug (ICD) via two pins.

3.1.1.5 CMOS Technology:

Low-power, high-speed Flash/EEPROM technology.

Filly static design

Wide operating voltage range(2.0V to 5.5V)

Commercial and Industrial temperature ranges

Low-power consumption.

3.1.2 Diodes

A diode is a dispositive made of semiconductor which has two terminals or electrodes

that can act like an on off switch. When the diode is on it acts as a short circuit and

passes all current. When it is “off”, it behaves like an open circuit and passes no

current. The two terminals are different and are marked as plus and minus. If the

polarity is opposite (reverse bias), it turns “off”. A diode is simply a PN junction with

the following characteristics.

Under forward bias, it needs a small voltage to conduct. This voltage drop is

maintained during conduction.

The maximum forward current is limited by heat-dissipation ability of the

diode. Usually it is 1000mA.

There is a small reverse current

Page 27: minor project report

17

Fig 3.2.1: Diode

3.1.2.1 Applications of diodes

Rectifier diodes are typically used for power supply applications. Within the

power supply, you will see diodes as element that converts AC power to DC

power.

Switching diodes have lower power ratings then rectifier diodes, but can

function better in high frequency application and in clipping and clamping

application, that deals with short duration pulse waveform.

Zener diodes, a special kind of diode that can recover from breakdown caused

when the reverse-bias voltage exceeds the diode breakdown voltage. These

diodes are commonly used as voltage-level regulators and protectors against

high voltage surges.

3.1.3 OP-amp (operational amplifier)

The term amplifier or “OP-amp” refers to a class of high-gain DC coupled amplifiers

with two inputs and a single output. The modern integrated circuit version is typified

by a famous 741 Op-amp. Some of the general characteristics of IC version are:

High gain, on the order of a million

High input impedance, low output impedance

Used with split supply, usually +/- 15V

Page 28: minor project report

18

Used with feedback, with gain determined by the feedback network

Fig 3.1.3: op-amp 741

The Op-amp was designed to perform mathematical operations. Although now

superseded by the digital computer, Op-amps are a common feature of modern analog

electronics. The op amp is constructed from several transistor stages, which

commonly include a differential input stage, an intermediate-gain stage and push-pull

output stage. The differential amplifier consists of matched pair of bipolar transistor

or FETs. The push-pull amplifier transmits a large current to the load and hence has

small output impedance. The Op-amp is a linear amplifier with Vout/Vin. The DC

open loop voltage gain of a typical Op-amp is 103 to 106. The gain is so large the

most often feedback is used to obtained a specific transfer function and control the

stability. A popular IC version of Op-amp is IC741, it is available in 8-pin dual, in-

line package (DIP).

3.1.4 LED

Page 29: minor project report

19

Fig 3.1.4: LEDs

A LED (light emitting diode) is essentially a PN junction diode. When carriers are

injected across a forward-biased junction, it emits incoherent light. Most of the

commercial LEDs are realized using a highly doped n and p junction. The light

emitting phenomenon use the recombination within the PN junction instead of

thermal radiation, there for LEDS are free of waste and wear and can be expected to

have a long life time. By controlling the forward current, the radiant flux of the LED

can be easily controlled. The response time of the LED is very high (a few hundred

nanoseconds) and can be pulsed at greater forward currents, to obtained high

radiation peaks. The resin packaging of LEDs allow for superb mechanical integrity

and can withstand dropping, vibration and shock. These semiconductor devices can

be mounted in any position.

3.1.5 Relay

Page 30: minor project report

20

Fig 3.1.5: Relay

Relays are components which allow low-power circuit to switch a relatively high

current on and off, or to control signals that must be electrically isolated from the

controlling circuit itself. To make a relay operate, you have to pass a suitable pull-in

and holding current (DC) through its energizing coil. And generally relay coils are

designed to operate from a particular supply voltage often 12V or 5V. The coil has

resistance which will draw the right pull-in and holding currents when it is connected

to the supply voltage. So the basic idea is to choose a relay with a coil designed to

operate from the supply voltage you are using for your control circuit, and then

provide a suitable relay driver circuit so that your low power circuitry can control the

current through the relay coil. Typically this will be somewhere between 25mA and

70mA.

3.1.6 IR sensor

IR sensor uses an infrared light source, which offers long-term stability, low

maintenance and high reliability. The IR sensor family is intended to monitor

suspended solids in four predetermined nominal ranges.

IR 100 Sensor-Range 0-200mg/1

Page 31: minor project report

21

IR40 Sensor-Range 0-1500mg/1

IR15 Sensor- range 0-10,000mg/1

IR8 Sensor-range 0-30000mg/1

Fig 3.1.6:IR sensor

No internal adjustment is possible, but measurement outside these ranges is

sometimes possible and may be determined by experimentation. All range statements

based on a solids present on a typical sewage treatment works, and although they are

useful as guidance, the ranges will be affected by the nature of the solid being

monitored. Sensor uses the light absorption principle, with the light source an infrared

LED operating at 880nm. In simple terms, the sensor detects solids by comparing the

amount of light emitted by the LED with the amount of light received by the photo

diode. The sensor has been designed to monitor suspended solids and sludge blankets

throughout the treatment process

3.1.7 TSOP

The TSOP 18.. Series are miniaturized receiver for infrared remote control system.

Pin diode and preamplifier are assembled on lead frame; the epoxy package is

designed as IR filter the demodulated output signal can directly be decoded by a

Page 32: minor project report

22

microprocessor. TSOP 18..is a special remote control receiver series supporting all

major translations codes.

Fig 3.1.7: TSOP

TSOP 1838 sense 38 KHz square wave light intensity, and there are other frequencies

available. This prevents different remote controlled devices to interfere with each

other as they work on different frequencies. As TSOP sense 38 KHz modulated light,

it turns output low. It is because of the output stage, which is transistor switch. It will

keep output low for some time and then again rise high. It not just sense 38 KHz but

also determine if it continuous 38 KHz signal, or a burst of square waves. It rejects

continuous 38 KHz like an ambient light

3.1.8 Bridge rectifier

Page 33: minor project report

23

Fig 3.1.8:Bridge Rectifier

A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full

wave rectification. This is a widely used configuration, both with individual diodes

wired as shown and with single component bridges where the diode bridge is wired

internally

for both positive and negative swings of the transformer, there is a forward path

through the diode bridge. Both conduction paths cause current to flow in the same

direction through the load resistor, accomplishing full-wave rectification. While one

set of diode is forward biased the other set is reverse biased and effectively eliminated

from circuit

3.1.9: Wireless camera:

Camera is audio video capturing equipment that essentially helps to monitor the

changes taking place in the environment. Camera can have different resolutions. The

specifications of wireless camera we used are

Model AX-322 2.4G

Resolution 380 TV line outdoor

30 LED night vision system

Page 34: minor project report

24

Long operation range: up to 100m long of sight or 30m through

obstruction(wall/ceilings)

High quality color CMOS sensor for crisp, clear images

Weatherproof with sturdy Alloyed Shell for Outdoor use

Built-in microphone for audio monitoring

Transmission Power: 10Mw Consumption Current: 80 mA and 120 mA(LED

ON)

Power: DC 9V-12V

3.1.10Buzzer:

A buzzer is an audio signaling device, which may be mechanical, electromachanical

or electronic. Type uses of buzzers and beepers include alarms, timers and

confirmation of user input such as a mouse click keystroke.

Electronic buzzer: A piezoelectric element may be driven by an oscillating

electronic circuit or other audio signal source. Sounds commonly used to indicate that

a button has been pressed are a click, a ring or a beep.

3.1.11ULN 2003A IC:

The ULN2003 is a monolithic high voltage and high current Darlington transistor

array. It consists of seven NPN Darlington pairs that feature high-voltage outputs

with common cathode clamp diode for switching inductive loads. The collector

current rating of single Darlington pair is 500mA. The Darlington pairs may be

paralleled for higher current capability. Applications include relay drivers, lamp

drivers, line drivers, and logic buffers.

The ULN2003 has a 2.7kΩ series base resistor for each Darlington pair for operation

directly with TTL or 5V CMOS device

3.1.11.1 FEATURES

Page 35: minor project report

25

500mA rated collector current(single output)

High voltage output: 50V

Inputs compatible with various types of logic.

Relay driver application.

Fig 3.1.11:Darlington pair IC

Page 36: minor project report

26

CHAPTER 4

THEORETICAL BACKGROUND

Page 37: minor project report

27

4.1 Embedded system and technology:

In modern day automation and in the world of robotics, embedded system plays a

vital role. We can control any device automatically by using embedded system or by

using microcontroller.

This is a small chip which can perform various task related to the embedded system.

Such systems are generally designed to perform any specific task. In our project to

control various devices of the home embedded system plays a main role. In our

project we are using PIC 16F877A as a main controller which can be interfaced with

large varieties of devices quite easily. Such system can be used in:

Robotics

Industrial automation

In automatic moving cars and even in automatic flying objects.

Input output (input to control )

Fig: Block diagram of embedded system

Here the input can be anything. Means this system can process both the analog and

digital signal coming from environment and from other electrical and electronics

devices

4.1.1 Advantages of using embedded system:

Easy to program and hence to control any device It may be used to control electrical, electronics and any mechanical

devices

Embedded System

Page 38: minor project report

28

It may be used to control electrical, electronics and any mechanicaldevices

It is easily available in market in low cost Simple to implement and easy to use Can perform a numerous task without consuming large amount of

electricity Very much suitable in case of automation system.

4.2 Modules:

There are many different modules that we use in our project which are listed with

explanation below:

4.2.1 Main Board:

We have designed a main board in such a way that it can take both analog and digital

input and can process it. The outputs generated by microcontroller are passed through

the Darlington pair IC. The main board is operated with 12 volt dc supply. We have

provided enough LED in our main board which enable us to know the proper

functioning of the given board.

Page 39: minor project report

29

Fig 4.2.1.1: PCB board

PORTA

PORTC

PORTB

LCD DISPLAY

RELAY

LM35

RESET

Page 40: minor project report

30

Fig 4.2.1.2: Art work

Here the LM35 is used to sense the temperature which is a analog

signal and the microcontroller is capable to process the given analog

signal and generates an output according to the input at the different

pin of the port-B.

Page 41: minor project report

31

Here LCD is interface to make the whole project readable. This will

helps the people whom are to not relate to the electronics to understand

the project.

We have interfaced ULN 2003 which is responsible for switching of

the relays which in turn connected to the different devices.

4.2.2 Controlling Relays Board:

This is the board which controls the different electrical, electronic and mechanical

devices accordingly the input generated from the given microcontroller

Fig 4.2.2.2 real view of relay

Page 42: minor project report

32

Fig 4.2.2.2 Art work of relay

4.2.3 Battery level indicator

Normally, in mobile phones the battery level is shown in dot or bar from .this lets you

easily recognize the battery level .here we present a circuit that lets you know the

battery level of a device from the number of LEDs that are glowing. It uses ten LEDs

in all .so three LEDs glow it indicates the capacity of 30 percent .Unlike in mobile

phones where the battery level l indicator function is integrated with other functions

here only one comparator IC (LM3917) does it all.

The LM3914 uses ten comparators, which are internally assembled in the voltage

divider network used on the current division rule so it divides the battery level into

ten parts.

The circuit derives the power supply for its operation from the supply for its operation

from the battery of the device itself .it uses ten LEDs wired in a 10 dot mode .The use

of different colored LEDs make it easier to recognize the voltage level on the basis of

the calibration mode .Red LEDs indicate battery capacity less than 40 percent

.Orange indicate battery capacity of 40 to less than 70 percent and green led indicate

Page 43: minor project report

33

battery capacity of 70 to under 100 percent The brightness of the LEDs can be

adjusted by varying the value of preset VR2 between pins 6 and 7.

Diode D1 prevents the circuit from reverse polarity battery connection. The tenth

LED glows only when the battery capacity is full, i.e. the battery is fully charged.

When the battery is fully charged, relay driver transistor T1conducts to energize relay

RL1. This stops the charging through normally open (N/O) contacts of relay RL1.

For calibration connect 15V variable, regulated power supply and initially set it at

3V. Slowly adjust VR1 until LED1 glows. Now, increase the input voltage to 15V in

steps of 1.2V until the corresponding LED (LED2 through LED10) lights up.

Now the circuit is ready to show any voltage value with respect to the maximum

voltage. As the number of LEDs is ten, we can easily consider one LED for 10

percent of the maximum voltage. Connect the voltage from any battery to be tested at

the input probes of the circuit. By examine the number of LEDs glowing you can

easily know the status of the battery. Suppose five LEDs are glowing. In this case, the

battery capacity is 50 to 59 percent of its maximum value.

Fig 4.2.3.1:PCB for battery level indicator

Page 44: minor project report

34

Fig 4.2.3.2:Art work for battery level indicator

4.2.4 Water level indicator

To detect the water level, we use voltage divider dc biasing. In which R1 resistor is

connected with base terminal and VCC. Another wire of base is left on the tank. If the

water is below that wire then the value of resistor R2 is very high (infinite).Due to the

high value of R2, voltage at the base-emitter is 0v.The transistor acts as open circuit

no current is flow in the circuit. When the water is at the level of wire then resistor R2

has certain value i.e. resistance of water. The voltage at the base-emitter is equal to

the 0.7v.Then transistor acts as short circuit. The current flow through the circuit.

For calculation,

Vbe=(R2/(R1+R2))*Vcc

Where,

Vbe=voltage at the base emitter

R1 and R2=resistors

Vcc=supply voltage

Page 45: minor project report

35

AS same thing can be done with the NOT gate IC so we have implemented the NOT

gate IC to perform the same task as the input terminal of not gate lies below the water

level input of the not gate

will receive the zero logic and generate the output as the high. Hence by doing this

we can easily detect the level of the water and can control the motor accordingly the

level of the water.

The complete PCB circuit diagram and the art word is as shown in the figure.

Fig 4.2.4.1:PCB for water level indicator

Page 46: minor project report

36

Fig 4.2.4.2:Art work for water level indicator

4.2.5 Unknown person detector

We have used the 555 timer to generate a sign square wave of 38KHz such that by

this the signal generate from the given transmitter will be not affected by the ambient

light as well. We have designed a receiver by using the TSOP 1838 which is capable

of receiving only the 38 KHz signal. Hence, when any obstacle will cross the line of

sight from the transmitter and the receiver it will generate output signal an according

to the I/O signal microcontroller will gives output. The circuit diagram of the

transmitter and the receiver are as shown in the figure:

Page 47: minor project report

37

Fig 4.2.5.1:PCB for transmitter

Fig 4.2.5.2:Art work for transmitter

Page 48: minor project report

38

Fig 4.2.5.3: PCB for receiver of the IR

Fig 4.2.5.4:Art work for receiver of the IR

4.2.6 Programming of the microcontroller

Step1: start

Step2: Reset the microcontroller to initial position

Step3: initialize the LCD and the ADC

Step4: Display the initial message on the LCD display and the temperature

Step5: check for the input signal at all the input pin.

If condition is satisfied means signal at input pin

Change the state of the corresponding state of the relay via the output pin

Page 49: minor project report

39

Else

Again check for the condition

Step6: stop for the certain delay

Step7: move to the step 4

Step8: end

4.2.7 Flowchart of the project

Fig4.3.1: Flowchart of the whole project

Start

Initialize the

ADC and LCD

Display the initial message

Check for all inputsignals at all input pins

Generate a signal at thecorresponding output pin

Display the corresponding

Message at LCD display

Wait for the certain delay

Page 50: minor project report

40

CHAPTER 5

FINAL

Page 51: minor project report

41

5.1Problem Faced

To reach the summit, one cannot bypass the uphill on its way. Similarly, to complete

our project, we also faced the inevitable problems that us to push hard for grabbing

the aim we had set.

First and foremost, we were not hugely familiar with microcontroller, its coding and

its applications. To work on a project based on microcontroller, a master command on

its use was a most. Our continuous efforts on widening the window of information on

microcontroller solved this issue.

Another hurdle part in our project is the perfect design of the PCB board when we are

designing the different module to performing the different tasks. Hence design of

such module was the another major problem we faced during our project. Being such

problems but we were self –motivated and we work even during the late night to

make the perfect and fine PCB board which is the main part of the succession of our

project.

There were times when all our connections were as per requirements bur no operation

was accomplished. The IR sensor and LCD performed on previous day betrayed us

next day but we were always motivated to achieve what we targeted for and e didn’t

compromise to debug it ever in late nights.

5.2 Limitation:

We believe no machine is perfectly efficient and our system is no expectation to it.

There is certain identified unidentified limitation exiting in our system. Hardware and

software and environmental inefficiencies had forced us to summarize our limitation

as follows:

It do not identify unknown person instead it identify only obstacles which

may be animals or anything like that.

Page 52: minor project report

42

Fire can’t be detected before it just stated but it detected only temperate so

anything which may produce heat near sensor will be identified as fire.

After the exercitation of the every output we have to reset it to operate it

again with the initial message at the LCD display.

We tried really hard to make our project fine and perfect but still there are few many

limitations. Which are listed below::

The wireless camera used in our project cannot record the picture and video.

Audio cannot be transmitted

The IR sensor works only in the range of 10m.

We have programmed whole the project on the basis of polling instead of

interrupt.

In many cases it does not function automatically hence we need to reset the

whole project continuously.

5.3 Further enhancement:

Our system including the limitation has a bright side to explore .we can make the

security system of the home highly secure by implementing the technology of the

image processing and the scanner of our eye or fingerprint and other at the gate way

to the home.

By implementing the special type of the mechanical switch to detect the level of the

water this can be used accurately and for the longer time as it is a mechanical part.

Such system gives the high accuracy then the system that we have used.

We can use other highly advanced embedded system to control the devices of the

home with the higher accuracy and can use the concept of the interrupt to make the

same project far more good.

Page 53: minor project report

43

This system is not only important for the home, but can be implemented in the

security system of the bank, corporate buildings, offices, colleges, schools,

government buildings and in many more. Hence, we can extend it to any limit as per

the requirement and the need of any field.

5.4 Conclusion

The minor project of third year BE Electronics and communication was completed

with great devotion and dedication. The project has helped us gain a better

perspective on various aspects related to our course of study as well as practical

knowledge of electronic components. On the phase of project our stressful time was

made comfort by the support from our seniors, teachers and friends. Hence, we are

finally here with the complete project on time.

The main goal of this project on title “The Home Automation and Security system”

is nothing but a step to make the human life comfortable. So, we did our best

throughout the whole project and make our project fine and accurate. By completing

the whole project on time with the great success we came to believe that winner do

not do different things but they do the things quite differently. This project becomes

very much fruitful for us to learn the concept related to the hardware and software

which we think and believe that will be a valuable part in our professional carrier in

the field of engineering.

Hence, it becomes a great experience for us to perform and compile the project in

time. It really makes us to feel like an engineer and today we can feel proud for what

we are and for what we can do.

Page 54: minor project report

44

Bibliography:

“8051 Microcontroller and Embedded System” Fourth Edition MuhamamadAli MazidiJanice GillispieMazidi,andRolin D. McKinlay.

“Microelectronics Circuit Theory and Application” Fourth Edition ,Adel S.Sedra and Kennetac Smith.

“Electronic Devices and Circuit Theory” Second Edition, Robort C. Boylostedand Louis Nashelsky

http://www.electronicsforyou.com Datasheet of PIC 16F877A

Page 55: minor project report

45