The aim of our project is to make a controller which can sense if any person enters the room and it lights up the room automatically and also counts how many person are entering the room or going out of it.
2. DigitalVisitor Counter
2April 29, 2016
29-04-2016
D IGITA L V IS ITO R CO UNTER
CHAPTER 1
1.1 Introduction
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. Many times we need to monitor the people visiting
some place like shopping mall. To provide solution for this we am going to implement
a project called “Bi Directional DigitalVisitor Counter” withautomaticroomlightcontrol.
This project has a “Visitor counter”. Basic concept behind this project is to measure and
display the number of persons entering in any room like seminar hall, conference room
etc. LCD displays number of person inside the room. We can use this project to count
and displaythe number of visitors entering inside any conference room or seminar hall.
This works in a two way. That means counter will be incremented if person enters the
room and will be decremented if a person leaves the room. In addition, it will
automatically control room lights .When the room is empty the lights will be
automatically turn off.
1.2 Motivation
A few days back, we organized a seminar in Pearl Continental, Conference Hall. Main
issues we faced were that firstly, few people were trapped inside hall and security
guards closed conference rooms after finishing seminar, because they (security guards)
were unaware of total number of people inside hall. Moreover, we couldn’t analyse the
feedback of people and number of people attending the seminar as there wasn’t any
registration process. Lastly, after ending of seminar, electrical appliances such as Air
coolers and fans were left unattended, this caused electricity wastage.
All these problems gave me perspective that if we could somehow analyse the number
of people entering and leaving halls, these drawbacks could be avoided. This promoted
the idea of Bidirectional Visitor Counter in our mind through which we can keep a check
on number of people and allow all people to leave any building before sealing it. We
can also count number of people to analyse the feedback of people on any event. And
most importantly, in case of all people leaving a premise, all electrical appliances will be
turned off automatically leading to saving of electricity.
3. DigitalVisitor Counter
3April 29, 2016
CHAPTER 2
2.1 Basic Block Diagram:
2.2 BlockDiagram Description:
The basic block diagram of the bidirectional visitor counter with automatic light
controller is shown in the above figure. Mainly this block diagram consist of the
following essential blocks.
Power Supply
IR Sensors
Arduino Uno R3 micro-controller
LED
LCD Display
2.2.1 Power Supply:
Here we used +5V dc power supply from computer USB. The main function of this block
is to provide the required amount of voltage to essential circuits. +5V is given to 2 IR
sensors, transistor (BC549C) and to a LCD display.
2.2.2 IR Sensors:
4. DigitalVisitor Counter
4April 29, 2016
This is the most fundamental type of sensor available in the market. The basic concept
is simple. There is an emitter which emits infrared (IR) rays. These IR rays are detected
by a detector. This concept is used to make proximity sensor (to check if something
obstructs the path or not, etc), contrast sensors (used to detect contrast difference
between black and white, like in line follower robots), etc.
2.2.3 Arduino Uno R3 Micro-controller(ATmega 328P):
An Atmel ATmega328P microcontroller in a 40 pin DIP package. It has 16 KB programmable
flash memory, static RAM of 1 KB and EEPROM of 512 Bytes. There are 14 digital I/O
(input/output) lines and 6 Analog I/O (input/output) pins.
2.2.4 LCD Display:
LCD (Liquid CrystalDisplay) 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. 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 instructionsgiven to the LCD. A command isan 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.
5. DigitalVisitor Counter
5April 29, 2016
CHAPTER 3
3.1 Schematic Diagram:
3.2 Description:
The IR transmitter will emit modulated 38 kHz IR signal and at the receiver we use
TSOP1738 (Infrared Sensor). The output goes high when the there is an interruption
and it return back to low when there is no obstacle to the ray. Input is given to the Port
4 of the Arduino microcontroller. Port 8 to 13 is used for the 7-Segment display
purpose. Port 2 is used for the Relay/LED Turn On and Turn off Purpose. LTS 542
(Common Anode) is used for 7-Segment display. And that time Relay/LED will get
Voltage and triggered so light will get voltage and it will turn on. And when counter will
be 00 that time Relay will be turned off. In this bidirectional circuit two infrared (IR)
sensor components are used for up and down counting, respectively. Whenever an
interruption is observed by the IR sensor then the IR sensor increment the value of
counter and whenever the second sensor detects any obstacle, the counter is
decremented. The number of interruption count depend upon the sensor’s input and
displayed on a set of seven segment displays by using the concept of multiplexing (for
concept of multiplexing refer seven segment multiplexing). The IR sensor input is
defined as up and down selector mode for the counter in the code. Every time the first
sensor is blocked, the first sensor gives a high voltage signals and the count the value
gets incremented. The value of second sensor gets decremented when connected to
second a sensor, gives high input. At every setup, the value of the counter is sent and
6. DigitalVisitor Counter
6April 29, 2016
displayed it on the Sensor, gives high input. At every setup, the value of the counter is
sent and displayed it on the seven segments.
3.3 Working:
The IR sensor continuously senses the presence of any obstacles (a person in our
case ).
If sensor 1 senses a person, it informs the controller that a person has entered
so that controller can increment the count.
At the same time it gives a delay of 1sec so that the person can cross the sensor
2 and the count is maintained correctly.
When a person exits, the sensor 2 informs the controller to decrement the
count. Similarly it also provides a delay of 1 sec to maintain count properly.
The count is displayed on LCD by the controller.
If there is at least 1 person is inside the hall, an LED will glow otherwise it is off.
CHAPTER 4:
4.1 List of Components:
Arduino UNO
Resisters
IR Sensor module
16x2 LCD display
Bread Board
Connecting Wires
LED
BC547 Transistor
4.2 Description of components:
4.2.1 ArduinoUno:
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
7. DigitalVisitor Counter
7April 29, 2016
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 either from an AC-to-DC connector (divider
wart) or battery.
The board can work on an outside supply from 6 to 20 volts.
Memoryof arduino uno:-
The ATmega328 has 32 KB (with 0.5 KB involved by the bootloader). It likewise has 2 KB
of SRAM and 1 KB of EEPROM (which can be perused and composed with the EEPROM
library).
Inputand outputof 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 toget (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 analogWrite()
capacity.
4) SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins bolster SPI
correspondence utilizing the SPI library.
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 analogReference().
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.
4.2.2 IR Sensors:
8. DigitalVisitor Counter
8April 29, 2016
Series are miniaturized receivers for infrared remote control systems. 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 microprocessor. TSOP17.. is the standard IR remote control receiver series,
supporting all major transmission codes.
Features:
Photo detector and preamplifier in one package
Internal filter for PCM frequency
Improved shielding against electrical field disturbance
TTL and CMOS compatibility
Output active low
Low power consumption
High immunity against ambient light
Continuous data transmission possible (up to 2400 bps)
Suitable burst length .10 cycles/burst
4.2.3 16X2LCD Display
LCD (Liquid CrystalDisplay) 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. 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 instructionsgiven to the LCD. A command isan 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.
9. DigitalVisitor Counter
9April 29, 2016
CHAPTER 5
5.1 Advantges:
Low cost.
Easy to use.
Can be implemented in single door.
Can be used for counting purposes.
Can be used for automatic room light control.
5.2 Disadvantages:
It is used only when one person cuts the rays of the sensor hence
cannot be used when two or more persons cross the door simultaneously.
When anybody is inside the room and we need to switch off the power
then we’ve to do it manually. So, in this case we fail to automatically
control the light.
5.3 Applications:
For counting purposes.
For automatic room light control.
It can be used at homes and other places to keep a check on the number
of persons entering a secured place.
It can also be used as home automation system to ensure energy saving
by switching on the loads and fans only when needed.
CHAPTER 6
6.1 Future Expansion:
By using this circuit and proper power supply we can implement various
applications, such as fans, tube lights, etc.
By modifying this circuit and using two relays we can achieve a task of
opening and closing the door.
10. DigitalVisitor Counter
10April 29, 2016
In bidirectional visitor counter the voice alarm may be added to
indelicate room is full and person can’t enter in the room.
6.2 Conclusion:
In today’s world ,there is continuous need automatic appliance will be increase in
standard of living , there is a sense of urgency for developing circuit that would ease
the complexity of life . Also if someone wants to know the number of persons
present in a room so as not to have congestion, the circuit prove to be helpful.The
theme of this project when merged with certain established technologies can be
quite effective in number of countries like Germany, France & Japan etc. which
control the train. This Project is useful in developing countries and this project has
a bright future. This project helps us to control the light of a room automatically
and counts the number of persons/visitors entering and leaving the room. By using
this circuit and proper power supply we can implement various applications such
as fans, tube lights etc.
References:
1) S. M. Mohaiminul Islam; Dept. of Computer Science, South Asian Univ., New Delhi, India
; Md. Mahbub-E-Noor, S. M. Tanvir Siddiquee Simulation of energy efficient Bi-
directional Visitor Counting Machine.
2) http://www.engineersgarage.com/electronic-components/atmega328P-microcontroller
3) www.datasheets4u.com
4) www.arduino.cc
5) http://electronicshub.com/microcontroller-projects/automatic-room-light-controller-
with-bidirectional-visitor-counter-using-arduino.