a report on bidirectional visitor counter using ir sensors and arduino uno r3

14
1 April 29, 2016 Digital Visitor Counter FINAL REPORT ON BI DIRECTIONAL DIGITAL VISITOR COUNTER

Upload: abhishekvb

Post on 15-Feb-2017

3.208 views

Category:

Engineering


86 download

TRANSCRIPT

Page 1: A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3

1

Digital Visitor Counter

FINAL REPORT ON BI DIRECTIONAL DIGITAL VISITOR COUNTER

29-04-2016

April 29, 2016

Page 2: A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3

2

Digital Visitor Counter

DIGITAL VISITOR COUNTER

CHAPTER 11.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 Digital Visitor Counter” with automatic room light control. 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 display the 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

April 29, 2016

Page 3: A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3

3

Digital Visitor Counter

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.

CHAPTER 2 2.1 Basic Block Diagram:

2.2 Block Diagram 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:

April 29, 2016

Page 4: A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3

4

Digital Visitor Counter

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: 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 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. 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

April 29, 2016

Page 5: A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3

5

Digital Visitor Counter

data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD.

CHAPTER 33.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

April 29, 2016

Page 6: A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3

6

Digital Visitor Counter

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 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

April 29, 2016

Page 7: A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3

7

Digital Visitor Counter

Resisters IR Sensor module 16x2 LCD display Bread Board Connecting Wires LED BC547 Transistor

4.2 Description of components: 4.2.1 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 either from an AC-to-DC connector (divider wart) or battery. The board can work on an outside supply from 6 to 20 volts.Memory of 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).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:

April 29, 2016

Page 8: A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3

8

Digital Visitor Counter

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 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:

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

April 29, 2016

Page 9: A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3

9

Digital Visitor Counter

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 16X2 LCD DisplayLCD (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. 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.

CHAPTER 55.1 Advantges:

Low cost.

April 29, 2016

Page 10: A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3

10

Digital Visitor Counter

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 66.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.

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

April 29, 2016

Page 11: A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3

11

Digital Visitor Counter

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.com4) www.arduino.cc5) http://electronicshub.com/microcontroller-projects/automatic-room-

light-controller-with-bidirectional-visitor-counter-using-arduino.

April 29, 2016