Title:-Automatic Room Light Control Using Microcontroller

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

Title:-Automatic room light control using microcontroller

1|Page
Abstract Automation
system (BAS) that provides an automatic improving and controlling features to control several typical
devices in building automatically, rather than manual means . It also facilitates interaction among
different electrical home appliances devices. Here in our project we write a code and circuit diagram for
temperature control system, automatic light control system and door security system, on single
PIC16f877A microcontroller while for the software implementation, Micro C PRO for PIC has been
used to interface with the hardware. To implement this project it requires a less cost for initial
investment. This project successfully achieved main objective which enables us to automate devices in
an efficient way and to save energy in a single room until simulation unlimited advice our appreciation
and thanks also goes to our electrical and computer engineering department team members for their
emotional support, valuable information and coordinal support throughout the year that they had given
to us. We went to express our deepest tanker for our family and friends for their support by providing
what we need and words can‟t express our gratitude for all they have support us in our way.

2|Page
Contents
Abstract.....................................................................................................................................................2
Acronyms..................................................................................................................................................4
Introduction...............................................................................................................................................5
Statement of the Problem..........................................................................................................................5
Objectives of the Project...........................................................................................................................6
The main objective of the project..........................................................................................................6
The specific objectives are....................................................................................................................6
Literature review.......................................................................................................................................7
History of Automatic Room light Control system.................................................................................7
Features of building automation system............................................................................................7
Automatic light control.....................................................................................................................7
Door security system.............................................................................................................................8
Temperature control system for single room.....................................................................................9
Components that we use in this project...........................................................................................10
Methodology...........................................................................................................................................12
BUGET...................................................................................................................................................14
WORK PLAN.........................................................................................................................................15
REFERENCES.......................................................................................................................................16

3|Page
4|Page
Acronyms CPU…………………………….Central
processing unit
HVAC…………………………..heating ventilation and cooling system
ADC……………………………Analog Digital Converter
ALC……………………………Automatic Light Control
I/O……………………………....input output
PCB……………………………..programmable circuit board
RAM…………………………….Random Access Memory
ROM…………………………….Read Only Memory

5|Page
Introduction
Today energy crisis has become one problem which our whole country must confront. Room power
consumption makes up the largest part of energy consumption in our country. Many conventional power
saving methods such as using electrical devices which, consumes very less energy or cutting OFF the
entire power supply for a scheduled time for a particular area are not efficient and there will be a lot
discomforts to the users and cost may also increase to use a low power electrical device. In this case, the
power consumption of lamps in a typical room is a factor which can’t be ignored. [1, 5]
Many users need different light intensities in different places. Sometimes the light intensity from outside
is sufficient, and thus we don’t need to turn on any light. But sometimes the user leaves but forgets to
turn OFF the light. These factors cause energy waste. [3, 4].Sometimes there may be the difficulty of
searching the place of switch due to darkness or if we are new comer for the room.
This project is a great potential for saving electricity and reducing costumer energy costs through
the use of more efficient lighting control system. The PIC microcontroller is used to program and
control the overall operation of the devices. The PIC used is PIC 16F877A.
The PIC16F877A is a good choice for learning about a microcontroller, because the programming
language is simple, low price, wide range of applications, high quality, and ease of availability [5]. The
PIR (Passive Infra-Red) Sensor used in this project is a pyro electric device that detects motion by
sensing changes in the infrared (radiant heat) levels emitted by surrounding objects. This motion can be
detected by checking for a sudden change in the surrounding IR pattern [8]. It is used to detect whether
any occupants are there in that room or not. In addition, LDR is used to detect the intensity of light in
that room. The output is represented by Relay and Lamps.

Statement of the Problem


Many conventional power saving methods uses a manually operated Switches. In this method a user has
to switch on and off the required lights. Since the user can switch on and off the lights as per their
preferences there is a chance of forgetting to turn off the light. This may occur because of carelessness
of user and a large amount of power is wasted. [1, 3, 4]
The other convectional power saving method proposed was by detecting occupant existence by using
passive infrared sensor (PIR). This PIR sensor detects any movement is present in that particular area
and automatically switches ON the lights. The drawback of this system is, it will switch ON the lights
when an occupant is present in that area without checking the intensity of light. Because of this also a
large amount of energy can be lost [6, 10].

6|Page
This project is used to overcome all the drawbacks of the above methods. It takes two things into
account; the human presence and intensity of light before taking any action. The system consists of a
PIR sensor and an LDR. The PIR sensor is used to detect whether any occupants are there in that room
and LDR is used to detect the intensity of light in that room. Apart from this an algorithm can be
implemented in our system which uses both the LDR and PIR sensor to decide whether to switch on the
light or not.

Objectives of the Project

The main objective of the project

to design and simulate an Automatic Room light control for the rooms those requires
different light intensity.

The specific objectives are


To study different type of LDR sensor; which is used to detect the existence of light.

To study different type of PIR sensor, a device that detects motion by sensing changes in the
infrared (radiant heat) levels emitted by surrounding objects

Develop a system that can reduce the waste of electricity saves and makes human life easier.

To design and calculate the PIR sensor circuit

LDR sensor circuits parameter for the input of microcontroller.

To simulate the PIR and LDR sensor circuits on the Isis Proteus.

7|Page
Literature review

History of Automatic Room light Control system


The term building automation system loosely used refers to any electrical control system that is
used to control a building heating , cooling , and ventilation system (HVAC) modern building
automation system can also control indoor and outdoor lighting as well as security , fire alarms and
basically everything else that is electrical in building on either ac or dc wiring. Building automation
system provides automatic control of the condition of indoor environments. The historical root and
still core domains of this system is the automation of heating ventilation and air conditioning
system in large functional building. The primary goal is saving in energy and reduces cost, yet its
reach has extended to include information from all kinds of building system.
It is centralize system, network of hard ware and software which monitor and control the
environment in commercial, industrial and institutional facilities while managing various building
system. Automation system ensures operational performance of facility as well as comfort and
safety building occupants. Typically such control systems are installed in new building.

Features of building automation system

Automatic light control


According to different studies, around 40% of energy consumed globally is building related.
Artificial lighting consumes a significant part of all electrical energy consumed. In offices 20 to
50% of total energy consumed is due to lighting. For some building 90% of lighting energy
consumed can be un-necessary expense through over illumination [1]. Someone switches on lights
at the start and at the end of the day. other more sophisticated building (few of them) implement
some sort of automatic control of lighting making this switching on and off by automatic control
based on presence detection , or colander hourly basis and other even more sophisticated ones
implement really effective lighting control providing just appropriate light level in any part of
building at any time ,having in consideration many variable like day light coming from outside ,
presence of people in each area .

8|Page
The required light level according to work places, etc. It is obvious that more effective control we
apply to lights in a building the more comfortable. we will make it for people who spend a good
part of their lives tree and of course the more energy efficient we make the building itself with all
benefits related to it , reduction in electricity bill , maintenance budget , carbon foot print etc.
Lighting needs vary with the intended use (for example lighting offices , corridors , cubicles and
training rooms) and characteristics of the area (such as room size and shape , ceiling height and
availability of natural lights) most building condition more than one type of lighting control
system . On/off operation is an area where many designed create a un workable lighting scheme.
In 2013 in Malaysian university student whose name is NORIYAHIUT.A applied the lighting
control in hotel automatically. This system applied in large hotel that found in Malaysia. This
project successfully achieved the main objective which is able to control light by using SMS and it
definitely can save power because all the day it is not necessary to on the light. This system applied
for ground parking system. the method of this project , first the client end his/ her name and id to
the server using SMS , then the server send back to microcontroller. In the same time, the
microcontroller manages the light system and server return the status to microcontroller [2] .
In our project we control light for single room. Our project is different from previous one in that
explained above is it control the light by sensing the number of people entering the room and
leaving the room. When the person enter in to the room it senses and on the lights automatically by
its own. This project is different from thee other project by it uses the reserve switch which means
when the person have no interest to on the light or if something problem occurred in
microcontroller he/she use this reserved switch to control the light.

Door security system


When we think of locks, we think of a bolt containing a notch known as a talon, which is operated
by moving the bolt backwards or forward by engaging a key in the talon. But there is more to locks
than just a bolt or latch. A lock is a mechanical device that can be used for securing doors, cabinets,
lid of brief cases or other luggage. It consists essentially of a bolt guarded by a mechanism which
can be released by a mechanical, hydraulic or electrical/electronic actuator.

9|Page
The oldest known mechanical functioning lock was an Egyptian door lock used about 2000BC,
made of wood and fastened vertically on the door post, the wooden block contained moveable pins
or “pin tumblers” that dropped by gravity into openings in the cross piece of “bolts” and locked the
door. It was operated by a wooden key with pegs that raised the number of tumblers sufficiently to
clear the bolt so that it could be pulled back. The major disadvantage with it is that it was wholly
made of wood. The Romans made an improvement on this by fabricating the first metal locks
which was later improved by Robert Bar son, an English man in 1778 and Linus Yale Jnr an
American in 1861. The Yale lock consists of essentially a cylindrical plug placed in an outer barrel.
The plug is rotated and in turn moves the bolt of the lock by means of a cam. The inserted key
raises five pins of different sizes into corresponding holes in the plug. The most common form of
cylindrical lock used in homes is the so-called night latch, operated from a key from outside and a
knob from inside. In the 20th century, as machine tools and manufacturing methods became more
sophisticated, locks were produced, which are either key operated (opened) or keyless. In the late
20thcentury, electromechanical locks were developed to trip electrical circuit as seen in automobile
ignitions. Other keyless locks include remote controlled lock, “security card” operated and
electronics [3].

Temperature control system for single room


Temperature is a process in which temperature of an object is measured and the passage of heat
energy in to or out of the object is adjusted to achieve a desired temperature. Electric fan is one of
the most popular electricity appliances due to its cost effectiveness and low power consumption
advantages. It is a common circuit and widely used in many applications. It is also one of the most
sensible solutions to offer comfortable and energy efficient. Nowadays, the usage of fan and heater
is controlled manually by pressing on the switch button. This non-innovative feature makes it
unable to turn on automatically according to temperature changes. So, an automatic temperature
control system technology is applied for the switching purpose in this circuit. Due to its advantages,
many projects focusing on automatic temperature control system application indifferent fields will
gain the benefits.

10 | P a g e
For examples, an automatic temperature controller for multi element array hyperthermia systems,
multi-loop automatic temperature control system design for fluid dynamics , automatic temperature
control for transport airplanes , design of automatic temperature-control circuit module in tunnel
micro wave heating system , automatic temperature and humidity control system using air
conditioning in transformer substation and so forth. There is also a case study of automatic
temperature control system on diagnosable discrete event system design. This project proposes an
invention of temperature control system for a single rom. It has an automation operation by using a
microcontroller. It uses a unique design. This is to enhance its functionality to become more
efficient and effective for hot weather condition. The circuit provides a comfort for human‟s life,
especially for hot city. It really helps to solve the problem of handicapped person when to switch on
the fan. [2] We can observe different works in temperature control system applied previously.
Temperature control for cooking system that is for stove applied in 2011 in Malaysia by
NORTHRAN .J a Malaysian university student. His method control the stove temperature by using
temperature sensor that senses the condition of stove and it takes possible measure when
temperature of stove going above or below specified value. This control system also uses keypad
control system and use also digital and sensing system. [3] In our project we also control the
temperature this project is different from the above we have seen is it control the temperature for
single room. We control the room temperature when the temperature is above 27 and below 8
degree centigrade. In this system we use the temperature sensor which senses the temperature and
give signal to micro controller. This system is different because it does not need any keypad the
temperature sensor sense the temperature and the fan and heater on or off by its own and also when
the person does not need the fan or the temperature is become low degree centigrade there is heater
that we proposed to do.

11 | P a g e
Components that we use in this project
1. microcontroller

2. PIR sensor

3. 5V Power supply

4. Lamps

5. Relay

6. Relay driver

7. LDR

12 | P a g e
Methodology
The methodology of this project involves a number of different tasks that are performed to lead towards
completion. The first task is to describe the statement of the problem and define the objectives of the
project. This is followed by the literature review where all the theoretical information regarding the
component of the automatic room light control is gathered. A comparison of previous similar project is
also presented. A brief description on the PIR and LDR sensor is then presented.
A detail and Mathematical calculation of our project is presented. Using LDR and PIR sensor Automatic
room light control is designed. Also, an algorithm is implemented in our system which uses both the
LDR and PIR sensor to decide whether to switch on the light or not.
Simulation studies are carried out for LDR sensor circuits, PIR sensor circuits and Power supply circuits
to show the results matches with calculation, which is required to give to microcontroller. In addition to
this the simulation studies are carried out for Final circuit. The final stage is the conclusion based on our
project.
A block diagram representing the methodology of the paper is shown in Figure 1.1.

Problem e of the problem

Objective
13 | P a g e
Collecting data and literature review

System modeling design and development

Flow chart
Power supply PIR sensor LDR sensor
development and
circuit design dfcircuit circuit design
code writing
design

Code execution and


Simulation 1 Simulation 2 Simulation 3
loading to
microcontroller

Constructing over all circuit and Simulation Result Analysis

Conclusion

Figure 1.1.Methodologies

14 | P a g e
BUGET
S.NO Component Amount Price
1 LDR sensor 2 6.36 birr
2 PIR sensor 2 180.2 birr
3 PIC 16f877A 1 92 birr
4 Relay 2 32birr
5 BC 547 transistor 4 22.94 birr
6 1N4007 diode 6 1.91 birr
7 LM7805 regulator 1 90.6 birr
8 Variable resistor 4 26.88 birr
9 230/12V transformer 1 85 birr
10 Lamps 10 100 birr
11 SPST pushbutton 1 3.82 birr
12 20MHz crystal 1 20 birr
Oscillator
13 LM324 4 60 birr
14 1A fuse 1 15 birr
15 Resistors 14 86 birr
16 Capacitors 4 25 birr
TOTAL 847.63 birr

15 | P a g e
WORK PLAN

2012E.C
Month

Week Week Week Week


N Activities 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4

O
1 Literature review

2 Data collection
3 Determine material
and specification
4

5 Analysis
6 Concept design and
conclusion
7 Project paper
simulation
8 Preparation for
presentation

TABLE 2:-TABLE OF WORK PLAN

16 | P a g e
REFERENCES
[1] C. Bae, J. Yoo, K. Kang, Y. Choe and Jeunwoo Lee, “Home server for home digital service
environments” IEEE International Conference on Consumer Electronics, 2003, vol 49, pp. 1129-1135,
Nov. 2003
[2] "Infra Red sensors applications and construction." Robotics and Electronics projects, tutorials,
http://www.ikalogic.com/ir_prox_sensors.php.
[3] A. Alheraish, “Design and implementation of home automation system,” IEEE Transactions on
Consumer Electronics, vol. 50, no. 4, pp.1087- 1092, Nov. 2004
[4] A. R. Al-Ali and M. Al-Rousan, “Java-based home automation system,”IEEE Transactions on
Consumer Electronics, vol. 50, no. 2, pp.498-504, May 2004.
[5] A. Z. Alkar, and U. Buhur, “An Internet Based Wireless Home Automation System for
Multifunctional Devices,” IEEE Transactions on Consumer Electronics, vol. 51, no. 4, pp. 1169 1174,
Nov. 2005.
[6] Evaluation of Energy-Efficiency in Lighting Systems using Sensor Networks Declan T.Delaney,
Gregory M.P. O’Hare, and Antonio G. Ruzzelli CLARITY: Centre for Sensor Web Technologies
University College Dublin
[7] 2004 Buildings Energy Data book, http://buildingsdatabook.eren.doe.gov
[8] http://www.parallax.com/detail.asp?productid=555-28027
[9] Datasheet of NORP 12 LDR
[10] Cytron Technologies, "PIR Sensor Module User's Manual V1.1” December 2007 Malaysia
[11] PIR 325 Infrared Parts Manual, http://www.glolab.com/pirparts/pirmanual.pdf, Global Corporation,
USA.
[12] PIC 16F877A DATASHEET , http:// www.microchip. com/ www products/ devices. aspx
[13] http://www.kitsrus.com/projects/cds.pdf.
[14] http://www.parallax.com/detail.asp?productid=555-28027, Feb.2007.
[15] http://www.kitsrus.com/ projects/fresnel.pdf.
[16] http://www.circuitstoday.com/wp_content/up loads/2011/01/PIC 16F877A gif.

17 | P a g e
[17] http: //www.embed4u.com.
[18] http://www.wvshare.com/datasheet/Microchip_PDF/PIC16F877A.PDF, 2001.
[19] http://www.sunrom.com/files/3190-datasheet.pdf, Sept. 2010.
[20] LM7805 Data sheet, August 2012.
[21] BC 547 Transistor Data sheet as Switch, http://www.semiconductors.philips.com ,Apr .1999.
[22] sBC547 Transistor Data sheet as Amplifier, http://www.semiconductors.philips.com ,Apr. 1999.
/

18 | P a g e
19 | P a g e
20 | P a g e
21 | P a g e
22 | P a g e
23 | P a g e
.

24 | P a g e
25 | P a g e
.
.

26 | P a g e

You might also like