Automatic Bidirectional Visitor Countor & Temp Controller

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

Declaration
We Eleyas Bekele, Gashaw Shimelash, Ayena Wakene and Teshale Kebede being members of
group Eight, declare that this report contains only work completed by members of our group except
for information obtained in a legitimate way from literature review. We clarify that our work is
based on project writing Guide line given by the Institute

Name of the Academic Advisor Signature Date


--------------------------------------- --------------- -------------
Name of Students

1. ELEYAS BEKELE………………….04369/06

2. GASHAW SHIMELASH……………04481/06

3. AYENA WAKENE…………………..04143/06

4. TESHALE KEBEDE………………...05176/06
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

Acknowledgement
Our deepest gratitude and appreciation goes to our Advisor Mr. V. ANAND for his constructive
Advises, feedbacks and suggestions until the end of the project. We consider ourselves very
fortunate for being able to work with a very considerate and encouraging advisor like him. And
also we would like to extend our appreciation and thanks to our instructors for providing some
useful advice and feedback while we are doing the project. Finally our gratitude goes to JIMMA
INSTITUTE OF TECHNOLOGY for giving the chance to do project.

i|Page
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

ABSTRACT
The need for a device that can automatically capable of taking count of number of people
in a room and control their safty by controlling the temperature on its own has been needed. It is
the need of time to revolutionize the traditional methods of counting visitors inside hotels,
recreational places, meeting rooms and cinemas. In this system a person who inter to the desired
place is counted and number is displayed on the LCD and also a system decrement the number of
the person when someone leave the place. This increment and decrement is done by considering
the two IR sensors. One IR sensor for increment and the other for decrement purpose. This system
also used to control the temperature of the room when someone inters to the place and make the
fun start when the temperature is above the threshold level.

ii | P a g e
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

Table of Contents
Acknowledgement ..................................................................................................................................... i
ABSTRACT.................................................................................................................................................. ii
CHAPTER ONE ............................................................................................................................................... 1
INTRODUCTION ............................................................................................................................................. 1
1.1 Project background ............................................................................................................................. 2
1.2 statement of the problem................................................................................................................... 2
1.3 project Objective................................................................................................................................. 2
1.3.1 General objective ............................................................................................................................. 2
1.3.2 Specific objective ............................................................................................................................. 2
1.4 Scope of the project ............................................................................................................................ 2
CHAPTER TWO .............................................................................................................................................. 3
LITERATURE REVIEW ................................................................................................................................. 3
2.1 IR radiation .......................................................................................................................................... 3
2.1.1 Properties of infrared system ...................................................................................................... 3
2.1.2 Advantages over RF...................................................................................................................... 4
CHAPTER THREE ............................................................................................................................................ 5
OVERVIEW OF THE PROJECT ..................................................................................................................... 5
3.1 Block diagram...................................................................................................................................... 5
CHAPTER FOUR ............................................................................................................................................. 8
SYSTEM DESIGN AND IMPLIMENTATION .................................................................................................. 8
4.1 Circuit Design ...................................................................................................................................... 8
4.2 Circuit operation ................................................................................................................................. 8
4.3 A general description of the component used ................................................................................... 9
ARDUINO UNO .......................................................................................................................................... 9
CHAPTER FIVE ............................................................................................................................................. 14
SIMULATION RESULT & DISCUSSION ...................................................................................................... 14
CHAPTER SIX................................................................................................................................................ 16
CONCLUSION AND RECOMMENDATION ................................................................................................ 16
6.1 Conclusion ......................................................................................................................................... 16
6.2 Recommendation.............................................................................................................................. 16
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

List of Figure
Figure 3.1 Block diagram of Bidirectional Visitor counter and temperature controller……………………..5

Figure 4.1 Bidirectional Visitor counter and temperature controller circuit diagram………………………8

Figure 4.2 arduino uno..........................................................................................................................…...10

Figure 4.3 LCD (Liquid crystal display)…………………………………………………………………..10

Figure 4.4 PIR sensor……………………...………………………………………………………………12

Figure 5.1 circuit diagram when no one intercept the sensors…………………………………………….14

Figure 5.2 circuit diagram when somebody intercept sensor 1……………………………………………14

Figure 5.3 circuit diagram when somebody intercept sensor 2……………………………………………15


BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

CHAPTER ONE
INTRODUCTION
This project titled “Bidirectional Visitor counter and temperature controller” is designed
and presented in order to count the visitors of an offices, malls, sports venue, hospitals and control
the temperature by considering the visitors entering and other natural phenomena’s. The system
counts both the entering and exiting visitor of the hall or other place, where it is placed. Depending
upon the interrupt from the sensors, the system identifies the entry and exit of the visitor. This
system can be implemented in all the places where the visitors have to be counted and their safety
should be controlled.
Bidirectional Visitor Counter is a system used to count the visitors entering and leaving a
room and control the temperature of the place where they are. The word bidirectional signifies the
count of both types i.e. entering and leaving. Bidirectional counters are designed accordance with
the real time demands. The design becomes important for single door systems where all the visitors
are going in and coming out through a single channel

Visitor counter and temperature controller is a reliable circuit that takes over the task of
counting number of Persons Visitors in the Room very accurately and monitor their room’s
temperature. When somebody enters into the Room then the Counter is Incremented by one. The
total number of Persons inside the Room is displayed on the LCD module. The Arduino does the
above job it receives the signals from the sensors, and this signals operated under the control of
software which is stored in ROM.

This circuit divided in four parts: sensor, controller, counter display and fun motor. The
sensor part divide in to two, one is the two PIR sensor that would observe an interruption and
provide an input to the controller which would run the counter to count up or down. The same
count is displayed on LCD. The other is temperature sensor which sense the temperature and
provide input to the controller which allow the value to be displayed and the fun to run.

As it is known, when there is a lot of people in a limited area the temperature of the room
will change accordingly.so the temperature controller used to control the temperature of the room
by allowing the fun to run when it is necessary and deny the permission when the temperature is
low(the number of visitors decrease).

1|Page
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

1.1 Project background


In the past few decades, a demand for automatic technologies has amazingly increased.
Both industrial and private customers are demanding products for a wide range of applications that
incorporate wireless features, which can do things automatically than allowing them to do it
manually.
This project intends to make automatic system using Infrared technology, so as to counter
this problem. Thus, by using Infrared receiver with coordination of Arduino, fan motor and LCD
display device we had tried to do or make automatic wireless bidirectional visitor counter and
temperature controller.

1.2 statement of the problem


In this automatic world manual counting of visitors/persons is one and the major obstacle
for making so many automatic home automation and other systems. Now a days in every aspect
of technology automatic system is the most desired one to make human life better and easier but
without an automatic bidirectional counter this cannot be accomplished.

1.3 project Objective


1.3.1 General objective
The objective of this project is designing a bidirectional visitor counter and temperature
controller circuit

1.3.2 Specific objective


 To learn about PIR
 To know more about arduino and programing

1.4 Scope of the project


This project is not limited to a specific application or a specific operating environment, but it can
be easily implemented wherever such an application is needed.
I. The PIR must be guided for decreasing the sensing angle or for making them sense only
straight forward
II. This circuit can be used only for one door.
III. The circuit should be inside of the house (at the inner side of the door).
IV. Visitors cannot enter simultaneously.

2|Page
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

CHAPTER TWO
LITERATURE REVIEW
2.1 IR radiation
Infrared (IR) radiation is a type of electromagnetic radiation. Infrared light has a longer
wavelength than visible light. The infrared has a wavelength of 750 nm to 100 µm. The infrared
radiation is invisible to humans but we can feel it as heat. Infrared region can further be divided
into sub-regions as follows:

Near Infrared (NIR): 750 nm to 1:5 µm.

Short Wavelength Infrared (SWIR): 1.5 µm to 3 µm.

Mid Wavelength Infrared (MWIR): 3 µm to 8 µm.

Long Wavelength Infrared (LWIR): 8 µm to 15 µm.

Far Infrared (FIR): Longer than 15 µm.

The MWIR and LWIR is known as the thermal infrared. All objects emit IR known as
black body radiation (thermal radiation). This is emitted from the surface of an object which is due
to its temperature. Human body at normal body temperature radiates IR approximately at
wavelengths around 9.4 µm.

Pyro electricity (from the Greek pyro, fire, and electricity) is the ability of certain materials
to generate a temporary electrical potential when they are heated or cooled. It is a migration of
positive and negative charge to opposite ends of a crystal's polar axis as a result of a change in
temperature, and this causes an electrical polarization. This polarization change gives rise to a
temporary electric potential, although this disappears after the dielectric relaxation time

2.1.1 Properties of infrared system


Infrared radiation (IR) is electromagnetic radiation with a wavelength between 0.7 and 400
micro meters, which equates to a frequency range between approximately 1 and 430 THz. Its
wavelength is longer (and the frequency lower) than that of visible light, but the wavelength is
shorter (and the frequency higher) than that of terahertz radiation microwaves.

3|Page
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

2.1.2 Advantages over RF


a) High noise immunity

Another advantage of IR over radio is its immunity to electromagnetic interference (EMI).This


makes IR the preferred option in environments where interference must be minimized or
eliminated. In addition, IR does not interfere with and is not affected by radio frequencies, which
is particularly relevant in hospitals, as explained in a number of published articles in the area.

b) Higher security

IR also presents advantages over radio in terms of security. Because IR radiation behaves like
visible light, it does not penetrate walls, which means that the room where the energy is generated
encloses the emitted signal completely (assuming there are no windows or transparent barriers
between rooms). This prevents the transmitted information from being detected outside and
implies intrinsic security against eavesdropping. In addition, IR offers the possibility of rapid
wireless deployment and the flexibility of establishing temporary communication links.

Further advantages of IR over radio include the

a) Low cost

b) The small size and

c) The limited power consumption

4|Page
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

CHAPTER THREE
OVERVIEW OF THE PROJECT
3.1 Block diagram

Power supply

PIR LCD
SENSOR 1
ARDUINO UNO
PIR
SENSOR 2
RELAY FAN
TEMPRATURE
SENSOR

Figure 3.1 Block diagram of Bidirectional Visitor counter and temperature controller
The basic block diagram of the bidirectional visitor counter is shown in the above figure. Mainly
this diagram consist of the following essential blocks

 Power supply
 Arduino uno
 Relay
 PIR sensor
 Temperature sensor
 Fun motor
 LCD

5|Page
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

Power supply

Here we use +5v dc power supply, the main function of this block is to provide the required
amount of voltage to essential circuits. +5v is given to two PIR sensor, Arduino uno and LCD
device and also we use 24v battery for the fan motor.

Arduino uno

This block contain Arduino uno. That controls everything in the circuit. It accept the data
from the two types of sensors(PIR sensors and temperature sensor) and order the LCD to right
the number of the objects pass through the sensors and allow the fun to run when it is necessary
according to the temperature sensor. It allow the number of visitors to increase and decrease by
referring the two PIR sensor.

Relay

The term Relay generally refers to a device that provides an electrical connection between
two or more points in response to the application of a control signal. The most fundamental control
of any equipment is the ability to turn it “ON” and “OFF”. The easiest way to do this is using
switches to interrupt the electrical supply. Although switches can be used to control something,
they have their disadvantages. The biggest one is that they have to be manually (physically) turned
“ON” or “OFF”.

Here, relay do normal switching “ON” and “OFF”. When the temperature become greater
than that of the threshold temperature the output pin of arduino become high and make the relay
ON state otherwise it is at OFF state.

PIR sensor

PIR sensors used to sense motion, almost always used to detect whether a human has
moved in or out of the sensors range. They are small, inexpensive, low-power, easy to use. For
that reason they are commonly found in appliances and gadgets used in homes or businesses. They
are often referred to as PIR, "Passive" or “Pyro electric" IR motion sensors.

6|Page
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

Two PIR sensors are used each for up and down counting respectively. Whenever an
interruption is observed by the first PIR sensor, it increments the counter value. Similarly, when
the second sensor detects an obstacle, the count is decremented. The count value is calculated
depending upon this sensors input and is displayed on a LCD

Temperature sensor

This block contain a Temperature Sensor which is a great chip for measuring temperature.
Here we use a temperature sensor called LM35, which is low voltage, precision centigrade
temperature sensors. It provide a voltage output that is linearly proportional to the Celsius
(centigrade) temperature.

Liquid Crystal Display (LCD)

LCD is the most basic electronic display device that can display digits. They find wide
application in devices that display numeric information like digital clocks, radio, microwave
ovens, electronic meters etc., so it used to display the counted number corresponding to the two
PIR sensors. Here the LCD is ordered by the controller (Arduino).
Fan motor
This block contain a fun motor (24V DC Motor) which used to maintain the temperature
of the desired place by rotating when the temperature is greater than the threshold value.24V DC
Motor is any of a class of rotary electrical machines that converts direct current electrical power
into mechanical power.

7|Page
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

CHAPTER FOUR
SYSTEM DESIGN AND IMPLIMENTATION
4.1 Circuit Design
LM016L

BATTERY
9V
LCD1

VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3

4
5
6

7
8
9
10
11
12
13
14
RELAY
5V

0 0

13
12
11
10
9
8

7
6
5
4
3
2
1
0
DUINO1
PB5/SCK

PD4/T0/XCK
PB0/ICP1/CLKO
AREF

TX PD1/TXD
RX PD0/RXD
PD7/AIN1
~ PD6/AIN0
~ PD5/T1

~ PD3/INT1
PD2/INT0
~PB3/MOSI/OC2A
~ PB2/SS/OC1B
~ PB1/OC1A
PB4/MISO
ARDUINO UNO R3

DIGITAL (~PWM)
TestPin
Vcc OUT GND
TestPin
ATMEGA328P-PU Vcc OUT GND
1121

microcontrolandos.blogspot.com

PC4/ADC4/SDA
PC5/ADC5/SCL
ANALOG IN
PC0/ADC0
PC1/ADC1
PC2/ADC2
PC3/ADC3
RESET

A0
A1
A2
A3
A4
A5
2
VOUT

www.TheEngineeringProjects.com
27.0
1

www.TheEngineeringProjects.com
3

PIR2
PIR SENSOR
U1 PIR1
LM35
PIR SENSOR

Figure 4.1 Bidirectional Visitor counter and temperature controller circuit diagram

4.2 Circuit operation


As understood from the block diagrams the two PIR sensor pairs placed 15cm away from
each other (since the time we gave for visitor to pass the next PIR sensor is 1 second). when there
is no one who can intercept or pass through the PIR sensors the node (arduino
microcontroller pin) becomes logic 0 and nothing happen When someone intercept one of
them so that an IR radiated from interceptor person is received by PIR sensors. Then the value at
the arduino microcontroller output pin becomes high (logic 1), so the arduino microcontroller
will increment/decrement the value by considering which sensor is giving logic high at the port of
it. The value will be displayed on the LCD. The temperature sensor senses the temperature of the
desired place and announce the value to the arduino uno, and when the temperature is greater than
270C the arduino order the fun to run by making its output pin high. When this output pin
(12) high the current will pass through the relay and energizes relay the current flow to the fan
motor and make it rotate.

8|Page
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

4.3 A general description of the component used


ARDUINO UNO
An Arduino is an open-source microcontroller development board. Arduino consists of
both a physical programmable circuit board (often referred to as a microcontroller) and a piece
of software, or IDE (Integrated Development Environment) that runs on computer, used to write
and upload computer code to the physical board.
The board features an Atmel ATmega328 microcontroller operating at 5 V with 2Kb of
RAM, 32 Kb of flash memory for storing programs and 1 Kb of EEPROM for storing parameters.
The clock speed is 16 MHz, which translates to about executing about 300,000 lines of C source
code per second. The board has 14 digital I/O pins and 6 analog input pins.
Power:-
The Uno board can be controlled through the USB association or with an outer power
supply. Outside (non-USB) force can come from battery. The board can work on an outside supply
from 5 to 20 volts.
Memory of Arduino uno:-

The ATmega328 has 32 KB (with 0.5 KB involved by the boot loader). It likewise has 2 KB of
SRAM and 1 KB of EEPROM (which can be perused and composed with the EEPROM library).

Input and output of arduino uno:-


Arduino has 14 digital pins. They work at 5 volts. Every pin can give or get 20 mA as
prescribed working condition and has an interior draw up resistor of 20-50k ohm. A greatest of
40mA is the worth that must not be surpassed on any I/O pin to maintain a strategic distance from
perpetual harm to the microcontroller.
Furthermore, a few pins have specific capacities:
1) Serial: 0 (RX) and 1 (TX). Used to get (RX) and transmit (TX) TTL serial information.
2) Outside Interrupts: 2 and 3. These pins can be designed to trigger a hinder on a low esteem,
a rising or falling edge, or an adjustment in worth.
3) PWM: 3, 5, 6, 9, 10, and 11. Give 8-bit PWM yield with the analog Write () capacity.
4) SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins bolster SPI correspondence
utilizing the SPI library.

9|Page
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

5) Driven: 13. There is an implicit LED driven by advanced pin 13. At the point when the pin
is HIGH esteem, the LED is on, when the pin is LOW, it's off.
6) TWI: A4 or SDA pin and A5 or SCL pin. Support TWI correspondence utilizing the Wire
library.
The Uno has 6 simple Analog inputs, named A0 through A5, each of which give 10 bits of
determination (i.e. 1024 unique qualities).
There are a few different pins on the board:
1) AREF. Reference voltage for the simple inputs. Utilized with analog Reference.
2) Reset. Convey this line LOW to reset the microcontroller. Normally used to add a reset
catch to shields which obstruct the one on the board.

Figure 4.2 arduino uno


16X2 LCD Display
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range
of applications. A 16x2 LCD display is very basic module and is very commonly used in various
devices and circuits. These modules are preferred over seven segments and other multi segment
LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of
displaying special & even custom characters (unlike in seven segments), animations and so on.

Figure 4.3 LCD (Liquid crystal display)


10 | P a g e
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this
LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely,
Command and Data. The command register stores the command instructions given to the LCD. A
command is an instruction given to LCD to do a predefined task like initializing it, clearing its
screen, setting the cursor position, controlling display etc. The data register stores the data to be
displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD.
PIR SENSOR

The PIR (Passive Infra-Red) Sensor 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. When motion is detected
the PIR sensor outputs a high signal on its output pin. This logic signal can be read by a
microcontroller or used to drive an external load; see the source current limits in the features list
below

PIRs are basically made of a pyro electric sensor, which can detect levels of infrared
radiation. Everything emits some low level radiation, and the hotter something is, the more
radiation is emitted. The sensor in a motion detector is actually split in two halves.

The PIR sensor has two slots in it, each slot is made of a special material that is sensitive
to IR. When the sensor is idle, both slots detect the same amount of IR, the ambient amount
radiated from the room or walls or outdoors .When a warm body like a human or animal passes
by, it first intercepts one half of the PIR sensor, which causes a positive differential change between
the two halves. When the warm body leaves the sensing area, the reverse happens, whereby the
sensor generates a negative differential change. These change pulses are what is detected

Features

 Detect a person up to approximately 3 meter away in reduced sensitivity mode

 3-pin SIP header ready for breadboard or through whole projects

 Small size makes it easy to conceal

 Easy interface to any microcontroller

11 | P a g e
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

Figure 4.4 PIR sensor

LM35 TEMPRATURE SENSOR

LM35 Temperature Sensor is a semiconductor based sensor. It is an integrated analog


temperature sensor whose electrical output is proportional to Degree Centigrade. LM35 Sensor
does not require any external calibration or trimming to provide typical accuracies. The LM35’s
low output impedance, linear output, and precise inherent calibration make interfacing to readout
or control circuitry especially easy

Features of LM35 Temperature Sensor

 Calibrated directly in Degree Celsius (Centigrade)


 Linear at 10.0 mV/°C scale factor
 0.5°C accuracy guarantee-able (at a25°C)
 Rated for full -55°C to a 150°C range
 Operates from 4 to 30 volts
 Less than 60 mA current drain
 Non-linearity only 0.25°C typical
 Low impedance output, 0.1Ωfor 1 mA load

Figure 4.5 LM35 temperature sensor

12 | P a g e
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

LM35 is a very low cost and easily available Sensor. Main advantage of LM35 is that it is
linear i.e. 10mv/°C which means for every degree rise in temperature the output of LM35 will rise
by 10mv. So if the output of LM35 is 220mv/0.22V the temperature will be 22°C. So if room
temperature is 32°C then the output of LM35 will be 320mv i.e. 0.32V.

RELAY
Relays are one of the oldest, simplest, and yet, easiest and most useful devices. Before the
advent of the mass produced transistor, computers were made from either relays or vacuum tubes,
or both. A relay, quite simply, is a small machine consisting of an electromagnet (coil), a switch,
and a spring. The spring holds the switch in one position, until a current is passed through the coil.
The coil generates a magnetic field which moves the switch. It's that simple. Anyone can use a
very small amount of current to activate a relay, and the switch can often handle a lot of current.

13 | P a g e
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

CHAPTER FIVE
SIMULATION RESULT & DISCUSSION
Case 1:
No one intercept the sensor
LM016L

BATTERY
9V
LCD1

VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3

4
5
6

7
8
9
10
11
12
13
14
RELAY
5V

0 0

13
12
11
10
9
8

7
6
5
4
3
2
1
0
DUINO1

PB5/SCK

PD4/T0/XCK
PB0/ICP1/CLKO
AREF

TX PD1/TXD
RX PD0/RXD
PD7/AIN1
~ PD6/AIN0
~ PD5/T1

~ PD3/INT1
PD2/INT0
~PB3/MOSI/OC2A
~ PB2/SS/OC1B
~ PB1/OC1A
PB4/MISO
ARDUINO UNO R3

DIGITAL (~PWM)
T estPin
Vcc OUT GND
T estPin
ATMEGA328P-PU Vcc OUT GND
1121

microcontrolandos.blogspot.com

PC4/ADC4/SDA
PC5/ADC5/SCL
ANALOG IN

PC0/ADC0
PC1/ADC1
PC2/ADC2
PC3/ADC3
RESET

A0
A1
A2
A3
A4
A5
2
VOUT
www.T heEngineeringProjects.com
27.0
1

www.T heEngineeringProjects.com

3
PIR2
PIR SENSOR
U1 PIR1
LM35
PIR SENSOR

Figure 5.1 circuit diagram when no one intercept the sensor 1


Case 2:
Somebody intercept sensor 1
LM016L

BATTERY
9V
LCD1
VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3

4
5
6

7
8
9
10
11
12
13
14

RELAY
5V

0 1
13
12
11
10
9
8

7
6
5
4
3
2
1
0

DUINO1
PB5/SCK

PD4/T0/XCK
PB0/ICP1/CLKO
AREF

TX PD1/TXD
RX PD0/RXD
PD7/AIN1
~ PD6/AIN0
~ PD5/T1

~ PD3/INT1
PD2/INT0
~PB3/MOSI/OC2A
~ PB2/SS/OC1B
~ PB1/OC1A
PB4/MISO

ARDUINO UNO R3

DIGITAL (~PWM)
T estPin
Vcc OUT GND
T estPin
ATMEGA328P-PU Vcc OUT GND
1121

microcontrolandos.blogspot.com
PC4/ADC4/SDA
PC5/ADC5/SCL

ANALOG IN
PC0/ADC0
PC1/ADC1
PC2/ADC2
PC3/ADC3
RESET

A0
A1
A2
A3
A4
A5
2
VOUT

www.TheEngineeringProjects.com
26.0
1

www.TheEngineeringProjects.com
3

PIR2
PIR SENSOR
U1 PIR1
LM35
PIR SENSOR

Figure 5.2 circuit diagram when somebody intercept sensor 1

14 | P a g e
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

Case 3:
Somebody intercept sensor 2
LM016L

BATTERY
9V
LCD1

VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3

4
5
6

7
8
9
10
11
12
13
14
RELAY
5V

1 0

13
12
11
10
9
8

7
6
5
4
3
2
1
0
DUINO1

PB5/SCK

PD4/T0/XCK
PB0/ICP1/CLKO
AREF

TX PD1/TXD
RX PD0/RXD
PD7/AIN1
~ PD6/AIN0
~ PD5/T1

~ PD3/INT1
PD2/INT0
~PB3/MOSI/OC2A
~ PB2/SS/OC1B
~ PB1/OC1A
PB4/MISO
ARDUINO UNO R3

DIGITAL (~PWM)
TestPin
Vcc OUT GND
TestPin
ATMEGA328P-PU Vcc OUT GND
1121

microcontrolandos.blogspot.com

PC4/ADC4/SDA
PC5/ADC5/SCL
ANALOG IN

PC0/ADC0
PC1/ADC1
PC2/ADC2
PC3/ADC3
RESET

A0
A1
A2
A3
A4
A5
2
VOUT

www.TheEngineeringProjects.com
27.0
1

www.TheEngineeringProjects.com
3

PIR2
PIR SENSOR
U1 PIR1
LM35
PIR SENSOR

Figure 5.3 circuit diagram when somebody intercept sensor 2


In this section, the response of the Bidirectional Visitor counter and temperature
controlling was discussed. The result obtained from the simulation is as shown in the figure above,
when there is No one who can intercept the PIR sensors the LCD display “nobody in room” and
the fun doesn’t run or the relay turn off hence there is no conduction between the source and fun,
but when the someone interface the PIR sensor the LCD starts displaying the number of persons
in parallel with the intercept of PIR sensor. The LCD also display the sensed temperature value
from the temperature sensor and when the value of the temperature increase above the 270C the
the relay turn on and connect the fan with the 24V source and make it run. This full fill the aim of
the design since its aim is to count the number of visitors in the desired place and controlling the
temperature of the desired place.

15 | P a g e
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

CHAPTER SIX
CONCLUSION AND RECOMMENDATION
6.1 Conclusion
From the whole project we conclude that by doing some modification, the area of
application can be extended in various fields’ i.e. automatic light system. This project gives us a
great deal of knowledge about the arduino chips, and the PIR. This type of device provides us with
the working of arduino chips and the PIR. PIR is a type of sensor which provides a sensing only
(mostly) when human being pass through it. In this project as soon as the PIR sense the arduino
accept the input and allow or deny a conducting path to be established between terminals of it and
the load.

This circuit is very simple to make and is very useful to the places where counting visitors
is needed. But the major disadvantage of this circuit is that it count visitors who pass
simultaneously in the same PIR sensor as one. So care has to be taken to avoid this kind of false
counting and the circuit should not be used in two different doors. In conclusion, this project is a
design which should be encouraged and put into large scale manufacturing because of its various
advantages.

6.2 Recommendation
This project is a viable one in the sense that it will go a long way in making it more
convenient easier for users to easily control their appliances, lighting points automatically in their
homes, hotel, conference rooms, and classrooms. Because of its importance as a household need,
efforts must be geared towards designing a viable project like this one. we strongly recommend that
the department should see this project as a priceless possession and should try to provide financial
assistance and more research works relating to this project to support and encourage students who
tries to do this type of project.

16 | P a g e
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

References

http://www.engineersgarage.com/electronic-components/atmega328P-microcontroller.
www.datasheets4u.com
http://electronicshub.com/microcontroller-projects/automatic-room-light-controller-with-
bidirectional-visitor-counter-using-arduino
http://www.pelonistechnologies.com/blog/advantages-and-disadvantages-of-ac-fans-and-dc-
fans

17 | P a g e
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

Appendix

#include<LiquidCrystal.h>

LiquidCrystal lcd(2,4,8,9,10,11);

#define pir 5

#define out 6

int count=0;

int lm35pin = A0;

int motorpin = 12;

void IN()

count++;

lcd.clear();

lcd.setCursor(0,0);

lcd.print("No person= ");

lcd.print(count);

temprature();

void OUT()

count--;

lcd.clear();

lcd.setCursor(0,0);

18 | P a g e
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

lcd.print("No person= ");

// lcd.setCursor(0,1);

lcd.print(count);

temprature();

void setup()

Serial.begin(9600);

lcd.begin(16,2);

lcd.print("Visitor Counter");

delay(100);

pinMode(pir, INPUT);

pinMode(out, INPUT);

pinMode(lm35pin, INPUT);

pinMode(motorpin, OUTPUT);

lcd.clear();

lcd.print("No Person:");

delay(200);

lcd.setCursor(0,1);

lcd.print(count);

void loop()

19 | P a g e
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

int value1=digitalRead(pir);

int value2=digitalRead(out);

if(value1==HIGH&&value2==LOW){

IN();

delay(300);

else if(value2==HIGH&&value1==LOW){

if(count>0)

OUT();

delay(300);

else if(value1==HIGH&&value2==HIGH){

lcd.clear();

lcd.setCursor(0,0);

lcd.print("No person= ");

lcd.print(count);

temprature();

delay(250);

else if(count>0){

temprature();

if(count<=0)

20 | P a g e
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

lcd.clear();

lcd.print("Nobody In Room");

delay(200);

lcd.setCursor(0,1);

void temprature(){

int analog;

float temprature;

analog=analogRead(lm35pin);

temprature=float(analog)/1023;

temprature=temprature*500;

lcd.setCursor(0,1);

lcd.println("TEMP: ");

lcd.print(temprature);

lcd.print("c");

if (temprature>=27){

digitalWrite(motorpin,HIGH);

if (temprature<27){

digitalWrite(motorpin,LOW);

}}

21 | P a g e
BIDIRECTIONAL VISITOR COUNTER AND TEMPRATURE CONTROLLER

22 | P a g e

You might also like