SlideShare a Scribd company logo
Amrita Vishwa Vidyapeetham
Amrita School of Engineering, Amritapuri
Vallikavu, Clappana P.O, Kerala.
ACCREDITED BY NAAC WITH “A” GRADE
DEPARTMENT OF ELECTRONICS AND
COMMUNICATION ENGINEERING
A REPORT
ON
”Bidirectional Visitor counter for
efficient electricity usage.”
SUBMITTED BY
Mr. Thupalli Nanda Vardhan (AM.EN.U4ECE18053)
Mr. Neeraj Malisetty (AM.EN.U4ECE18036)
Miss. Nirupama Suresh (AM.EN.U4ECE18037)
Mr. Lokesh Karanam (AM.EN.U4ECE18026)
UNDER THE GUIDANCE OF
Assistant PROF. Senthil Murugan
Assistant PROF. chinmayir
(Academic Year: 2020-2021)
Amrita Vishwa Vidyapeetham
Amrita School of Engineering, Amritapuri
Vallikavu, Clappana P.O, Kerala.
DEPARTMENT OF ELECTRONICS AND
COMMUNICATION ENGINEERING
Certificate
This is to certify that project entitled
”Bidirectional Visitor counter for efficient electricity usage.”
has been completed by
Mr. Thupalli Nanda Vardhan (AM.EN.U4ECE18053)
Mr. Neeraj Malisetty (AM.EN.U4ECE18036)
Miss. Nirupama Suresh (AM.EN.U4ECE18037)
Mr. Lokesh Karanam (AM.EN.U4ECE18026)
of third year of Bachelor degree in the Semester - I of academic year 2020-2021 in
partial fulfillment of the award of Third Year of Bachelor degree in ”Electronics and
Communication Engineering” as prescribed by the Amrita Vishwa Vidyapeetham. It
has been found to be satisfactory and hereby approved for the submission.
Assistant PROF. Senthil Murugan
Project Guide
Dr. Ravisankar .M
H.O.D
Bidirectional Visitor counter for efficient electricity usage.
ACKNOWLEDGEMENT
It gives me great pleasure and satisfaction in presenting this mini project on “Bidi-
rectional Visitor counter for efficient electricity usage.”.
I would like to express my deep sense of gratitude towards Assistant PROF. Senthil
Murugan and Assistant PROF. chinmayir for giving an oppurtunity to present the mini
project. Their support and encouragement was always with us.
I have furthermore to thank Electronics and Communication Department HOD Dr.
Ravisankar .M and Assistant PROF. Senthil Murugan to encourage me to go
ahead and for continuous guidance. I also want to thank Assistant PROF. chin-
mayir for all her assistance and guidance for preparing report.
I would like to thank all those, who have directly or indirectly helped me for the
completion of the work during this mini project.
Mr. Thupalli Nanda Vardhan (AM.EN.U4ECE18053)
Mr. Neeraj Malisetty (AM.EN.U4ECE18036)
Miss. Nirupama Suresh (AM.EN.U4ECE18037)
Mr. Lokesh Karanam (AM.EN.U4ECE18026)
Electronics and Communication Engineering, S5
Dept. of Electronics and Communication Engineeringi
Contents
1 Commencement of Project 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Implementation 2
2.1 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 Components Required for the Project . . . . . . . . . . . . . . . . . . . 3
2.2.1 LPC2148 Microcontroller . . . . . . . . . . . . . . . . . . . . . . 3
2.2.2 LCD 16x2 (Liquid Crystal Display) . . . . . . . . . . . . . . . . 9
2.2.3 IR (Infrared) Sensor: . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2.4 Crystal Oscillator: . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.5 Battery: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.6 Resistor: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2.7 Ceramic Capacitor: . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2.8 Switch: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2.9 Motor: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3 Circuit Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4 Circuit Explanation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.5 Working Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3 Software requirement 21
3.1 Keil uvision 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Proteus 8 Professional . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4 Inference 22
4.1 Application of Project . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.2 Advantages and Disadvantages . . . . . . . . . . . . . . . . . . . . . . . 22
4.2.1 Advantages: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.2.2 Disadvantages: . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.3 Results and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.5 Future works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.7 Literature reviews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.8 Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.9 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
ii
List of Figures
2.1 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 LPC2148 Pin Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Architecture of LPC2148 . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 LCD 16x2 Display pin diagram . . . . . . . . . . . . . . . . . . . . . . 9
2.5 LCD 16x2 displaying content . . . . . . . . . . . . . . . . . . . . . . . . 9
2.6 IR sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.7 Crystal Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.8 Crystal Oscillator symbol . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.9 Battery/cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.10 Battery symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.11 Resistors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.12 Resistor symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.13 Resistor symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.14 Ceramic capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.15 Push button switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.16 Switch symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.17 Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.18 circuit diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.19 Working flow diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
iii
Abstract
This project aims at controlling the electrical appliances depending on the number
of visitors present inside the room, auditorium, stadium, shopping malls, schools and
etc. The counting of visitors is done by using IR(infrared) sensor. In this project,
we used ARM7 LPC2148 microcontroller and two IR sensors as inputs to predict the
entry and exit of the visitor. Depending on the number of people inside room, the
microcontroller switch on or switch off the electrical appliances. We also used a LCD
16x2 display, to display the count on the LCD.
The programming is written in Embedded C using Keil. Simulation of the project
is done in Proteus 8 Professional. This device is placed at the entrance of the room,
to count the number of visits entering and leaving. It uses the principle of Light-
emitting diode that produces light in the infrared region of electromagnetic spectrum,
where the IR sensor actually detects the IR light and sends a HIGH signal input to
microcontroller indicating object detection. This project can be further enhanced by
using Industrial IR sensor for accuracy and adding cloud gateway for IoT applications.
Chapter 1
Commencement of Project
1.1 Introduction
In today’s world, there is a continuous need for automatic controlling of appliances.
With the increase in standard of living, there is a necessity for designing circuits that
would ease the complexity of life. Many times we need to monitor the people vis-
iting the auditorium, stadiums, shopping malls, schools, offices, and etc and display
them on the LCD screen. On numerous occasions, the main issue is few people get
trapped inside the auditoriums, shopping malls and many other places where crowd is
often.Counting number of visitors is very helpful to track the visitors as well as avoid
any kind of mishap to visitors. Moreover it can also be used to count the number of
people who have come for the event, auditorium, or banquet halls.
Also, we human beings often forget to switch off the electrical appliances like Air-
conditioners, fans, lights inside the room. The wastage of electricity is huge, when
the room is empty but the electrical appliances are still switched on. As electricity is
one of the daily needs and without it we can not use our smartphones, laptops, TVs,
lights, fans, washing machines, refrigerators and many more electrical appliances. As
a responsible citizen, it is our responsible to conserve electricity for future generations.
Considering all these perspectives, our team had decided to develop, design and
implement an device that can automate the counting of bidirectional visitors( that
can count both entering and exiting visitors) and display it on the LCD screen so
that we will have the information of total as well as present visitors inside the room,
auditorium, hall, shopping malls and etc which can be used to monitor the visitors
and give alerts to them. The device can also turn off the electrical appliances when no
visitor is present inside the room, therefore saving electricity. We implemented this cir-
cuit design in Proteus 8 Professional and code is written in Embedded C in Keil uvision.
1
Chapter 2
Implementation
2.1 Block Diagram
Figure 2.1: Block diagram
This is the Basic block diagram of the project. It contains LPC2148 microcon-
troller, LCD module, two IR sensors, light and fan. This Block diagram gives the idea
of the connections of varies devices to the microcontroller. The arrow marks in the
diagram indicates the direction of flow of signals. Here IR sensors are acting as input
and LCD, fan and light are acting as output for the microcontroller. Microcontroller
is the central processing unit of the whole system.
2
Bidirectional Visitor counter for efficient electricity usage.
2.2 Components Required for the Project
2.2.1 LPC2148 Microcontroller
LPC2148 microcontroller The LPC2148 microcontrollers are based on a 16-bit/32-bit
ARM7TDMI-S CPU with real-time emulation and embedded trace support, that com-
bine the microcontroller with embedded high-speed flash memory ranging from 32 kB
to 512 kB. A 128-bit wide memory interface and a unique accelerator architecture
enable 32-bit code execution at the maximum clock rate. For critical code size appli-
cations, the alternative 16-bit Thumb mode reduces code by more than 30 percentage
with minimal performance penalty. Due to their tiny size and low power consumption,
LPC2148 microcontroller are ideal for applications where miniaturization is a key re-
quirement, such as access control and point-of-sale. Serial communications interfaces
ranging from a USB 2.0 Full-speed device, multiple UARTs, SPI, SSP to I2C-bus and
on-chip SRAM of 8 kB up to 40 kB, make these devices very well suited for communi-
cation gateways and protocol converters, soft modems, voice recognition and low end
imaging, providing both large buffer size and high processing power. Various 32-bit
timers, single or dual 10-bit ADC(s), 10-bit DAC, PWM channels and 45 fast GPIO
lines with up to nine edge or level sensitive external interrupt pins make these micro-
controllers suitable for industrial control and medical systems.
KEY FEATURES:
• 16-bit/32-bit ARM7TDMI-S microcontroller in a tiny package.
• 40 kB of on-chip static RAM and 512 kB of on-chip flash memory. 128-bit wide
interface/accelerator enables high-speed 60 MHz operation.
• In-System Programming/In-Application Programming (ISP/IAP) via on-chip boot
loader software. Single flash sector or full chip erase in 400 ms and programming
of 256 B in 1 ms.
• Embedded Trace interfaces offer real-time debugging with the on-chip RealMoni-
tor software and high-speed tracing of instruction execution.
• USB 2.0 Full-speed compliant device controller with 2 kB of endpoint RAM.
In addition, the LPC2148 provides 8 kB of on-chip RAM accessible to USB by
DMA.
• Single 10-bit DAC provides variable analog output (LPC2142/44/46/48 only).
• Two 32-bit timers/external event counters (with four capture and four compare
channels each), PWM unit (six outputs) and watchdog.
• Low power Real-Time Clock (RTC) with independent power and 32 kHz clock
input.
LPC2148 GPIO Ports and Registers:
LPC2148 microcontroller consists of 64 pins .The group of these pins is called a port.
It consists of two ports and registers. These ports could be used as input or output
ports therefore the pins of these ports are called general purposes input-output (GPIO)
pins.
ASE, Amritapuri 3
Bidirectional Visitor counter for efficient electricity usage.
• PORT0 is a 32-bit port. Out of these 32 pins, 28 pins can be used as either
general purpose input or output. One of these 32 pins (P0.31) can be configured
as general-purpose output only. Three of these 32 pins (P0.24, P0.26 and P0.27)
are reserved. Hence, they are not available for use. Also, these pins are not listed
in the pin diagram.
• PORT1 is also a 32-bit port. Only 16 of these 32 pins (P1.16 - P1.31) are available
for use as general-purpose input or output.
Figure 2.2: LPC2148 Pin Diagram
Pin Function Select Registers:
Pin Function Select Registers are 32-bit registers used to select or configure specific
pin functionality. There are 3 Pin Function Select Registers in LPC2148:
• PINSEL0 : - Used to configure PORT0 pins P0.0 to P0.15.
ASE, Amritapuri 4
Bidirectional Visitor counter for efficient electricity usage.
• PINSEL1 : - Used to configure PORT0 pins P0.16 to P0.31.
• PINSEL2 : - Used to configure PORT1 pins P1.16 to P1.31.
Slow GPIO Registers:
1. IOxPIN (GPIO Port Pin value register):
This is a 32-bit wide register used to read/write the value on Port (PORT0/PORT1).
But care should be taken while writing. Masking should be used to ensure write
to the desired pin.
2. IOxSET (GPIO Port Output Set register) :
This is a 32-bit wide register. This register is used to make pins of Port (PORT0/PORT1)
HIGH. Writing one to specific bit makes that pin HIGH. Writing zero has no ef-
fect.
3. IOxDIR (GPIO Port Direction control register) :
This is a 32-bit wide register used to individually controls the direction of each
port pin. Setting a bit to ‘1’ configures the corresponding pin as an output pin.
Setting a bit to ‘0’ configures the corresponding pin as an input pin.
4. IOxCLR (GPIO Port Output Clear register) :
This is a 32-bit wide register used to make pins of Port LOW. Writing one to
specific bit makes that pin LOW. Writing zeroes has no effect.
Fast GPIO Registers:
There are 5 fast GPIO registers :
1. FIOxDIR (Fast GPIO Port Direction control register) :
This is a 32-bit wide register used to individually controls the direction of each
port pin. Setting a bit to ‘1’ configures the pin as an output pin. Setting a bit
to ‘0’ configures the pin as an input pin.
2. FIOxMASK (Fast Mask register for port) :
This is a 32-bit wide register used to controls the effect of fast registers (FIOx-
PIN, FIOxSET, FIOxCLR) on port pins. Setting a bit to ‘0’ configures the
corresponding pin to the fast registers i.e. we can write/read the corresponding
pin in fast mode using fast registers. Setting a bit to ‘1’ configures the pin by
fast registers.
3. FIOxPIN (Fast Port Pin value register using FIOMASK) :
This is a 32-bit wide register is used to read/write the value on port pins, only if
that corresponding port pins have access to fast registers.
4. FIOxSET (Fast Port Output Set register using FIOMASK) :
This is a 32-bit wide register is used to make pins of Port HIGH. Writing one
to specific bit makes that pin HIGH. Writing zero has no effect. Reading this
register pin returns the current state of the port register.
5. FIOxCLR (Fast Port Output Clear register using FIOMASK) :
This is a 32-bit wide register is used to make pins of Port LOW. Writing one to
specific bit makes that pin LOW. Writing zeroes has no effect.
ASE, Amritapuri 5
Bidirectional Visitor counter for efficient electricity usage.
ARM7 LPC2148 Microcontroller Architecture:
The ARM7 is a 32-bit general-purpose microprocessor, and it offers features like little
power utilization, and high performance. The architecture of an ARM is depended
on the principles of RISC. The RISC- instructions set are much easy when we com-
pare with microprogrammed CISC-Complex Instruction Set Computers.The Pipeline
method is used for processing all the blocks in architecture. In general, a single instruc-
tion set is being performed, then its descendant is being translated a 3rd-instruction
is being obtained from the memory.
Figure 2.3: Architecture of LPC2148
An exclusive architectural plan of ARM7 is called as Thumb mode, and it is per-
fectly suitable for high volume applications where the compactness of code is a neces-
sary. The ARM7 also uses an exclusive architecture namely Thumb mode. It makes it
ASE, Amritapuri 6
Bidirectional Visitor counter for efficient electricity usage.
perfectly compatible for different applications by memory limitations where the density
of code is priority.
1. Interrupt sources:
Every peripheral device consists of a single interrupt line allied to the VIC (vector
interrupt controller), although it can have various interrupt flags inside. Individ-
ual interrupt flags can also signify one or more interrupt resources.
2. On Chip Static RAM (SRAM):
This on chip static ram is used for storing data or code. This ram could be
accessed as 8 bit,16 bit or 32 bit.
3. On Chip Flash Program Memory:
LPC2148 microcontroller contains 512 kB on chip flash memory. This memory
is used for data storage or code storage. The programming of this flash memory
could be accomplished with several ways.
4. Vectored Interrupt Controller:
All input requests are received by vectored interrupt controller (VIC) and it
converts them into fast interrupt request (FIQ). So, fast interrupt request and non
fast interrupt requests are defined by programming setting in vectored interrupt
controller.
5. Digital to analog Converter:
This LPC2148 microcontroller has one 10 bit digital to analog converter(DAC)
that converts the digital input into analog output. The maximum DAC output
voltages are called VREF voltages. Power down mode and buffered output is
also available in this digital to analog converter.
6. Analog to Digital Converter:
LPC2148 microcontroller also contains two analog to digital converters whose
names are ADC0 and ADC1. There are 14 total number of inputs of ADC are
available and these two converters converts 10 bit analog input to digital output.
The measurement range of each convert is 0V to VREF.
7. UART:
LPC2148 microcontroller contains two UART whose name are UART0 and UART01.
These UARTs are provided the full mode control handshake interface during
transmitting or receiving the data lines. For covering wide range of baud rate
they also support the built in functional baud rate generator, therefore there is
no necessary of any external crystal of specific value.
8. Serial I/O Controller of I2C-bus:
LPC2148 includes two I2C bus controllers, and this is bidirectional. The inter-IC
control can be done with the help of two wires namely an SCL and SDA. Here
the SDA SCL are serial clock line and the serial data line. Every apparatus is
identified by an individual address. Transmitters and receivers can work in two
modes like master mode or slave mode. These microcontrollers support up to-400
kbit/s bit rates.
ASE, Amritapuri 7
Bidirectional Visitor counter for efficient electricity usage.
9. SPI Serial Input/Output Controller:
These microcontrollers contain single SSP, and this controller is capable of pro-
cess on an SPI, Microwire bus or 4-wire SSI. It can communicate with the bus
of several masters as well as slaves. But, simply a particular master, as well as
slave, can converse on the bus throughout a specified data transmit. This mi-
crocontroller supports full-duplex transfers, by 4-16 bits data frames used for the
flow of data from the master- the slave as well as from the slave-the master.
10. Timers:
LPC2148 microcontroller has two timers or counters. These timers are 32 bit
and are programmable with 32 bit prescaler value as well as it also has one
external event counter. Each timer has four 32 bit capture channels which take
the snapshot of timer value during the transition of any input signal.
11. Watch Dog Timer:
This LPC 2148 microcontroller also contains the watch dog timer whose main
purposes is to reset the microcontroller with in specific amount of time during
erroneous state. After this state it again turned on the microcontroller with in
specific amount of time limit.
12. RTC (Real-time Clock):
The RTC is intended for providing counters to calculate the time when the normal
operating method is chosen. The RTC uses a small amount of power and designed
for appropriate battery power arrangements where the CPU is not functioning
constantly.
13. PLL:
LPC2148 microcontroller contains two phase locked loops whose names are PLL0
and PLL1.The input frequency whose range is in between 1 MHz to 25 MHz is
accepted by this PLL. This frequency range could be extended from 10 MHz to
60 MHz by using the current controlled oscillator (CCO)
14. Crystal Oscillator:
This LPC2148 microcontroller contains the on chip integrated oscillator which
operate with an external crystal whose range is in between 1 MHz to 25 MHz.
These frequencies would be same when the PLL is connected and in running
position.
15. Power Control:
These microcontrollers support two condensed power modes such as power-down
mode and idle mode. In Idle mode, instructions execution is balanced until
an interrupt or RST occurs. Idle mode removes the power utilized by the CPU,
controllers, memory systems, and inner buses.In power down mode, the oscillator
is deactivated and the IC gets no inner clocks.This mode can be finished and the
common process restarted by specific interrupts that are capable to work without
clocks.
ASE, Amritapuri 8
Bidirectional Visitor counter for efficient electricity usage.
2.2.2 LCD 16x2 (Liquid Crystal Display)
The term LCD stands for liquid crystal display. It is electronic display module used
in an extensive range of applications like various circuits devices like mobile phones,
calculators, computers, TV sets, etc. These displays are mainly preferred for multi-
segment light-emitting diodes and seven segments. The main advantages of using this
module are inexpensive; simply programmable, animations, and there are no limitations
for displaying custom characters, special and even animations, etc.
Figure 2.4: LCD 16x2 Display pin diagram
Figure 2.5: LCD 16x2 displaying content
Main Features of LCD:
• The operating voltage of this LCD is 4.7V-5.3V.
• It includes two rows where each row can produce 16-characters.
• The utilization of current is 1mA with no backlight.
• Every character can be built with a 5×8 pixel box.
• The alphanumeric LCDs alphabets numbers.
• Is display can work on two modes like 4-bit 8-bit.
ASE, Amritapuri 9
Bidirectional Visitor counter for efficient electricity usage.
• These are obtainable in Blue Green Backlight.
• It displays a few custom generated characters.
LCD Pins Description:
1. Pin1 (Ground/Source Pin):
This is a GND pin of display, used to connect the GND terminal of the micro-
controller unit or power source.
2. Pin2 (VCC/Source Pin):
This is the voltage supply pin of the display, used to connect the supply pin of
the power source.
3. Pin3 (V0/VEE/Control Pin):
This pin regulates the difference of the display, used to connect a changeable
POT that can supply 0 to 5V.
4. Pin4 (Register Select/Control Pin):
This pin toggles among command or data register, used to connect a microcon-
troller unit pin and obtains either 0 or 1(0 = data mode, and 1 = command
mode).
5. Pin5 (Read/Write/Control Pin):
This pin toggles the display among the read or writes operation, and it is con-
nected to a microcontroller unit pin to get either 0 or 1 (0 = Write Operation,
and 1 = Read Operation).
6. Pin 6 (Enable/Control Pin):
This pin should be held high to execute Read/Write process, and it is connected
to the microcontroller unit constantly held high.
7. Pins 7-14 (Data Pins):
These pins are used to send data to the display. These pins are connected in
two-wire modes like 4-wire mode and 8-wire mode. In 4-wire mode, only four
pins are connected to the microcontroller unit like 0 to 3, whereas in 8-wire mode,
8-pins are connected to microcontroller unit like 0 to 7.
8. Pin15 (+ve pin of the LED):
This pin is connected to +5V
9. Pin 16 (-ve pin of the LED):
This pin is connected to GND.
Registers of LCD:
Command Register:
The main function of the command register is to store the instructions of command
which are given to the display. So that predefined tasks can be performed such as clear-
ing the display, initializing, set the cursor place, and display control. Here commands
processing can occur within the register.
ASE, Amritapuri 10
Bidirectional Visitor counter for efficient electricity usage.
Data Register:
The main function of the data register is to store the information which is to be
exhibited on the LCD screen. Here, the ASCII value of the character is the information
which is to be exhibited on the screen of LCD. Whenever we send the information to
LCD, it transmits to the data register, and then the process will be starting there.
When register set =1, then the data register will be selected.
The commands of LCD 16X2:
1. Hex Code-01, the clear LCD screen
2. Hex Code-02, returning home
3. Hex Code-04, decrement cursor
4. Hex Code-06, Increment cursor
5. Hex Code-05, Shift display right
6. Hex Code-07, Shift display left
7. Hex Code-08, Display off, cursor off
8. Hex Code-0A, cursor on and display off
9. Hex Code-0C, cursor off, display on
10. Hex Code-0E, cursor blinking, Display on
11. Hex Code-0F, cursor blinking, Display on
12. Hex Code-10, Shift cursor position to left
13. Hex Code-14, Shift cursor position to the right
14. Hex Code-18, Shift the entire display to the left
15. Hex Code-1C, Shift the entire display to the right
16. Hex Code-80, Force cursor to the beginning ( 1st line)
17. Hex Code-C0, Force cursor to the beginning ( 2nd line)
18. Hex Code-38, 2 lines and 5×7 matrix
ASE, Amritapuri 11
Bidirectional Visitor counter for efficient electricity usage.
2.2.3 IR (Infrared) Sensor:
An infrared sensor is an electronic device, that emits light in order to sense some as-
pects of the surroundings. An IR sensor can measure the heat of an object as well as
detects the motion. These types of sensors measure only infrared radiation, rather than
emitting it that is called a passive IR sensor. Usually, in the infrared spectrum, all the
objects radiate some form of thermal radiation.These types of radiations are invisible
to our eyes, which can be detected by an infrared sensor. The emitter is simply an
IR LED (Light Emitting Diode) and the detector is simply an IR photodiode that is
sensitive to IR light of the same wavelength as that emitted by the IR LED. When IR
light falls on the photodiode, the resistances and the output voltages will change in
proportion to the magnitude of the IR light received.
Figure 2.6: IR sensor
Working principle of IR sensor:
The working principle of an infrared sensor is similar to the object detection sensor.
This sensor includes an IR LED an IR Photodiode, so by combining these two can be
formed as a photo-coupler. IR LED is one kind of transmitter that emits IR radiations.
This LED looks similar to a standard LED and the radiation which is emitted by
this is not visible to the naked eye. Infrared receivers mainly detect the radiation
using an infrared transmitter. These infrared receivers are available in photodiodes
form. IR Photodiodes are dissimilar as compared with usual photodiodes because they
detect simply IR radiation. Different kinds of infrared receivers mainly exist depending
on the package,voltage, wavelength, etc. Once it is used as the combination of an
IR transmitter receiver, then the receiver’s wavelength must equal the transmitter.
Here, the transmitter is IR LED whereas the receiver is IR photodiode. The infrared
photodiode is responsive to the infrared light that is generated through an infrared
LED. The resistance of photo-diode the change in output voltage is in proportion to
the infrared light obtained. This is the IR sensor’s fundamental working principle.
ASE, Amritapuri 12
Bidirectional Visitor counter for efficient electricity usage.
2.2.4 Crystal Oscillator:
A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance
of a vibrating crystal of piezoelectric material to create an electrical signal with a
constant frequency.This frequency is often used to keep track of time, as in quartz
wristwatches, to provide a stable clock signal for digital integrated circuits, and to
stabilize frequencies for radio transmitters and receivers. The most common type of
piezoelectric resonator used is the quartz crystal, so oscillator circuits incorporating
them became known as crystal oscillators.
Figure 2.7: Crystal Oscillator
Figure 2.8: Crystal Oscillator symbol
Principle of Crystal Oscillators:
Crystal oscillators operate on the principle of inverse piezoelectric effect in which an
alternating voltage applied across the crystal surfaces causes it to vibrate at its natural
frequency. It is these vibrations which eventually get converted into oscillations.
ASE, Amritapuri 13
Bidirectional Visitor counter for efficient electricity usage.
2.2.5 Battery:
A battery is a device consisting of one or more electrochemical cells with external con-
nections for powering electrical devices such as flashlights, mobile phones, and electric
cars. When a battery is supplying electric power, its positive terminal is the cathode
and its negative terminal is the anode. The terminal marked negative is the source of
electrons that will flow through an external electric circuit to the positive terminal. In
this project 3.3V battery is used.
Figure 2.9: Battery/cells
Figure 2.10: Battery symbol
ASE, Amritapuri 14
Bidirectional Visitor counter for efficient electricity usage.
2.2.6 Resistor:
Resistors are electronic components which have a specific, never-changing electrical re-
sistance. The resistor’s resistance limits the flow of electrons through a circuit.They are
passive components, meaning they only consume power. Resistors are usually added
to circuits where they complement active components like op-amps, microcontrollers,
and other integrated circuits. Commonly resistors are used to limit current, divide
voltages, and pull-up I/O lines.In this project 10k ohm resistor is used for reset pin.
Figure 2.11: Resistors
Figure 2.12: Resistor symbol
2.2.7 Ceramic Capacitor:
A ceramic capacitor is a fixed-value capacitor where the ceramic material acts as the
dielectric. It is constructed of two or more alternating layers of ceramic and a metal
layer acting as the electrodes. The composition of the ceramic material defines the
electrical behavior and therefore applications.Ceramic capacitors of special shapes and
styles are used as capacitors for RFI/EMI suppression, as feed-through capacitors and
in larger dimensions as power capacitors for transmitters.In this project ,2 capacitor of
22pF is used for the Crystal oscillator.
ASE, Amritapuri 15
Bidirectional Visitor counter for efficient electricity usage.
Figure 2.13: Resistor symbol
Figure 2.14: Ceramic capacitor
2.2.8 Switch:
A switch is an electrical component that can disconnect or connect the conducting
path of an electrical circuit, interrupting the electric current or diverting it from one
conductor to another. The most common type of switch is an electromechanical device
consisting of one or more sets of movable electrical contacts connected to external
circuits. When a pair of contacts is touching, current can pass between them, while
when the contacts are separated no current can flow.In this project we used switch to
reset the microcontroller.
ASE, Amritapuri 16
Bidirectional Visitor counter for efficient electricity usage.
Figure 2.15: Push button switch
Figure 2.16: Switch symbol
2.2.9 Motor:
An electric motor is an electrical machine that converts electrical energy into mechan-
ical energy. Most electric motors operate through the interaction between the motor’s
magnetic field and electric current in a wire winding to generate force in the form of
torque applied on the motor’s shaft. Electric motors can be powered by direct current
(DC) sources, such as from batteries, motor vehicles or rectifiers, or by alternating
current (AC) sources, such as a power grid, inverters or electrical generators. In this
project, we are using motor to replicate the functionality of fans for the demonstration
purpose only.
Figure 2.17: Motor
ASE, Amritapuri 17
Bidirectional Visitor counter for efficient electricity usage.
2.3 Circuit Diagram
Figure 2.18: circuit diagram
The above shown figure is the complete circuit diagram of the bidirectional Visitor
counter project. The circuit design is done in Proteus 8 Professional. Refer next sec-
tion for circuit explanation.
2.4 Circuit Explanation
In this project, we are using LPC2148 microcontroller, two IR sensors, LCD 16x2
display, resistor, capacitors, crystal oscillator,battery and motor for the simulation of
project. Firstly we connect all the necessary connections like battery, reset, and crystal
oscillator connections to the microcontroller. Vsat, Vbat are connected to the positive
terminal of the battery, whereas Vss is connected to the negative terminal of the battery.
Next we connect the reset to the microcontroller. For reset circuit we use a pull-up
resistor and a switch to reset the microcontroller. We connect the one end of the re-
sistor to the positive terminal of the battery and other end to negative terminal of the
battery and reset pin of microcontroller. With this we completed the reset connection.
Next we move to the connection of crystal oscillator connections to the microcontroller.
The crystal oscillator is connected to the Xtal1 and Xtal2 pin of the microcontroller
ASE, Amritapuri 18
Bidirectional Visitor counter for efficient electricity usage.
and pulled down with the ceramic capacitors to the ground. With these connections
we completed the basic power connections of the microcontroller.
Next we are connecting the inputs (IR sensors, fan, light) and outputs (LCD, mo-
tor) to the microcontroller. Firstly, we connect the IR sensors to the microcontroller.
The VCC of the IR sensors is connected to 5v power supply. The GND is connected to
the negative terminal of the battery. The OUT pin of the IR sensor 1 2 is connected to
the Port 0.25 and Port 0.26 of the microcontroller respectively. With this we completed
connection of IR sensor with the microcontroller.
Next we move to the connection of LCD with the microcontroller. Firstly, we give
5v power supply to the Vdd of the LCD. The Vss is connected to the ground of the
battery. RS, RW, Enable(E) pin of LCD is connected to the Port 0.4 , Port 0.5, Port
0.6 pin respectively. We are using 8-bit mode in the LCD, so we connect all the 8 pin
from D0 to D7 to microcontroller Port 0.8 to Port 0.15 respectively. Next we connect
the motor to the microcontroller. The positive terminal of motor is connected to the
Port 1.16 pin of microcontroller. This pin is acting as an output to the microcontroller.
The negative terminal of the motor is connected to the ground. With all these connec-
tion done, we are ready to dump the code and simulate the project.
2.5 Working Principle
The LPC2148 microcontroller is the central processing unit of the whole system. It
coordinates the activities of all the other components like IR sensor, LCD, motors to
achieve the desired result which in the case of this project is to keep track of number
of visitors entering or leaving. The microcontroller scans the input I/O pins to which
the infrared sensors are connected. If there occurs a transition from ’LOW’ to ’HIGH’,
then it is considered as an signal to microcontroller.
The direction of travel of the person should also be determined by microcontroller.
That is, whether the person is entering or exiting the room. For this purpose, we em-
ploy two sensors designated as IR Sensor1 and IR Sensor2. The sensors are arranged
so that one set of infrared transmitter and receiver comes before the other. Sensor1
comes first and then Sensor2 in the direction of moving toward the room. The LCD
also displays “VISITORS COUNT : 0”. That means there is nobody in the room as
at that time. The process then proceeds this way. A visitor entering the room will
first interrupt Sensor1. Now the microcontroller checks to see whether Sensor2 has
already been set. If Sensor2 has already been set, the number of persons in the room
is increased by 1 and the new count value is updated on the LCD. If somebody leaves
the room, first the Sensor2 is first interrupted, and keeps a check on the Sensor1. If
Sensor1 is also interrupted then the visitor count is decremented by 1 and the new
count is updated on the LCD. This is the cyclic process and the microcontroller keeps
scanning the IR sensors output. The Embedded C programming language is used to
create instructions for the bidirectional visitor counter to run through a C compiler on
a compute. The instruction set code is converted into machine language (Hex file) for
it to be understandable to the microcontroller.
ASE, Amritapuri 19
Bidirectional Visitor counter for efficient electricity usage.
The full working of the Bidirectional Visitor counter system is given in the flow
chart diagram. A flow chart is a type of diagram that represents a process, showing
the steps as boxes of various kinds, and their order by connecting these with arrows.
This diagrammatic representation can give a step-by-step solution to a given problem.
Process operations are represented in these boxes, and arrows connecting them rep-
resent flow of control. Flowcharts are used in documenting, analyzing, designing or
managing a process or program in various fields. We are convinced, from the above
results, that the bidirectional visitor counter is highly efficient and economical. Its pro-
gram can also be modified to take additional input depending on the function desired
by the designer. There is no need for human auditor services.
Figure 2.19: Working flow diagram
ASE, Amritapuri 20
Chapter 3
Software requirement
3.1 Keil uvision 4
Keil MicroVision is a free software which solves many of the pain points for an em-
bedded program developer. This software is an integrated development environment
(IDE), which integrated a text editor to write programs, a compiler and it will convert
your source code to hex files too.
Keil provides a broad range of development tools like ANSI C compiler, macro
assemblers, debuggers and simulators, linkers, IDE, library managers, real-time op-
erating systems and evaluation boards for Intel 8051, Intel MCS-251, ARM, and
XC16x/C16x/ST10 families.
3.2 Proteus 8 Professional
The Proteus Design Suite is a proprietary software tool suite used primarily for elec-
tronic design automation. The software is used mainly by electronic design engineers
and technicians to create schematics and electronic prints for manufacturing printed
circuit boards.
The micro-controller simulation in Proteus works by applying either a hex file or a
debug file to the microcontroller part on the schematic. It is then co-simulated along
with any analog and digital electronics connected to it. This enables its use in a broad
spectrum of project prototyping in areas such as motor control, temperature control
and user interface design. It also finds use in the general hobbyist community and,
since no hardware is required, is convenient to use as a training or teaching tool.
21
Chapter 4
Inference
4.1 Application of Project
1. Used to count the number of visitors entering or leaving a room, auditorium,
shopping mall, offices, schools, exhibitions and etc.
2. Can be used to control electrical appliances like light, fan, Air conditioner, and
etc.
3. To limit the number of visitors in the room.
4. Can be used for home automation.
4.2 Advantages and Disadvantages
4.2.1 Advantages:
1. Cost efficient device. Can be manufactured at low cost.
2. Low maintenance.Easy to use. Once install, works for longer period of time.
3. Can be implemented on single door.
4. Used to control electrical appliances for power management.
4.2.2 Disadvantages:
1. Works only when single person enters or leaves the room. The device can not
count when the visitors are in crowd.
2. This device works on the principle of IR rays, so device might misbehave when
there is too much brightness in the surroundings.
22
Bidirectional Visitor counter for efficient electricity usage.
4.3 Results and Discussion
This project works as per the requirements, without any faults. The block diagram
and circuit diagram are important part of the project as these diagrams gives the com-
plete information about the project connections. The LCD unit displays the count of
visitors, which is very important information and can be used to track the visitors.
There are various kinds of displays available in the market. One can buy any display
as per the budget. Here, in the project we used motor to demonstrate the working of
fan in real time, but we can use light, Air conditioner and many electrical appliances
in real time.
4.4 Conclusion
In our project, we designed and implemented a Bidirectional Visitor Counter which
counts and displays the number of visitor in the auditorium, halls, rooms, shopping
malls and also automatically control the electrical appliances in the room. There are
many inputs and outputs to the microcontroller which were implemented with clear
understanding of the subject. We referred and discussed many researches for the better
output of the project. Our project is very useful in Schools, hospitals, malls, offices,
auditoriums etc. The overall implementation cost of this project is very cheap and is
affordable by a common person. This low cost system is designed to improve the living
standard of common people. By implementing this project ,we acquired understandable
knowledge about this subject and are familiar with softwares like proteus and keil .This
project, gave us a hands on work with a clear idea on how to use theoretical knowledge
in practical.
4.5 Future works
This project have many future applications which can improve the efficiency and pro-
ductivity in work. We can use a buzzer as an alarm for the indication of any visitor and
further we can also limit the number of visitors in a room by displaying messages on
LCD. The world is moving towards the connecting of everything namely IoT (Internet
Of Things). So, we can add an IoT gateway to the device so that we have the data
of number of visitors in a particular location. We can also monitor the data and take
action depending on the requirement. We can also use this device along with IoT for
home automation.
ASE, Amritapuri 23
Bidirectional Visitor counter for efficient electricity usage.
4.6 References
1. Subiakto, E.C. (2009) Digital Tally Counter Finger Ring. Retrieved from
http://www.google.com/patents/WO2009144689A1?cl=en .
2. Microprocessors, Microcontrollers, Architecture and Programming Concepts. (n.
d.). Retrieved from
http://www.slideshare.net/ashmus/microproccesor-and-microcontrollers- hardware-
basics.
3. A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3.
https://www2.slideshare.net/Abhishekvb/a-report-on-bidirectional-visitor-counter-
using-ir-sensors-and-arduino-uno-r3
4. LCD interfacing with LPC2148.
https://www.instructables.com/LPC2148-Interfacing-With-162-LCD/
5. LPC2148 GPIO Programming Tutorial.
http://www.ocfreaks.com/lpc2148-gpio-programming-tutorial/
6. Infrared Sensor Library for Proteus.
https://www.theengineeringprojects.com/2018/07/infrared-sensor-library-for-proteus.html
7. How to add new Library in Proteus 8.
https://www.theengineeringprojects.com/2018/04/how-to-add-new-library-in-proteus-
8.html
8. LPC2148 GPIO Ports and Registers.
https://www.electronicwings.com/arm7/lpc2148-32-bit-arm7tdmi-s-processor-gpio-
ports-and-registers
9. LPC2148 – GPIO Tutorial.
https://embetronicx.com/tutorials/microcontrollers/lpc2148/lpc2148-gpio-tutorial-
led-interfacing/
ASE, Amritapuri 24
Bidirectional Visitor counter for efficient electricity usage.
4.7 Literature reviews
Before we initiate the project, we discussed and reviewed many researches prior to take
up the project. A clear analysis of literature was conducted for the best results of the
project. This helped us to identify the benefits and drawbacks of the projects.
1. A Report on Bidirectional Visitor Counter using IR sensors and Ar-
duino Uno R3
This paper presented the necessity of bidirectional visitor counter and the results
after using the device. It highlighted the circuit design with all the required com-
ponents. The explanation of working of circuit was lucid. This report gave us an
insights of the project and helped us to crack the problems that arise during the
project.
2. LPC2148 GPIO Programming
This paper has provided a understandable knowledge of programming LPC2148
microcontroller. It includes all the GPIO register and Port which are very useful
during programming. The explanation of concepts is lucid. We were able to write
codes ourselves after referring the page.
3. LCD interfacing with LPC2148
The interfacing of LCD is explained in this paper. It describes the 4-bit and
8-bit modes of LCD. It highlights the data mode and command mode which are
important during display of character on the screen. We were able to use LCD
are referring the paper.
ASE, Amritapuri 25
Bidirectional Visitor counter for efficient electricity usage.
4.8 Appendix
Code for the Project:
#include <lpc214x . h>
#include <stdint . h>
#include <s t d l i b . h>
#include <stdio . h>
void delay ( unsigned int time ){
unsigned int i , j ;
for ( i =0; i<=time ; i++){
for ( j =0; j <10; j ++);
}
}
void delay ms ( uint16 t j ) /∗ Function for delay in milliseconds
∗/
{
uint16 t x , i ;
for ( i =0; i<j ; i++)
{
for (x=0; x<1000; x++);
}
}
void LCD CMD( char command)
{
IO0PIN = ( (IO0PIN & 0xFFFF00FF) | (command<<8) ) ;
IO0SET = 0x00000040 ; /∗ EN = 1 ∗/
IO0CLR = 0x00000030 ; /∗ RS = 0 , RW = 0 ∗/
delay ms ( 2 ) ;
IO0CLR = 0x00000040 ;
delay ms ( 5 ) ;
}
void LCD INIT( void )
{
IO0DIR = 0x0000FFF0 ;
delay ms ( 2 0 ) ;
LCD CMD(0 x38 ) ; /∗ I n i t i a l i z e lcd ∗/
LCD CMD(0x0C ) ; /∗ Display on cursor o f f ∗/
LCD CMD(0 x06 ) ; /∗ Auto increment cursor ∗/
LCD CMD(0 x01 ) ; /∗ Display c l e a r ∗/
LCD CMD(0 x80 ) ; /∗ First l i n e f i r s t position ∗/
}
void LCD STRING ( char∗ msg)
{
ASE, Amritapuri 26
Bidirectional Visitor counter for efficient electricity usage.
uint8 t i =0;
while (msg [ i ]!=0)
{
IO0PIN = ( (IO0PIN & 0xFFFF00FF) | (msg [ i ]<<8) ) ;
IO0SET = 0x00000050 ; /∗ RS = 1 , , EN = 1 ∗/
IO0CLR = 0x00000020 ; /∗ RW = 0 ∗/
delay ms ( 2 ) ;
IO0CLR = 0x00000040 ; /∗ EN = 0 , RS and RW unchanged
delay ms ( 5 ) ;
i++;
}
}
void LCD CHAR ( char msg)
{
IO0PIN = ( (IO0PIN & 0xFFFF00FF) | (msg<<8) ) ;
IO0SET = 0x00000050 ; /∗ RS = 1 , , EN = 1 ∗/
IO0CLR = 0x00000020 ; /∗ RW = 0 ∗/
delay ms ( 2 ) ;
IO0CLR = 0x00000040 ;
delay ms ( 5 ) ;
}
int main( void )
{
IO0DIR &= ˜((1<<25)) ;
IO0DIR &= ˜((1<<26)) ;
IO1DIR |= (1<<16);
uint8 t j ;
j = 0;
char v a l j [ 3 ] ;
LCD INIT ( ) ;
LCD CMD(0 x80 ) ;
LCD STRING(” Visitor Counter : ” ) ;
LCD CMD(0xC0 ) ;
while (1){
i f (IOPIN0 & (1<<25))
{
while (˜( IOPIN0 & (1<<26)))
j = j +1;
}
i f (IOPIN0 & (1<<26))
{
while (˜( IOPIN0 & (1 < <25)));
ASE, Amritapuri 27
Bidirectional Visitor counter for efficient electricity usage.
j = j −1;
}
i f ( j >= 1)
{
IOSET1 |= (1<<16);
}
e l s e
{
IOCLR1 |= (1<<16);
j = 0;
}
s p r i n t f ( val j ,”%d ” , j ) ;
LCD STRING( v a l j ) ;
delay ms (200);
LCD CMD(0xC0 ) ;
}
return 0;
}
4.9 Terminology
• ARM - Advanced RISC Machine and originally Acorn RISC Machine
• LCD - Liquid Crystal Display
• IR - Infrare
• IoT - Internet of Things
• CPU - Central Processing Unit
• UART - Universal asynchronous receiver/transmitter
• USB - Universal Serial Bus
• SRAM - Static random access memory
• GPIO - General Purpose Input/Output
• RAM - Random access memory
• RTC - Real time Clock
• RISC - Reduced instruction set computing
• CISC - Complex instruction set computing
• LED - Light Emitting Diode
• I/O - Input Output
ASE, Amritapuri 28
Bidirectional Visitor counter for efficient electricity usage.
• DC - Direct current
• AC - Alternating current
• VCC - Voltage Common Collector
• IDE - Integrated Development Environment
ASE, Amritapuri 29

More Related Content

What's hot

vlsi projects using verilog code 2014-2015
vlsi projects using verilog code 2014-2015vlsi projects using verilog code 2014-2015
vlsi projects using verilog code 2014-2015
E2MATRIX
 
“POWER FACTOR IMPROVEMENT BY SIMULATION AND IMPLEMENTATION OF FC-TCR”
“POWER FACTOR IMPROVEMENT BY SIMULATION AND IMPLEMENTATION OF FC-TCR”“POWER FACTOR IMPROVEMENT BY SIMULATION AND IMPLEMENTATION OF FC-TCR”
“POWER FACTOR IMPROVEMENT BY SIMULATION AND IMPLEMENTATION OF FC-TCR”
Dr. Babasaheb Ambedkar Technological University
 
Thyristor family
Thyristor familyThyristor family
Thyristor family
Vinod Srivastava
 
PROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdf
PROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdfPROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdf
PROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdf
Romeo INKOOM
 
GSM BASED DEVICES CONTROL SYSTEM PROJECT REPORT
GSM BASED DEVICES CONTROL SYSTEM PROJECT REPORTGSM BASED DEVICES CONTROL SYSTEM PROJECT REPORT
GSM BASED DEVICES CONTROL SYSTEM PROJECT REPORT
Avinash Kannojia
 
Plc and scada report
Plc and scada reportPlc and scada report
Plc and scada report
Indira Kundu
 
"Black Box for a Car" report
"Black Box for a Car" report"Black Box for a Car" report
"Black Box for a Car" report
subrat manna
 
Microcontroller based transformer protectio
Microcontroller based transformer protectioMicrocontroller based transformer protectio
Microcontroller based transformer protectio
Aminu Bugaje
 
Bidirectional Visitor counter Project Proposal
Bidirectional Visitor counter Project ProposalBidirectional Visitor counter Project Proposal
Bidirectional Visitor counter Project Proposal
Arsalan Ahmad
 
Report on remote control home appliances.
Report on remote control home appliances.Report on remote control home appliances.
Report on remote control home appliances.
Sonal Bansal
 
IRJET- Design and Development of Underground Cable Fault Detection and Locali...
IRJET- Design and Development of Underground Cable Fault Detection and Locali...IRJET- Design and Development of Underground Cable Fault Detection and Locali...
IRJET- Design and Development of Underground Cable Fault Detection and Locali...
IRJET Journal
 
Major Project Synopsis Report on IoT based DC Motor Through a Web-site
Major Project Synopsis Report on IoT based DC Motor Through a Web-siteMajor Project Synopsis Report on IoT based DC Motor Through a Web-site
Major Project Synopsis Report on IoT based DC Motor Through a Web-site
Utkarsh Chaubey
 
Home Security System using Arduino & GSM
Home Security System using Arduino & GSM Home Security System using Arduino & GSM
Home Security System using Arduino & GSM
Aditya Nag
 
Home Appliances Controlling using Android Mobile via Bluetooth
Home Appliances Controlling using Android Mobile via BluetoothHome Appliances Controlling using Android Mobile via Bluetooth
Home Appliances Controlling using Android Mobile via Bluetooth
MOKTARI MOSTOFA
 
Transformer protection using microcontroller and gsm technology
Transformer protection using microcontroller and gsm technologyTransformer protection using microcontroller and gsm technology
Transformer protection using microcontroller and gsm technology
Kartik Patel
 
Electrical Engineering Final Presentation
Electrical Engineering Final Presentation Electrical Engineering Final Presentation
Electrical Engineering Final Presentation
Sethmi Kachchakaduge
 
Alcohol Sensing Alert with Engine Locking Project
Alcohol Sensing Alert with Engine Locking ProjectAlcohol Sensing Alert with Engine Locking Project
Alcohol Sensing Alert with Engine Locking Project
DINKAR MALI
 
Automatic control of street light using LDR
Automatic control of street light using LDRAutomatic control of street light using LDR
Automatic control of street light using LDR
Devang Loharikar
 
Architecture Of TMS320C50 DSP Processor
Architecture Of TMS320C50 DSP ProcessorArchitecture Of TMS320C50 DSP Processor
Architecture Of TMS320C50 DSP Processor
Janelle Martinez
 
Visitor counter
Visitor counterVisitor counter
Visitor counter
ASHISH KUMAR
 

What's hot (20)

vlsi projects using verilog code 2014-2015
vlsi projects using verilog code 2014-2015vlsi projects using verilog code 2014-2015
vlsi projects using verilog code 2014-2015
 
“POWER FACTOR IMPROVEMENT BY SIMULATION AND IMPLEMENTATION OF FC-TCR”
“POWER FACTOR IMPROVEMENT BY SIMULATION AND IMPLEMENTATION OF FC-TCR”“POWER FACTOR IMPROVEMENT BY SIMULATION AND IMPLEMENTATION OF FC-TCR”
“POWER FACTOR IMPROVEMENT BY SIMULATION AND IMPLEMENTATION OF FC-TCR”
 
Thyristor family
Thyristor familyThyristor family
Thyristor family
 
PROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdf
PROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdfPROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdf
PROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdf
 
GSM BASED DEVICES CONTROL SYSTEM PROJECT REPORT
GSM BASED DEVICES CONTROL SYSTEM PROJECT REPORTGSM BASED DEVICES CONTROL SYSTEM PROJECT REPORT
GSM BASED DEVICES CONTROL SYSTEM PROJECT REPORT
 
Plc and scada report
Plc and scada reportPlc and scada report
Plc and scada report
 
"Black Box for a Car" report
"Black Box for a Car" report"Black Box for a Car" report
"Black Box for a Car" report
 
Microcontroller based transformer protectio
Microcontroller based transformer protectioMicrocontroller based transformer protectio
Microcontroller based transformer protectio
 
Bidirectional Visitor counter Project Proposal
Bidirectional Visitor counter Project ProposalBidirectional Visitor counter Project Proposal
Bidirectional Visitor counter Project Proposal
 
Report on remote control home appliances.
Report on remote control home appliances.Report on remote control home appliances.
Report on remote control home appliances.
 
IRJET- Design and Development of Underground Cable Fault Detection and Locali...
IRJET- Design and Development of Underground Cable Fault Detection and Locali...IRJET- Design and Development of Underground Cable Fault Detection and Locali...
IRJET- Design and Development of Underground Cable Fault Detection and Locali...
 
Major Project Synopsis Report on IoT based DC Motor Through a Web-site
Major Project Synopsis Report on IoT based DC Motor Through a Web-siteMajor Project Synopsis Report on IoT based DC Motor Through a Web-site
Major Project Synopsis Report on IoT based DC Motor Through a Web-site
 
Home Security System using Arduino & GSM
Home Security System using Arduino & GSM Home Security System using Arduino & GSM
Home Security System using Arduino & GSM
 
Home Appliances Controlling using Android Mobile via Bluetooth
Home Appliances Controlling using Android Mobile via BluetoothHome Appliances Controlling using Android Mobile via Bluetooth
Home Appliances Controlling using Android Mobile via Bluetooth
 
Transformer protection using microcontroller and gsm technology
Transformer protection using microcontroller and gsm technologyTransformer protection using microcontroller and gsm technology
Transformer protection using microcontroller and gsm technology
 
Electrical Engineering Final Presentation
Electrical Engineering Final Presentation Electrical Engineering Final Presentation
Electrical Engineering Final Presentation
 
Alcohol Sensing Alert with Engine Locking Project
Alcohol Sensing Alert with Engine Locking ProjectAlcohol Sensing Alert with Engine Locking Project
Alcohol Sensing Alert with Engine Locking Project
 
Automatic control of street light using LDR
Automatic control of street light using LDRAutomatic control of street light using LDR
Automatic control of street light using LDR
 
Architecture Of TMS320C50 DSP Processor
Architecture Of TMS320C50 DSP ProcessorArchitecture Of TMS320C50 DSP Processor
Architecture Of TMS320C50 DSP Processor
 
Visitor counter
Visitor counterVisitor counter
Visitor counter
 

Similar to Bidirectional Visitor Counter for efficient electricity usage.

Project Report Distance measurement system
Project Report Distance measurement systemProject Report Distance measurement system
Project Report Distance measurement system
kurkute1994
 
Final Report
Final ReportFinal Report
Final Report
Susmit Sircar
 
Uni v e r si t ei t
Uni v e r si t ei tUni v e r si t ei t
Uni v e r si t ei t
Anandhu Sp
 
VENDING_MACHINE_2023-2024
VENDING_MACHINE_2023-2024VENDING_MACHINE_2023-2024
VENDING_MACHINE_2023-2024
College of engineering roorkee
 
Spi research paper
Spi research paperSpi research paper
Spi research paper
QuyenVu47
 
Smart Street System
Smart Street SystemSmart Street System
Smart Street System
Libin Thomas
 
REPORT IBM (1)
REPORT IBM (1)REPORT IBM (1)
REPORT IBM (1)
Hamza Khan
 
2D ROBOTIC PLOTTER
2D ROBOTIC PLOTTER2D ROBOTIC PLOTTER
2D ROBOTIC PLOTTER
ANANDKRISHNANVSSS
 
Affordable EMCS for GeenHouses
Affordable EMCS for GeenHousesAffordable EMCS for GeenHouses
Affordable EMCS for GeenHouses
Dumidu Nadeera
 
Tilak's Report
Tilak's ReportTilak's Report
Tilak's Report
Tilak Maharana
 
PLC & SCADA
PLC & SCADA PLC & SCADA
PLC & SCADA
Ritesh Kumawat
 
Jdsu mts 2000_manual
Jdsu mts 2000_manualJdsu mts 2000_manual
Jdsu mts 2000_manual
WELLINGTON MARTINS
 
Acb abb
Acb abbAcb abb
Acb abb
Amit Kumar
 
report
reportreport
Maxime Javaux - Automated spike analysis
Maxime Javaux - Automated spike analysisMaxime Javaux - Automated spike analysis
Maxime Javaux - Automated spike analysis
Maxime Javaux
 
Bx310x Product Specification
Bx310x Product SpecificationBx310x Product Specification
Bx310x Product Specification
Frederic Petit
 
Plc report with project
Plc report with projectPlc report with project
Plc report with project
Priya Hada
 
USB OTG
USB OTGUSB OTG
USB OTG
daviessegera
 
Aviation Control Unit
Aviation Control UnitAviation Control Unit
Aviation Control Unit
Samarth Annappa Swamy
 
Spool head finalreport
Spool head finalreportSpool head finalreport
Spool head finalreport
Print3D
 

Similar to Bidirectional Visitor Counter for efficient electricity usage. (20)

Project Report Distance measurement system
Project Report Distance measurement systemProject Report Distance measurement system
Project Report Distance measurement system
 
Final Report
Final ReportFinal Report
Final Report
 
Uni v e r si t ei t
Uni v e r si t ei tUni v e r si t ei t
Uni v e r si t ei t
 
VENDING_MACHINE_2023-2024
VENDING_MACHINE_2023-2024VENDING_MACHINE_2023-2024
VENDING_MACHINE_2023-2024
 
Spi research paper
Spi research paperSpi research paper
Spi research paper
 
Smart Street System
Smart Street SystemSmart Street System
Smart Street System
 
REPORT IBM (1)
REPORT IBM (1)REPORT IBM (1)
REPORT IBM (1)
 
2D ROBOTIC PLOTTER
2D ROBOTIC PLOTTER2D ROBOTIC PLOTTER
2D ROBOTIC PLOTTER
 
Affordable EMCS for GeenHouses
Affordable EMCS for GeenHousesAffordable EMCS for GeenHouses
Affordable EMCS for GeenHouses
 
Tilak's Report
Tilak's ReportTilak's Report
Tilak's Report
 
PLC & SCADA
PLC & SCADA PLC & SCADA
PLC & SCADA
 
Jdsu mts 2000_manual
Jdsu mts 2000_manualJdsu mts 2000_manual
Jdsu mts 2000_manual
 
Acb abb
Acb abbAcb abb
Acb abb
 
report
reportreport
report
 
Maxime Javaux - Automated spike analysis
Maxime Javaux - Automated spike analysisMaxime Javaux - Automated spike analysis
Maxime Javaux - Automated spike analysis
 
Bx310x Product Specification
Bx310x Product SpecificationBx310x Product Specification
Bx310x Product Specification
 
Plc report with project
Plc report with projectPlc report with project
Plc report with project
 
USB OTG
USB OTGUSB OTG
USB OTG
 
Aviation Control Unit
Aviation Control UnitAviation Control Unit
Aviation Control Unit
 
Spool head finalreport
Spool head finalreportSpool head finalreport
Spool head finalreport
 

Recently uploaded

KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
Ratnakar Mikkili
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
Madhumitha Jayaram
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
nooriasukmaningtyas
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
PuktoonEngr
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 

Recently uploaded (20)

KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 

Bidirectional Visitor Counter for efficient electricity usage.

  • 1. Amrita Vishwa Vidyapeetham Amrita School of Engineering, Amritapuri Vallikavu, Clappana P.O, Kerala. ACCREDITED BY NAAC WITH “A” GRADE DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING A REPORT ON ”Bidirectional Visitor counter for efficient electricity usage.” SUBMITTED BY Mr. Thupalli Nanda Vardhan (AM.EN.U4ECE18053) Mr. Neeraj Malisetty (AM.EN.U4ECE18036) Miss. Nirupama Suresh (AM.EN.U4ECE18037) Mr. Lokesh Karanam (AM.EN.U4ECE18026) UNDER THE GUIDANCE OF Assistant PROF. Senthil Murugan Assistant PROF. chinmayir (Academic Year: 2020-2021)
  • 2. Amrita Vishwa Vidyapeetham Amrita School of Engineering, Amritapuri Vallikavu, Clappana P.O, Kerala. DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING Certificate This is to certify that project entitled ”Bidirectional Visitor counter for efficient electricity usage.” has been completed by Mr. Thupalli Nanda Vardhan (AM.EN.U4ECE18053) Mr. Neeraj Malisetty (AM.EN.U4ECE18036) Miss. Nirupama Suresh (AM.EN.U4ECE18037) Mr. Lokesh Karanam (AM.EN.U4ECE18026) of third year of Bachelor degree in the Semester - I of academic year 2020-2021 in partial fulfillment of the award of Third Year of Bachelor degree in ”Electronics and Communication Engineering” as prescribed by the Amrita Vishwa Vidyapeetham. It has been found to be satisfactory and hereby approved for the submission. Assistant PROF. Senthil Murugan Project Guide Dr. Ravisankar .M H.O.D
  • 3. Bidirectional Visitor counter for efficient electricity usage. ACKNOWLEDGEMENT It gives me great pleasure and satisfaction in presenting this mini project on “Bidi- rectional Visitor counter for efficient electricity usage.”. I would like to express my deep sense of gratitude towards Assistant PROF. Senthil Murugan and Assistant PROF. chinmayir for giving an oppurtunity to present the mini project. Their support and encouragement was always with us. I have furthermore to thank Electronics and Communication Department HOD Dr. Ravisankar .M and Assistant PROF. Senthil Murugan to encourage me to go ahead and for continuous guidance. I also want to thank Assistant PROF. chin- mayir for all her assistance and guidance for preparing report. I would like to thank all those, who have directly or indirectly helped me for the completion of the work during this mini project. Mr. Thupalli Nanda Vardhan (AM.EN.U4ECE18053) Mr. Neeraj Malisetty (AM.EN.U4ECE18036) Miss. Nirupama Suresh (AM.EN.U4ECE18037) Mr. Lokesh Karanam (AM.EN.U4ECE18026) Electronics and Communication Engineering, S5 Dept. of Electronics and Communication Engineeringi
  • 4. Contents 1 Commencement of Project 1 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 Implementation 2 2.1 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 Components Required for the Project . . . . . . . . . . . . . . . . . . . 3 2.2.1 LPC2148 Microcontroller . . . . . . . . . . . . . . . . . . . . . . 3 2.2.2 LCD 16x2 (Liquid Crystal Display) . . . . . . . . . . . . . . . . 9 2.2.3 IR (Infrared) Sensor: . . . . . . . . . . . . . . . . . . . . . . . . 12 2.2.4 Crystal Oscillator: . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2.5 Battery: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2.6 Resistor: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.2.7 Ceramic Capacitor: . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.2.8 Switch: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.9 Motor: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.3 Circuit Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.4 Circuit Explanation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.5 Working Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3 Software requirement 21 3.1 Keil uvision 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2 Proteus 8 Professional . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4 Inference 22 4.1 Application of Project . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.2 Advantages and Disadvantages . . . . . . . . . . . . . . . . . . . . . . . 22 4.2.1 Advantages: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.2.2 Disadvantages: . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.3 Results and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.5 Future works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.7 Literature reviews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.8 Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.9 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ii
  • 5. List of Figures 2.1 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 LPC2148 Pin Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 Architecture of LPC2148 . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4 LCD 16x2 Display pin diagram . . . . . . . . . . . . . . . . . . . . . . 9 2.5 LCD 16x2 displaying content . . . . . . . . . . . . . . . . . . . . . . . . 9 2.6 IR sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.7 Crystal Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.8 Crystal Oscillator symbol . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.9 Battery/cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.10 Battery symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.11 Resistors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.12 Resistor symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.13 Resistor symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.14 Ceramic capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.15 Push button switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.16 Switch symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.17 Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.18 circuit diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.19 Working flow diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 iii
  • 6. Abstract This project aims at controlling the electrical appliances depending on the number of visitors present inside the room, auditorium, stadium, shopping malls, schools and etc. The counting of visitors is done by using IR(infrared) sensor. In this project, we used ARM7 LPC2148 microcontroller and two IR sensors as inputs to predict the entry and exit of the visitor. Depending on the number of people inside room, the microcontroller switch on or switch off the electrical appliances. We also used a LCD 16x2 display, to display the count on the LCD. The programming is written in Embedded C using Keil. Simulation of the project is done in Proteus 8 Professional. This device is placed at the entrance of the room, to count the number of visits entering and leaving. It uses the principle of Light- emitting diode that produces light in the infrared region of electromagnetic spectrum, where the IR sensor actually detects the IR light and sends a HIGH signal input to microcontroller indicating object detection. This project can be further enhanced by using Industrial IR sensor for accuracy and adding cloud gateway for IoT applications.
  • 7. Chapter 1 Commencement of Project 1.1 Introduction In today’s world, there is a continuous need for automatic controlling of appliances. With the increase in standard of living, there is a necessity for designing circuits that would ease the complexity of life. Many times we need to monitor the people vis- iting the auditorium, stadiums, shopping malls, schools, offices, and etc and display them on the LCD screen. On numerous occasions, the main issue is few people get trapped inside the auditoriums, shopping malls and many other places where crowd is often.Counting number of visitors is very helpful to track the visitors as well as avoid any kind of mishap to visitors. Moreover it can also be used to count the number of people who have come for the event, auditorium, or banquet halls. Also, we human beings often forget to switch off the electrical appliances like Air- conditioners, fans, lights inside the room. The wastage of electricity is huge, when the room is empty but the electrical appliances are still switched on. As electricity is one of the daily needs and without it we can not use our smartphones, laptops, TVs, lights, fans, washing machines, refrigerators and many more electrical appliances. As a responsible citizen, it is our responsible to conserve electricity for future generations. Considering all these perspectives, our team had decided to develop, design and implement an device that can automate the counting of bidirectional visitors( that can count both entering and exiting visitors) and display it on the LCD screen so that we will have the information of total as well as present visitors inside the room, auditorium, hall, shopping malls and etc which can be used to monitor the visitors and give alerts to them. The device can also turn off the electrical appliances when no visitor is present inside the room, therefore saving electricity. We implemented this cir- cuit design in Proteus 8 Professional and code is written in Embedded C in Keil uvision. 1
  • 8. Chapter 2 Implementation 2.1 Block Diagram Figure 2.1: Block diagram This is the Basic block diagram of the project. It contains LPC2148 microcon- troller, LCD module, two IR sensors, light and fan. This Block diagram gives the idea of the connections of varies devices to the microcontroller. The arrow marks in the diagram indicates the direction of flow of signals. Here IR sensors are acting as input and LCD, fan and light are acting as output for the microcontroller. Microcontroller is the central processing unit of the whole system. 2
  • 9. Bidirectional Visitor counter for efficient electricity usage. 2.2 Components Required for the Project 2.2.1 LPC2148 Microcontroller LPC2148 microcontroller The LPC2148 microcontrollers are based on a 16-bit/32-bit ARM7TDMI-S CPU with real-time emulation and embedded trace support, that com- bine the microcontroller with embedded high-speed flash memory ranging from 32 kB to 512 kB. A 128-bit wide memory interface and a unique accelerator architecture enable 32-bit code execution at the maximum clock rate. For critical code size appli- cations, the alternative 16-bit Thumb mode reduces code by more than 30 percentage with minimal performance penalty. Due to their tiny size and low power consumption, LPC2148 microcontroller are ideal for applications where miniaturization is a key re- quirement, such as access control and point-of-sale. Serial communications interfaces ranging from a USB 2.0 Full-speed device, multiple UARTs, SPI, SSP to I2C-bus and on-chip SRAM of 8 kB up to 40 kB, make these devices very well suited for communi- cation gateways and protocol converters, soft modems, voice recognition and low end imaging, providing both large buffer size and high processing power. Various 32-bit timers, single or dual 10-bit ADC(s), 10-bit DAC, PWM channels and 45 fast GPIO lines with up to nine edge or level sensitive external interrupt pins make these micro- controllers suitable for industrial control and medical systems. KEY FEATURES: • 16-bit/32-bit ARM7TDMI-S microcontroller in a tiny package. • 40 kB of on-chip static RAM and 512 kB of on-chip flash memory. 128-bit wide interface/accelerator enables high-speed 60 MHz operation. • In-System Programming/In-Application Programming (ISP/IAP) via on-chip boot loader software. Single flash sector or full chip erase in 400 ms and programming of 256 B in 1 ms. • Embedded Trace interfaces offer real-time debugging with the on-chip RealMoni- tor software and high-speed tracing of instruction execution. • USB 2.0 Full-speed compliant device controller with 2 kB of endpoint RAM. In addition, the LPC2148 provides 8 kB of on-chip RAM accessible to USB by DMA. • Single 10-bit DAC provides variable analog output (LPC2142/44/46/48 only). • Two 32-bit timers/external event counters (with four capture and four compare channels each), PWM unit (six outputs) and watchdog. • Low power Real-Time Clock (RTC) with independent power and 32 kHz clock input. LPC2148 GPIO Ports and Registers: LPC2148 microcontroller consists of 64 pins .The group of these pins is called a port. It consists of two ports and registers. These ports could be used as input or output ports therefore the pins of these ports are called general purposes input-output (GPIO) pins. ASE, Amritapuri 3
  • 10. Bidirectional Visitor counter for efficient electricity usage. • PORT0 is a 32-bit port. Out of these 32 pins, 28 pins can be used as either general purpose input or output. One of these 32 pins (P0.31) can be configured as general-purpose output only. Three of these 32 pins (P0.24, P0.26 and P0.27) are reserved. Hence, they are not available for use. Also, these pins are not listed in the pin diagram. • PORT1 is also a 32-bit port. Only 16 of these 32 pins (P1.16 - P1.31) are available for use as general-purpose input or output. Figure 2.2: LPC2148 Pin Diagram Pin Function Select Registers: Pin Function Select Registers are 32-bit registers used to select or configure specific pin functionality. There are 3 Pin Function Select Registers in LPC2148: • PINSEL0 : - Used to configure PORT0 pins P0.0 to P0.15. ASE, Amritapuri 4
  • 11. Bidirectional Visitor counter for efficient electricity usage. • PINSEL1 : - Used to configure PORT0 pins P0.16 to P0.31. • PINSEL2 : - Used to configure PORT1 pins P1.16 to P1.31. Slow GPIO Registers: 1. IOxPIN (GPIO Port Pin value register): This is a 32-bit wide register used to read/write the value on Port (PORT0/PORT1). But care should be taken while writing. Masking should be used to ensure write to the desired pin. 2. IOxSET (GPIO Port Output Set register) : This is a 32-bit wide register. This register is used to make pins of Port (PORT0/PORT1) HIGH. Writing one to specific bit makes that pin HIGH. Writing zero has no ef- fect. 3. IOxDIR (GPIO Port Direction control register) : This is a 32-bit wide register used to individually controls the direction of each port pin. Setting a bit to ‘1’ configures the corresponding pin as an output pin. Setting a bit to ‘0’ configures the corresponding pin as an input pin. 4. IOxCLR (GPIO Port Output Clear register) : This is a 32-bit wide register used to make pins of Port LOW. Writing one to specific bit makes that pin LOW. Writing zeroes has no effect. Fast GPIO Registers: There are 5 fast GPIO registers : 1. FIOxDIR (Fast GPIO Port Direction control register) : This is a 32-bit wide register used to individually controls the direction of each port pin. Setting a bit to ‘1’ configures the pin as an output pin. Setting a bit to ‘0’ configures the pin as an input pin. 2. FIOxMASK (Fast Mask register for port) : This is a 32-bit wide register used to controls the effect of fast registers (FIOx- PIN, FIOxSET, FIOxCLR) on port pins. Setting a bit to ‘0’ configures the corresponding pin to the fast registers i.e. we can write/read the corresponding pin in fast mode using fast registers. Setting a bit to ‘1’ configures the pin by fast registers. 3. FIOxPIN (Fast Port Pin value register using FIOMASK) : This is a 32-bit wide register is used to read/write the value on port pins, only if that corresponding port pins have access to fast registers. 4. FIOxSET (Fast Port Output Set register using FIOMASK) : This is a 32-bit wide register is used to make pins of Port HIGH. Writing one to specific bit makes that pin HIGH. Writing zero has no effect. Reading this register pin returns the current state of the port register. 5. FIOxCLR (Fast Port Output Clear register using FIOMASK) : This is a 32-bit wide register is used to make pins of Port LOW. Writing one to specific bit makes that pin LOW. Writing zeroes has no effect. ASE, Amritapuri 5
  • 12. Bidirectional Visitor counter for efficient electricity usage. ARM7 LPC2148 Microcontroller Architecture: The ARM7 is a 32-bit general-purpose microprocessor, and it offers features like little power utilization, and high performance. The architecture of an ARM is depended on the principles of RISC. The RISC- instructions set are much easy when we com- pare with microprogrammed CISC-Complex Instruction Set Computers.The Pipeline method is used for processing all the blocks in architecture. In general, a single instruc- tion set is being performed, then its descendant is being translated a 3rd-instruction is being obtained from the memory. Figure 2.3: Architecture of LPC2148 An exclusive architectural plan of ARM7 is called as Thumb mode, and it is per- fectly suitable for high volume applications where the compactness of code is a neces- sary. The ARM7 also uses an exclusive architecture namely Thumb mode. It makes it ASE, Amritapuri 6
  • 13. Bidirectional Visitor counter for efficient electricity usage. perfectly compatible for different applications by memory limitations where the density of code is priority. 1. Interrupt sources: Every peripheral device consists of a single interrupt line allied to the VIC (vector interrupt controller), although it can have various interrupt flags inside. Individ- ual interrupt flags can also signify one or more interrupt resources. 2. On Chip Static RAM (SRAM): This on chip static ram is used for storing data or code. This ram could be accessed as 8 bit,16 bit or 32 bit. 3. On Chip Flash Program Memory: LPC2148 microcontroller contains 512 kB on chip flash memory. This memory is used for data storage or code storage. The programming of this flash memory could be accomplished with several ways. 4. Vectored Interrupt Controller: All input requests are received by vectored interrupt controller (VIC) and it converts them into fast interrupt request (FIQ). So, fast interrupt request and non fast interrupt requests are defined by programming setting in vectored interrupt controller. 5. Digital to analog Converter: This LPC2148 microcontroller has one 10 bit digital to analog converter(DAC) that converts the digital input into analog output. The maximum DAC output voltages are called VREF voltages. Power down mode and buffered output is also available in this digital to analog converter. 6. Analog to Digital Converter: LPC2148 microcontroller also contains two analog to digital converters whose names are ADC0 and ADC1. There are 14 total number of inputs of ADC are available and these two converters converts 10 bit analog input to digital output. The measurement range of each convert is 0V to VREF. 7. UART: LPC2148 microcontroller contains two UART whose name are UART0 and UART01. These UARTs are provided the full mode control handshake interface during transmitting or receiving the data lines. For covering wide range of baud rate they also support the built in functional baud rate generator, therefore there is no necessary of any external crystal of specific value. 8. Serial I/O Controller of I2C-bus: LPC2148 includes two I2C bus controllers, and this is bidirectional. The inter-IC control can be done with the help of two wires namely an SCL and SDA. Here the SDA SCL are serial clock line and the serial data line. Every apparatus is identified by an individual address. Transmitters and receivers can work in two modes like master mode or slave mode. These microcontrollers support up to-400 kbit/s bit rates. ASE, Amritapuri 7
  • 14. Bidirectional Visitor counter for efficient electricity usage. 9. SPI Serial Input/Output Controller: These microcontrollers contain single SSP, and this controller is capable of pro- cess on an SPI, Microwire bus or 4-wire SSI. It can communicate with the bus of several masters as well as slaves. But, simply a particular master, as well as slave, can converse on the bus throughout a specified data transmit. This mi- crocontroller supports full-duplex transfers, by 4-16 bits data frames used for the flow of data from the master- the slave as well as from the slave-the master. 10. Timers: LPC2148 microcontroller has two timers or counters. These timers are 32 bit and are programmable with 32 bit prescaler value as well as it also has one external event counter. Each timer has four 32 bit capture channels which take the snapshot of timer value during the transition of any input signal. 11. Watch Dog Timer: This LPC 2148 microcontroller also contains the watch dog timer whose main purposes is to reset the microcontroller with in specific amount of time during erroneous state. After this state it again turned on the microcontroller with in specific amount of time limit. 12. RTC (Real-time Clock): The RTC is intended for providing counters to calculate the time when the normal operating method is chosen. The RTC uses a small amount of power and designed for appropriate battery power arrangements where the CPU is not functioning constantly. 13. PLL: LPC2148 microcontroller contains two phase locked loops whose names are PLL0 and PLL1.The input frequency whose range is in between 1 MHz to 25 MHz is accepted by this PLL. This frequency range could be extended from 10 MHz to 60 MHz by using the current controlled oscillator (CCO) 14. Crystal Oscillator: This LPC2148 microcontroller contains the on chip integrated oscillator which operate with an external crystal whose range is in between 1 MHz to 25 MHz. These frequencies would be same when the PLL is connected and in running position. 15. Power Control: These microcontrollers support two condensed power modes such as power-down mode and idle mode. In Idle mode, instructions execution is balanced until an interrupt or RST occurs. Idle mode removes the power utilized by the CPU, controllers, memory systems, and inner buses.In power down mode, the oscillator is deactivated and the IC gets no inner clocks.This mode can be finished and the common process restarted by specific interrupts that are capable to work without clocks. ASE, Amritapuri 8
  • 15. Bidirectional Visitor counter for efficient electricity usage. 2.2.2 LCD 16x2 (Liquid Crystal Display) The term LCD stands for liquid crystal display. It is electronic display module used in an extensive range of applications like various circuits devices like mobile phones, calculators, computers, TV sets, etc. These displays are mainly preferred for multi- segment light-emitting diodes and seven segments. The main advantages of using this module are inexpensive; simply programmable, animations, and there are no limitations for displaying custom characters, special and even animations, etc. Figure 2.4: LCD 16x2 Display pin diagram Figure 2.5: LCD 16x2 displaying content Main Features of LCD: • The operating voltage of this LCD is 4.7V-5.3V. • It includes two rows where each row can produce 16-characters. • The utilization of current is 1mA with no backlight. • Every character can be built with a 5×8 pixel box. • The alphanumeric LCDs alphabets numbers. • Is display can work on two modes like 4-bit 8-bit. ASE, Amritapuri 9
  • 16. Bidirectional Visitor counter for efficient electricity usage. • These are obtainable in Blue Green Backlight. • It displays a few custom generated characters. LCD Pins Description: 1. Pin1 (Ground/Source Pin): This is a GND pin of display, used to connect the GND terminal of the micro- controller unit or power source. 2. Pin2 (VCC/Source Pin): This is the voltage supply pin of the display, used to connect the supply pin of the power source. 3. Pin3 (V0/VEE/Control Pin): This pin regulates the difference of the display, used to connect a changeable POT that can supply 0 to 5V. 4. Pin4 (Register Select/Control Pin): This pin toggles among command or data register, used to connect a microcon- troller unit pin and obtains either 0 or 1(0 = data mode, and 1 = command mode). 5. Pin5 (Read/Write/Control Pin): This pin toggles the display among the read or writes operation, and it is con- nected to a microcontroller unit pin to get either 0 or 1 (0 = Write Operation, and 1 = Read Operation). 6. Pin 6 (Enable/Control Pin): This pin should be held high to execute Read/Write process, and it is connected to the microcontroller unit constantly held high. 7. Pins 7-14 (Data Pins): These pins are used to send data to the display. These pins are connected in two-wire modes like 4-wire mode and 8-wire mode. In 4-wire mode, only four pins are connected to the microcontroller unit like 0 to 3, whereas in 8-wire mode, 8-pins are connected to microcontroller unit like 0 to 7. 8. Pin15 (+ve pin of the LED): This pin is connected to +5V 9. Pin 16 (-ve pin of the LED): This pin is connected to GND. Registers of LCD: Command Register: The main function of the command register is to store the instructions of command which are given to the display. So that predefined tasks can be performed such as clear- ing the display, initializing, set the cursor place, and display control. Here commands processing can occur within the register. ASE, Amritapuri 10
  • 17. Bidirectional Visitor counter for efficient electricity usage. Data Register: The main function of the data register is to store the information which is to be exhibited on the LCD screen. Here, the ASCII value of the character is the information which is to be exhibited on the screen of LCD. Whenever we send the information to LCD, it transmits to the data register, and then the process will be starting there. When register set =1, then the data register will be selected. The commands of LCD 16X2: 1. Hex Code-01, the clear LCD screen 2. Hex Code-02, returning home 3. Hex Code-04, decrement cursor 4. Hex Code-06, Increment cursor 5. Hex Code-05, Shift display right 6. Hex Code-07, Shift display left 7. Hex Code-08, Display off, cursor off 8. Hex Code-0A, cursor on and display off 9. Hex Code-0C, cursor off, display on 10. Hex Code-0E, cursor blinking, Display on 11. Hex Code-0F, cursor blinking, Display on 12. Hex Code-10, Shift cursor position to left 13. Hex Code-14, Shift cursor position to the right 14. Hex Code-18, Shift the entire display to the left 15. Hex Code-1C, Shift the entire display to the right 16. Hex Code-80, Force cursor to the beginning ( 1st line) 17. Hex Code-C0, Force cursor to the beginning ( 2nd line) 18. Hex Code-38, 2 lines and 5×7 matrix ASE, Amritapuri 11
  • 18. Bidirectional Visitor counter for efficient electricity usage. 2.2.3 IR (Infrared) Sensor: An infrared sensor is an electronic device, that emits light in order to sense some as- pects of the surroundings. An IR sensor can measure the heat of an object as well as detects the motion. These types of sensors measure only infrared radiation, rather than emitting it that is called a passive IR sensor. Usually, in the infrared spectrum, all the objects radiate some form of thermal radiation.These types of radiations are invisible to our eyes, which can be detected by an infrared sensor. The emitter is simply an IR LED (Light Emitting Diode) and the detector is simply an IR photodiode that is sensitive to IR light of the same wavelength as that emitted by the IR LED. When IR light falls on the photodiode, the resistances and the output voltages will change in proportion to the magnitude of the IR light received. Figure 2.6: IR sensor Working principle of IR sensor: The working principle of an infrared sensor is similar to the object detection sensor. This sensor includes an IR LED an IR Photodiode, so by combining these two can be formed as a photo-coupler. IR LED is one kind of transmitter that emits IR radiations. This LED looks similar to a standard LED and the radiation which is emitted by this is not visible to the naked eye. Infrared receivers mainly detect the radiation using an infrared transmitter. These infrared receivers are available in photodiodes form. IR Photodiodes are dissimilar as compared with usual photodiodes because they detect simply IR radiation. Different kinds of infrared receivers mainly exist depending on the package,voltage, wavelength, etc. Once it is used as the combination of an IR transmitter receiver, then the receiver’s wavelength must equal the transmitter. Here, the transmitter is IR LED whereas the receiver is IR photodiode. The infrared photodiode is responsive to the infrared light that is generated through an infrared LED. The resistance of photo-diode the change in output voltage is in proportion to the infrared light obtained. This is the IR sensor’s fundamental working principle. ASE, Amritapuri 12
  • 19. Bidirectional Visitor counter for efficient electricity usage. 2.2.4 Crystal Oscillator: A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a constant frequency.This frequency is often used to keep track of time, as in quartz wristwatches, to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers. The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits incorporating them became known as crystal oscillators. Figure 2.7: Crystal Oscillator Figure 2.8: Crystal Oscillator symbol Principle of Crystal Oscillators: Crystal oscillators operate on the principle of inverse piezoelectric effect in which an alternating voltage applied across the crystal surfaces causes it to vibrate at its natural frequency. It is these vibrations which eventually get converted into oscillations. ASE, Amritapuri 13
  • 20. Bidirectional Visitor counter for efficient electricity usage. 2.2.5 Battery: A battery is a device consisting of one or more electrochemical cells with external con- nections for powering electrical devices such as flashlights, mobile phones, and electric cars. When a battery is supplying electric power, its positive terminal is the cathode and its negative terminal is the anode. The terminal marked negative is the source of electrons that will flow through an external electric circuit to the positive terminal. In this project 3.3V battery is used. Figure 2.9: Battery/cells Figure 2.10: Battery symbol ASE, Amritapuri 14
  • 21. Bidirectional Visitor counter for efficient electricity usage. 2.2.6 Resistor: Resistors are electronic components which have a specific, never-changing electrical re- sistance. The resistor’s resistance limits the flow of electrons through a circuit.They are passive components, meaning they only consume power. Resistors are usually added to circuits where they complement active components like op-amps, microcontrollers, and other integrated circuits. Commonly resistors are used to limit current, divide voltages, and pull-up I/O lines.In this project 10k ohm resistor is used for reset pin. Figure 2.11: Resistors Figure 2.12: Resistor symbol 2.2.7 Ceramic Capacitor: A ceramic capacitor is a fixed-value capacitor where the ceramic material acts as the dielectric. It is constructed of two or more alternating layers of ceramic and a metal layer acting as the electrodes. The composition of the ceramic material defines the electrical behavior and therefore applications.Ceramic capacitors of special shapes and styles are used as capacitors for RFI/EMI suppression, as feed-through capacitors and in larger dimensions as power capacitors for transmitters.In this project ,2 capacitor of 22pF is used for the Crystal oscillator. ASE, Amritapuri 15
  • 22. Bidirectional Visitor counter for efficient electricity usage. Figure 2.13: Resistor symbol Figure 2.14: Ceramic capacitor 2.2.8 Switch: A switch is an electrical component that can disconnect or connect the conducting path of an electrical circuit, interrupting the electric current or diverting it from one conductor to another. The most common type of switch is an electromechanical device consisting of one or more sets of movable electrical contacts connected to external circuits. When a pair of contacts is touching, current can pass between them, while when the contacts are separated no current can flow.In this project we used switch to reset the microcontroller. ASE, Amritapuri 16
  • 23. Bidirectional Visitor counter for efficient electricity usage. Figure 2.15: Push button switch Figure 2.16: Switch symbol 2.2.9 Motor: An electric motor is an electrical machine that converts electrical energy into mechan- ical energy. Most electric motors operate through the interaction between the motor’s magnetic field and electric current in a wire winding to generate force in the form of torque applied on the motor’s shaft. Electric motors can be powered by direct current (DC) sources, such as from batteries, motor vehicles or rectifiers, or by alternating current (AC) sources, such as a power grid, inverters or electrical generators. In this project, we are using motor to replicate the functionality of fans for the demonstration purpose only. Figure 2.17: Motor ASE, Amritapuri 17
  • 24. Bidirectional Visitor counter for efficient electricity usage. 2.3 Circuit Diagram Figure 2.18: circuit diagram The above shown figure is the complete circuit diagram of the bidirectional Visitor counter project. The circuit design is done in Proteus 8 Professional. Refer next sec- tion for circuit explanation. 2.4 Circuit Explanation In this project, we are using LPC2148 microcontroller, two IR sensors, LCD 16x2 display, resistor, capacitors, crystal oscillator,battery and motor for the simulation of project. Firstly we connect all the necessary connections like battery, reset, and crystal oscillator connections to the microcontroller. Vsat, Vbat are connected to the positive terminal of the battery, whereas Vss is connected to the negative terminal of the battery. Next we connect the reset to the microcontroller. For reset circuit we use a pull-up resistor and a switch to reset the microcontroller. We connect the one end of the re- sistor to the positive terminal of the battery and other end to negative terminal of the battery and reset pin of microcontroller. With this we completed the reset connection. Next we move to the connection of crystal oscillator connections to the microcontroller. The crystal oscillator is connected to the Xtal1 and Xtal2 pin of the microcontroller ASE, Amritapuri 18
  • 25. Bidirectional Visitor counter for efficient electricity usage. and pulled down with the ceramic capacitors to the ground. With these connections we completed the basic power connections of the microcontroller. Next we are connecting the inputs (IR sensors, fan, light) and outputs (LCD, mo- tor) to the microcontroller. Firstly, we connect the IR sensors to the microcontroller. The VCC of the IR sensors is connected to 5v power supply. The GND is connected to the negative terminal of the battery. The OUT pin of the IR sensor 1 2 is connected to the Port 0.25 and Port 0.26 of the microcontroller respectively. With this we completed connection of IR sensor with the microcontroller. Next we move to the connection of LCD with the microcontroller. Firstly, we give 5v power supply to the Vdd of the LCD. The Vss is connected to the ground of the battery. RS, RW, Enable(E) pin of LCD is connected to the Port 0.4 , Port 0.5, Port 0.6 pin respectively. We are using 8-bit mode in the LCD, so we connect all the 8 pin from D0 to D7 to microcontroller Port 0.8 to Port 0.15 respectively. Next we connect the motor to the microcontroller. The positive terminal of motor is connected to the Port 1.16 pin of microcontroller. This pin is acting as an output to the microcontroller. The negative terminal of the motor is connected to the ground. With all these connec- tion done, we are ready to dump the code and simulate the project. 2.5 Working Principle The LPC2148 microcontroller is the central processing unit of the whole system. It coordinates the activities of all the other components like IR sensor, LCD, motors to achieve the desired result which in the case of this project is to keep track of number of visitors entering or leaving. The microcontroller scans the input I/O pins to which the infrared sensors are connected. If there occurs a transition from ’LOW’ to ’HIGH’, then it is considered as an signal to microcontroller. The direction of travel of the person should also be determined by microcontroller. That is, whether the person is entering or exiting the room. For this purpose, we em- ploy two sensors designated as IR Sensor1 and IR Sensor2. The sensors are arranged so that one set of infrared transmitter and receiver comes before the other. Sensor1 comes first and then Sensor2 in the direction of moving toward the room. The LCD also displays “VISITORS COUNT : 0”. That means there is nobody in the room as at that time. The process then proceeds this way. A visitor entering the room will first interrupt Sensor1. Now the microcontroller checks to see whether Sensor2 has already been set. If Sensor2 has already been set, the number of persons in the room is increased by 1 and the new count value is updated on the LCD. If somebody leaves the room, first the Sensor2 is first interrupted, and keeps a check on the Sensor1. If Sensor1 is also interrupted then the visitor count is decremented by 1 and the new count is updated on the LCD. This is the cyclic process and the microcontroller keeps scanning the IR sensors output. The Embedded C programming language is used to create instructions for the bidirectional visitor counter to run through a C compiler on a compute. The instruction set code is converted into machine language (Hex file) for it to be understandable to the microcontroller. ASE, Amritapuri 19
  • 26. Bidirectional Visitor counter for efficient electricity usage. The full working of the Bidirectional Visitor counter system is given in the flow chart diagram. A flow chart is a type of diagram that represents a process, showing the steps as boxes of various kinds, and their order by connecting these with arrows. This diagrammatic representation can give a step-by-step solution to a given problem. Process operations are represented in these boxes, and arrows connecting them rep- resent flow of control. Flowcharts are used in documenting, analyzing, designing or managing a process or program in various fields. We are convinced, from the above results, that the bidirectional visitor counter is highly efficient and economical. Its pro- gram can also be modified to take additional input depending on the function desired by the designer. There is no need for human auditor services. Figure 2.19: Working flow diagram ASE, Amritapuri 20
  • 27. Chapter 3 Software requirement 3.1 Keil uvision 4 Keil MicroVision is a free software which solves many of the pain points for an em- bedded program developer. This software is an integrated development environment (IDE), which integrated a text editor to write programs, a compiler and it will convert your source code to hex files too. Keil provides a broad range of development tools like ANSI C compiler, macro assemblers, debuggers and simulators, linkers, IDE, library managers, real-time op- erating systems and evaluation boards for Intel 8051, Intel MCS-251, ARM, and XC16x/C16x/ST10 families. 3.2 Proteus 8 Professional The Proteus Design Suite is a proprietary software tool suite used primarily for elec- tronic design automation. The software is used mainly by electronic design engineers and technicians to create schematics and electronic prints for manufacturing printed circuit boards. The micro-controller simulation in Proteus works by applying either a hex file or a debug file to the microcontroller part on the schematic. It is then co-simulated along with any analog and digital electronics connected to it. This enables its use in a broad spectrum of project prototyping in areas such as motor control, temperature control and user interface design. It also finds use in the general hobbyist community and, since no hardware is required, is convenient to use as a training or teaching tool. 21
  • 28. Chapter 4 Inference 4.1 Application of Project 1. Used to count the number of visitors entering or leaving a room, auditorium, shopping mall, offices, schools, exhibitions and etc. 2. Can be used to control electrical appliances like light, fan, Air conditioner, and etc. 3. To limit the number of visitors in the room. 4. Can be used for home automation. 4.2 Advantages and Disadvantages 4.2.1 Advantages: 1. Cost efficient device. Can be manufactured at low cost. 2. Low maintenance.Easy to use. Once install, works for longer period of time. 3. Can be implemented on single door. 4. Used to control electrical appliances for power management. 4.2.2 Disadvantages: 1. Works only when single person enters or leaves the room. The device can not count when the visitors are in crowd. 2. This device works on the principle of IR rays, so device might misbehave when there is too much brightness in the surroundings. 22
  • 29. Bidirectional Visitor counter for efficient electricity usage. 4.3 Results and Discussion This project works as per the requirements, without any faults. The block diagram and circuit diagram are important part of the project as these diagrams gives the com- plete information about the project connections. The LCD unit displays the count of visitors, which is very important information and can be used to track the visitors. There are various kinds of displays available in the market. One can buy any display as per the budget. Here, in the project we used motor to demonstrate the working of fan in real time, but we can use light, Air conditioner and many electrical appliances in real time. 4.4 Conclusion In our project, we designed and implemented a Bidirectional Visitor Counter which counts and displays the number of visitor in the auditorium, halls, rooms, shopping malls and also automatically control the electrical appliances in the room. There are many inputs and outputs to the microcontroller which were implemented with clear understanding of the subject. We referred and discussed many researches for the better output of the project. Our project is very useful in Schools, hospitals, malls, offices, auditoriums etc. The overall implementation cost of this project is very cheap and is affordable by a common person. This low cost system is designed to improve the living standard of common people. By implementing this project ,we acquired understandable knowledge about this subject and are familiar with softwares like proteus and keil .This project, gave us a hands on work with a clear idea on how to use theoretical knowledge in practical. 4.5 Future works This project have many future applications which can improve the efficiency and pro- ductivity in work. We can use a buzzer as an alarm for the indication of any visitor and further we can also limit the number of visitors in a room by displaying messages on LCD. The world is moving towards the connecting of everything namely IoT (Internet Of Things). So, we can add an IoT gateway to the device so that we have the data of number of visitors in a particular location. We can also monitor the data and take action depending on the requirement. We can also use this device along with IoT for home automation. ASE, Amritapuri 23
  • 30. Bidirectional Visitor counter for efficient electricity usage. 4.6 References 1. Subiakto, E.C. (2009) Digital Tally Counter Finger Ring. Retrieved from http://www.google.com/patents/WO2009144689A1?cl=en . 2. Microprocessors, Microcontrollers, Architecture and Programming Concepts. (n. d.). Retrieved from http://www.slideshare.net/ashmus/microproccesor-and-microcontrollers- hardware- basics. 3. A Report on Bidirectional Visitor Counter using IR sensors and Arduino Uno R3. https://www2.slideshare.net/Abhishekvb/a-report-on-bidirectional-visitor-counter- using-ir-sensors-and-arduino-uno-r3 4. LCD interfacing with LPC2148. https://www.instructables.com/LPC2148-Interfacing-With-162-LCD/ 5. LPC2148 GPIO Programming Tutorial. http://www.ocfreaks.com/lpc2148-gpio-programming-tutorial/ 6. Infrared Sensor Library for Proteus. https://www.theengineeringprojects.com/2018/07/infrared-sensor-library-for-proteus.html 7. How to add new Library in Proteus 8. https://www.theengineeringprojects.com/2018/04/how-to-add-new-library-in-proteus- 8.html 8. LPC2148 GPIO Ports and Registers. https://www.electronicwings.com/arm7/lpc2148-32-bit-arm7tdmi-s-processor-gpio- ports-and-registers 9. LPC2148 – GPIO Tutorial. https://embetronicx.com/tutorials/microcontrollers/lpc2148/lpc2148-gpio-tutorial- led-interfacing/ ASE, Amritapuri 24
  • 31. Bidirectional Visitor counter for efficient electricity usage. 4.7 Literature reviews Before we initiate the project, we discussed and reviewed many researches prior to take up the project. A clear analysis of literature was conducted for the best results of the project. This helped us to identify the benefits and drawbacks of the projects. 1. A Report on Bidirectional Visitor Counter using IR sensors and Ar- duino Uno R3 This paper presented the necessity of bidirectional visitor counter and the results after using the device. It highlighted the circuit design with all the required com- ponents. The explanation of working of circuit was lucid. This report gave us an insights of the project and helped us to crack the problems that arise during the project. 2. LPC2148 GPIO Programming This paper has provided a understandable knowledge of programming LPC2148 microcontroller. It includes all the GPIO register and Port which are very useful during programming. The explanation of concepts is lucid. We were able to write codes ourselves after referring the page. 3. LCD interfacing with LPC2148 The interfacing of LCD is explained in this paper. It describes the 4-bit and 8-bit modes of LCD. It highlights the data mode and command mode which are important during display of character on the screen. We were able to use LCD are referring the paper. ASE, Amritapuri 25
  • 32. Bidirectional Visitor counter for efficient electricity usage. 4.8 Appendix Code for the Project: #include <lpc214x . h> #include <stdint . h> #include <s t d l i b . h> #include <stdio . h> void delay ( unsigned int time ){ unsigned int i , j ; for ( i =0; i<=time ; i++){ for ( j =0; j <10; j ++); } } void delay ms ( uint16 t j ) /∗ Function for delay in milliseconds ∗/ { uint16 t x , i ; for ( i =0; i<j ; i++) { for (x=0; x<1000; x++); } } void LCD CMD( char command) { IO0PIN = ( (IO0PIN & 0xFFFF00FF) | (command<<8) ) ; IO0SET = 0x00000040 ; /∗ EN = 1 ∗/ IO0CLR = 0x00000030 ; /∗ RS = 0 , RW = 0 ∗/ delay ms ( 2 ) ; IO0CLR = 0x00000040 ; delay ms ( 5 ) ; } void LCD INIT( void ) { IO0DIR = 0x0000FFF0 ; delay ms ( 2 0 ) ; LCD CMD(0 x38 ) ; /∗ I n i t i a l i z e lcd ∗/ LCD CMD(0x0C ) ; /∗ Display on cursor o f f ∗/ LCD CMD(0 x06 ) ; /∗ Auto increment cursor ∗/ LCD CMD(0 x01 ) ; /∗ Display c l e a r ∗/ LCD CMD(0 x80 ) ; /∗ First l i n e f i r s t position ∗/ } void LCD STRING ( char∗ msg) { ASE, Amritapuri 26
  • 33. Bidirectional Visitor counter for efficient electricity usage. uint8 t i =0; while (msg [ i ]!=0) { IO0PIN = ( (IO0PIN & 0xFFFF00FF) | (msg [ i ]<<8) ) ; IO0SET = 0x00000050 ; /∗ RS = 1 , , EN = 1 ∗/ IO0CLR = 0x00000020 ; /∗ RW = 0 ∗/ delay ms ( 2 ) ; IO0CLR = 0x00000040 ; /∗ EN = 0 , RS and RW unchanged delay ms ( 5 ) ; i++; } } void LCD CHAR ( char msg) { IO0PIN = ( (IO0PIN & 0xFFFF00FF) | (msg<<8) ) ; IO0SET = 0x00000050 ; /∗ RS = 1 , , EN = 1 ∗/ IO0CLR = 0x00000020 ; /∗ RW = 0 ∗/ delay ms ( 2 ) ; IO0CLR = 0x00000040 ; delay ms ( 5 ) ; } int main( void ) { IO0DIR &= ˜((1<<25)) ; IO0DIR &= ˜((1<<26)) ; IO1DIR |= (1<<16); uint8 t j ; j = 0; char v a l j [ 3 ] ; LCD INIT ( ) ; LCD CMD(0 x80 ) ; LCD STRING(” Visitor Counter : ” ) ; LCD CMD(0xC0 ) ; while (1){ i f (IOPIN0 & (1<<25)) { while (˜( IOPIN0 & (1<<26))) j = j +1; } i f (IOPIN0 & (1<<26)) { while (˜( IOPIN0 & (1 < <25))); ASE, Amritapuri 27
  • 34. Bidirectional Visitor counter for efficient electricity usage. j = j −1; } i f ( j >= 1) { IOSET1 |= (1<<16); } e l s e { IOCLR1 |= (1<<16); j = 0; } s p r i n t f ( val j ,”%d ” , j ) ; LCD STRING( v a l j ) ; delay ms (200); LCD CMD(0xC0 ) ; } return 0; } 4.9 Terminology • ARM - Advanced RISC Machine and originally Acorn RISC Machine • LCD - Liquid Crystal Display • IR - Infrare • IoT - Internet of Things • CPU - Central Processing Unit • UART - Universal asynchronous receiver/transmitter • USB - Universal Serial Bus • SRAM - Static random access memory • GPIO - General Purpose Input/Output • RAM - Random access memory • RTC - Real time Clock • RISC - Reduced instruction set computing • CISC - Complex instruction set computing • LED - Light Emitting Diode • I/O - Input Output ASE, Amritapuri 28
  • 35. Bidirectional Visitor counter for efficient electricity usage. • DC - Direct current • AC - Alternating current • VCC - Voltage Common Collector • IDE - Integrated Development Environment ASE, Amritapuri 29