Capstone Final Project
Capstone Final Project
Capstone Final Project
We have taken effort in this project. However, it would not have been possible without the kind
support and help, I would like to extend my sincere thanks to all of them.
We are highly indebted to Smt. J. J. Mane for her guidance and constant supervision as well as
providing necessary information regarding to the project and for the support for completing the
project.
We would like to express our special gratitude and thanks to all teaching and non- teaching
staff members of Instrumentation and Control department for giving us such attention and time.
Our thanks and appreciation algo go to all in developing the project and people who have
willingly help us out with their abilities.
1
ABSTRACT
As a developing country power sources of Bangladesh are limited. We know, a major part of
our electricity is being wasted due to our incognizance. After leaving the room the fans, lights
etc. remain on unnecessarily. The main object of this project is to minimize the wastage of
electricity. The other objective of this project is to detect the gas or smoke level in kitchen
room and take necessary action to protect firing. When a person enters into the room, the load
will get power and can be run by their switches.
The counter circuit can count the number of persons staying in the room. If a person enters into
the room the counter will be incremented and if a person leaves the room the counter will be
decremented. After the last person leaving the room the value of the counter will be zero and
the load will be disconnected from the power. The gas sensor always senses the gas or smoke
level in the kitchen room. If the level of gas/smoke is above a predefined threshold, it will give
an alarm sound. Moreover, if there is no person in the room the power main switch will be
automatically OFF. But if there is someone inside the room it will only give the alarm so that
the person can take necessary action.
Arduino board has been used in this project as a control circuit. Two laser diodes and two
photodiodes work as person counter and a gas sensor unit have been used. The project has been
completed and tested. It works properly and its performance is satisfactory.
2
CONTENT
3
INTRODUCTION
The objective of this project is to make a controller-based model to count number of persons
visiting particular room and accordingly light up the room. Here we can use sensor and can
know present number of persons.
In today’s world, there is a continuous need for automatic appliances with the increase in
standard of living, there is a sense of urgency for developing circuits that would ease the
complexity of life. Also, if at all one wants to know the number of people present in room so
as not to have congestion. This circuit proves to be helpful.
This Project ―Automatic Room Light Controller with Visitor Counter using Microcontroller
is a reliable circuit that takes over the task of controlling the room lights as well us counting
number of persons/ visitors in the room very accurately. When somebody enters into the room
then the counter is incremented by one and the light in the room will be switched ON and when
any one leaves the room then the counter is decremented by one. The light will be only switched
OFF until all the persons in the room go out. The total number of persons inside the room is
also displayed on the seven segment displays. IR sensors will count the quantities of visitors
and consequently run the lights and fans likewise.
4
Need of Automatic room light controller:
Wastage of electricity is one of the main problems which we are facing now-a-days. In our
home, school, colleges or industry we see that fan and lighting point are kept on even if there
are nobody in the room or area and passage. This happens due to negligence or because we
forgot to turn lights off or we are in a hurry. To avoid all such situations this project called
“Automatic room light controller with visitor counter and temperature sensing” is designed.
This project has three modules, first one is known as “Digital Visitor counter” and second
module is known as “Automatic room light controller” and third one is “light detection”. Main
concept behind this project is known as “Visitor counter” which measures the number of
persons entering in any room like seminar hall, conference room, hotel rooms.
List of Components:
Following are the major components used from which microcontroller based Automatic room
light controller has been fabricated:
5
CHAPTER 2
LITERATURE REVIEW:
Although not same but many related works have been done by many researchers. Some of the
papers have been studied and described below.
Asha Rawat, et al. [2016] has done an “Automated Room Light Controller with Visitor
Counter” [1]. The main purpose of the project is automation, saving electricity, increasing
appliance life span and yet providing a desired output smartly.
Shilpa et al [2017] has done a” Implementation of Automatic Room Light Controller with
Visitor Counter Design using 8051 Microcontroller”. This project compacts with the usage of
the energy in this competitive world of electricity. This project is well-organized enough to let
someone know about the accuracy of the person entered and have taken the exit from the room.
6
Winfred Adjardjah et al [2016] has done “Design and Construction of a Bidirectional Digital
Visitor Counter”. This paper presents the design and construction of a digital bidirectional
visitor counter (DBVC). The DBVC is a reliable circuit that takes over the task of counting
number of persons / visitors in the room very accurately and beeps a warning alarm when the
number of visitors exceeds the capacity limit of the auditorium/hall.
Gaurav Waradkaret al [2016] has done “Automated Room Light Controller with Visitor
Counter”. This paper presents the design and construction of a digital bidirectional visitor
counter. This is reliable project that takes over the task of counting number of visitors in the
room.
Sibu Skaria et al [2014] has done a “Automatic Lighting Controller”. Based on the paper title,
“AUTOMATIC LIGHTING CONTROLLER”, controls the amount of lighting in a room by
constantly monitoring the level of luminance in a room. Lights are then controlled such that
required illumination is available in the room. It can be applied effectively in commercial
buildings, homes, colleges etc.
7
CHAPTER 3
Block Diagram:
8
Block diagram description:
There are we using Four sensors which gives input output signal to the Arduino.
When input comes in Arduino, Arduino processes on it and gives output signal to LCD as
well as Relay.
When input signal is goes toward the relay that time relay well be open or close and
passes or stop the output signal towards the lights.
When that signal is high that time relay will close the circuit and led will be glow, and
when the output signal is low that time led will off.
Circuit Diagram:
9
Circuit Diagram Explanation:
1. Sensor Section: In this section we have used two IR sensor modules which contain
IR diodes, potentiometer, Comparator (Op-Amp) and LED’s. Potentiometer is used
for setting reference voltage at comparator’s one terminal and IR sensors sense the
object or person and provide a change in voltage at comparator’s second terminal.
Then comparator compares both voltages and generates a digital signal at output.
Here in this circuit, we have used two comparators for two sensors. LM358 is used
as comparator. LM358 has inbuilt two low noise Op-amp.
2. Control Section: Arduino UNO is used for controlling whole the process of this
visitor counter project. The outputs of comparators are connected to digital pin
number 14 and 19 of Arduino. Arduino read these signals and send commands to
relay driver circuit to drive the relay for light bulb controlling. If you find any
difficulty in working with relay, check out this tutorial on Arduino relay control to
learn more about operating relay with Arduino.
3. Digital Section: Arduino UNO is used for controlling whole the process of this
visitor counter project. The outputs of comparators are connected to digital pin
number 14 and 19 of Arduino. Arduino read these signals and send commands to
relay driver circuit to drive the relay for light bulb controlling. If you find any
difficulty in working with relay, check out this tutorial on Arduino relay control to
learn more about operating relay with Arduino.
4. Relay Driver section: Relay driver section consist a BC547 transistor and a 5-volt
relay for controlling the light bulb. Transistor is used to drive the relay because
Arduino does not supply enough voltage and current to drive relay. So, we added a
relay driver circuit to get enough voltage and current for relay. Arduino sends
commands to this relay driver transistor and then light bulb will turn on/off
accordingly.
10
3.3 Component Used:
11
Tech Specification:
Microcontroller Atmega 328
Architecture AVR
Operating Voltage 5V
Weight 7g
PCB Size 18 x 45 mm
Input Voltage 7-12 V
Digital I/O Pins 22
Power Consumption 19mA
Clock Speed 16 MHz
Analog IN Pins 8
Pin Configuration:
12
Liquid Crystal Display [LCD]:
Liquid crystal display is very important device in embedded system. It offers high flexibility
to user as he can display the required data on it. Liquid Crystal Display (LCD) of 20X4
characters operating on +5Volt supply and operated in 4-bit mode is implemented for the task
of displaying required messages.
The most commonly used LCDs found in the market today are 1 Line, 2 Line or 4 Line LCDs
which have only 1 controller and support at most of 80 characters, whereas LCDs supporting
more than 80 characters make use of 2 HD44780 controllers. Most LCDs with 1 controller has
14 Pins and LCDs with 2 controller has 16 Pins (two pins are extra in both for back-light LED
connections). Pin description is shown in the table below.
13
Character LCD pins with 1 Controller
14
DHT11 Temperature and Humidity Sensor:
DHT11 is a part of DHTXX series of Humidity sensors. The other sensor in this series is
DHT22. Both these sensors are Relative Humidity (RH) Sensor. As a result, they will measure
both the humidity and temperature. Inside the DHT11, there is a humidity sensing component
along with a Thermistor
The DHT11 Humidity and Temperature Sensor consists of 3 main components. A resistive type
humidity sensor, an NTC (negative temperature coefficient) thermistor (to measure the
temperature) and an 8-bit microcontroller, which converts the analog signals from both the
sensors and sends out single digital signal. This digital signal can be read by any
microcontroller or microprocessor for further analysis.
DHT11 Humidity Sensor consists of 4 pins: VCC, Data Out, Not Connected (NC) and GND.
The range of voltage for VCC pin is 3.5V to 5.5V. A 5V supply would do fine. The data from
the Data Out pin is a serial digital data.
DHT11 Sensor can measure a humidity value in the range of 20 – 90% of Relative Humidity
(RH) and a temperature in the range of 0 – 500C. The sampling period of the sensor is 1 second
i.e.
15
LDR LIGHT CONTROL:
LDR is an acronym for Light Dependent Resistor. LDRs are tiny light-sensing devices also
known as photoresistors.
LDR sensor basically contains 3 pins for analog input which is GND, VCC, SIG. LDR sensors
are used to detect amount of light.
LDR sensor modules are used where there is a need to sense the presence and absence of light
is necessary. These resistors are used as light sensors.
• The Light Dependent Resistor (LDR) is made using the semiconductor Cadmium
Sulphide (CdS).
• The resistance of the LDR decreases as the intensity of the light falling on it increases.
Incident photons drive electrons from the valence band into the conduction band.
16
IR Sensor Module:
The IR Sensor Module or infrared (IR) sensor is a basic and most popular sensor in electronics.
It is used in wireless technology like remote controlling functions and detection of surrounding
objects/ obstacles. IR sensors mainly consist of an Infrared (IR) LED and a Photodiode, this pair
is generally called IR pair.
Features:
17
Relay Module:
The relay is the device that opens or closes the contacts to switch ON/OFF other appliances
operating at high voltages. It is also used in safety circuits.
The relay's terminal (COM, NO and NC) is being brought out with screw terminal. It also
comes with a LED to indicate the status of relay.
The Single Channel Relay Module is a convenient board which can be used to control high
voltage, high current load such as motor, solenoid valves, lamps and AC load. It is designed to
interface with microcontroller such as Arduino, NodeMCU, etc.
Features:
• Compatible with any 5V microcontroller such as Arduino.
• Rated through-current: 10A (NO) 5A (NC)
• switching voltage 250VAC/30VDC
• switching current 10A
18
Voltage Regulator:
Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output
voltages. LM7805 is one of the most commonly used positive Regulator in Electronics
circuits to lower down the voltage from the higher input voltage and it provides a regulated
output of +5 v. Voltage Regulator keep the voltages from a power supply within a range
that is compatible with the other electrical components.
Features:
• Voltage Accuracy.
• This does not need any component to handle its output voltage.
• Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V.
19
Transformer:
A transformer is an electrical device which is used to convert electrical power from one
Electrical circuit to another without change in frequency.
Transformers convert AC electricity from one voltage to another with little loss of power.
Transformers work only with AC and this is one of the reasons why mains electricity is AC.
Step-up transformers increase in output voltage, step-down transformers decrease in output
voltage. Most power supplies use a step-down transformer to reduce the dangerously high
mains voltage to a safer low voltage. The input coil is called the primary and the output coil
is called the secondary. There is no electrical connection between the two coils; instead, they
are linked by an alternating magnetic field created in the soft-iron core of the transformer. The
two lines in the middle of the circuit symbol represent the core. Transformers waste very little
power so the power out is (almost) equal to the power in.
A step-down transformer has a large number of turns on its primary (input) coil which is
connected to the high voltage mains supply, and a small number of turns on its secondary
(output) coil to give a low output voltage.
20
Software Information
Proteus software:
The Proteus is an electronic circuit design software which includes a schematic capture,
simulation, and PCB (Printed Circuit Board) Layout modules. But generally, now adays Eagle
CAD is highly preferred over Proteus for PCB designing because of its flexibility. Even though
if are not using for PCB designing u can view the PCB layout of the component individually
while selecting the component it helps during the soldering of components in PCB. Proteus is
a head in simulating the circuits containing the microcontrollers where we can simulate the
circuit by uploading the hex code to the Micro-controller.
Arduino IDE:
The open-source Arduino Software (IDE) make site as to write code and upload it to the board.
This software can be used with any Arduino board. Every Arduino sketch has two main parts
to the program:
Void setup () –Sets things up that have to be done once and then do not happen again. Void
loop ()–Contains the instructions that get repeated over and over until the board is turned off.
21
CHAPTER 4
Wastage of electricity is one of the main problems which we are facing now-a-days. In our
home, school, colleges or industry we see that fan and lighting point are kept on even if there
are nobody in the room or area and passage. This happens due to negligence or because we
forgot to turn lights off or we are in a hurry. To avoid all such situations this project called
“Automatic room light controller with visitor counter and temperature sensing” is designed”.
Main concept behind this project is known as “Visitor counter” which measures the number of
persons entering in any room like seminar hall, conference room, hotel rooms. This function is
implemented using laser diode and photodiode. Here Arduino receives the signals from the
sensors, and this signal is operated under the control of software which is stored in the ROM.
Sensors are used for automatic light and fan switching according to require in the room.
22
4.3 Limitations of the project:
Because it uses electricity, it will not work when there is power outage. And also the counter
cannot detect when two people enter at the same time.
4.4 Advantages:
23
CHAPTER 5
METHODOLOGY
5.1 Methodology:
The Automatic Room Light Controller using Arduino and IR Sensor is a simple project, where
the lights in the room will automatically turn on upon detecting a human motion and stay turned
on until the person has left or there is no motion. Working of this project is very simple and is
explained here. Initially, when there is no human movement, the IR Sensor doesn’t detect any
person and its OUT pin stays LOW. As the person enters the room, the change in infrared
radiation in the room is detected by the IR Sensor. As a result, the output of the IR Sensor
becomes HIGH. Since the Data OUT of the PIR Sensor is connected to Digital Pin 8 of
Arduino, whenever it becomes HIGH, Arduino will activate the relay by making the relay pin
LOW (as the relay module is an active LOW module). This will turn the Light ON. The light
stays turned ON as long as there is movement in front of the sensor. If the person takes a nap
or leaves the room, the IR Radiation will become stable (there will be no change) and hence,
the Data OUT of the IR Sensor will become LOW. This in turn will make the Arduino to turn
OFF the relay (make the relay pin HIGH) and the room light will be turned OFF.
24
5.2 Steps:
25
CHAPTER 6
PROGRAM CODE
6.1 Coding:
#include <dht.h>
#include<LiquidCrystal595.h>
#define in 5
#define out 6
#define ldr 7
#define relay1 8
#define relay2 9
#define dataPin 10
dht DHT;
int count = 0;
int inn = 0;
int outt = 0;
unsigned long t = 0;
//*****************************************************************
void IN()
delay(200);
count++;
if(count > 0)
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Person In Room:");
lcd.print(count);
26
inn = 0;
delay(1000);
//digitalWrite(relay1,LOW);
//*****************************************************************
void OUT()
delay(200);
count--;
if(count <= 0)
lcd.clear();
lcd.print(count);
count = 0;
delay(1000);
digitalWrite(relay1,HIGH);
else
lcd.setCursor(0,1);
lcd.print("Person In Room:");
lcd.print(count);
outt = 0;
//*****************************************************************
void setup()
27
{
lcd.begin(16,2); lcd.setLED2Pin(HIGH);
delay(5000);
pinMode(in,INPUT);
pinMode(out,INPUT);
pinMode(ldr,INPUT);
pinMode(relay1,OUTPUT); pinMode(relay2,OUTPUT);
lcd.print(count);
//*****************************************************************
void loop ()
if (digital Read(in) == 0)
t = millis();
if(digitalRead(out) == 0)
{inn = 1;}
//--------------------------------------------
if(digitalRead(out) == 0)
28
{
t = millis();
if(digitalRead(in) == 0)
{ outt = 1; }
//--------------------------------------------
if(count > 0 )
digitalWrite(relay1,LOW);
//--------------------------------------------
int t = DHT.temperature;
int h = DHT.humidity;
lcd.setCursor(10,0); lcd.print("H:");
delay(500);
//*****************************************************************
29
CHAPTER 7
COMPONENT LIST
5 IR sensors 2 500/-
7 Transformer 1 299/-
9 Capacitor 6 80/-
12 Diodes 4 40/-
13 Total 3,032
30
CHAPTER 8
RESULT
8.1 Result:
31
CHAPTER 9
9.1 Conclusion:
The theme of this project when merged with certain established technologies can be quite
effective in number of countries like Germany, France and Japan, etc. which control the train.
Thus, project helps us to control the lights of a room automatically, counts the number of
persons or visitors entering and leaving the room.
32
References:
1. Prof, Asha Rawat “Automated Room Light Controller with Visitor Counter”, Imperial
Journal of Inter Disciplinary Research, Vol. 2, Issue 4, 2016
4. Asst prof, Shilpa “Implementation of Automatic Room Light Controller with Visitor
Counter Design using 8051 Microcontroller”, International Journal of Innovative
Research in Computer and Communication Engineering Vol. 5, Issue 2, February 2017.
5. Gaurav Waradkaret “Automated Room Light Controller with Visitor Counter”, Imperial
Journal of Interdisciplinary Research (IJIR) Vol-2, Issue 4, 2016
33