You are on page 1of 17

JSS SCIENCE AND TECHNOLOGY UNIVERSITY

MYSURU 570 006

SRI JAYACHAMARAJENDRA COLLEGE OF ENGINEERING

PROJECT REPORT as a part of CIE event for the course

EC330: SENSORS AND ACTUATORS

Course instructor: Prof M S PRAVEEN KUMAR

Submitted by

Sl. No Name USN Section

01 Sujeendra R 01JST16EC094 A

02 Tejas S 01JST16EC102 A

03 Viveka S 01JST16EC115 A
OCTOBER 2017
Abstract

Project of “Digital visitor counter” is based on the interfacing of some


components such as sensors, motors etc. with Arduino
microcontroller. This counter can count people in both directions. This
circuit can be used to count the number of persons entering a mall in
the entrance gate and it can count the number of persons leaving the
hall by decrementing the count at exit gate and it depends upon
sensor placement in mall. It can also be used at gates of parking areas
and other public places.

This project is divided in four parts: sensors, controller, counter


display and gate. The sensor would observe an interruption and
provide an input to the controller which would run the counter
increment or decrement depending on entering or exiting of the
person. And counting is displayed on a 16x2 LCD through the
controller.

When any one enters in the room, IR sensor will get interrupted by
the object then other sensor will not work because we have added a
delay for a while.
Acknowledgement
TABLE OF CONTENTS

SL.NO TITLE PAGE NO


CHAPTER 01

SENSORS

An infrared sensor is an electronic device that emits in order to sense some aspects of the surroundings.
An IR sensor can measure the heat of an object as well as detects the motion. These types of sensors
measures only infrared radiation, rather than emitting it that is called as a passive IR sensor. Usually in
the infrared spectrum, all the objects radiate some form of thermal radiations. These types of radiations
are invisible to our eyes that 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 which is sensitive to IR light of the
same wavelength as that emitted by the IR LED as shown in Figure 1.1. When IR light falls on the
photodiode, the resistances and these output voltages, change in proportion to the magnitude of the IR
light received.

Figure 1.1 Working of IR

1.1 IR Sensor Circuit and Working Principle

An infrared sensor circuit is one of the basic and popular sensor module in an electronic device. This
sensor is analogous to human’s visionary senses, which can be used to detect obstacles and it is one of the
common applications in real time. This circuit comprises of the following components.

1. LM358 IC 2 IR transmitter and receiver pair


2. Resistors of the range of kilo ohms.
3. Variable resistors.
4. LED (Light Emitting Diode).

In these modules, the transmitter section includes an IR sensor, which transmits continuous IR rays to be
received by an IR receiver module. An IR output terminal of the receiver varies depending upon its
receiving of IR rays. Since this variation cannot be analyzed as such, therefore this output can be fed to a
comparator circuit. Here an operational amplifier (op-amp) of LM 358 is used as comparator circuit as
shown in figure 1.2.

When the IR receiver does not receive a signal, the potential at the inverting input goes higher than that
non-inverting input of the comparator IC (LM358). Thus the output of the comparator goes low, but the
LED does not glow. When the IR receiver module receives signal to the potential at the inverting input
goes low. Thus the output of the comparator (LM 358) goes high and the LED starts glowing. Resistor R1
(100 ), R2 (10k ) and R3 (330) are used to ensure that minimum 10 mA current passes through the IR
LED Devices like Photodiode and normal LEDs respectively. Resistor VR2 (preset=5k) is used to adjust
the output terminals. Resistor VR1 (preset=10k) is used to set the sensitivity of the circuit Diagram. Read
more about IR sensors.

Figure 1.2 Circuit of IR module

1.2 IR Sensor Applications

IR sensors are used in various Sensor based projects and also in various electronic devices which
measures the temperature that are discussed in the below.

1.2.1 Radiation Thermometers:

IR sensors are used in radiation thermometers to measure the temperature depend upon the temperature
and the material of the object and these thermometers have some of the following features

1. Measurement without direct contact with the object


2. Faster response
3. Easy pattern measurements
1.2.2 Flame Monitors:

These types of devices are used for detecting the light emitted from the flames and to monitor how the
flames are burning. The Light emitted from flames extend from UV to IR region types. PbS, PbSe, Two
color detector, pyro electric detector are some of the commonly employed detector used in flame
monitors.

1.2.3 Moisture Analyzers:

Moisture analyzers use wavelengths which are absorbed by the moisture in the IR region. Objects are
irradiated with light having these wavelengths (1.1 µm, 1.4 µm, 1.9 µm, and 2.7µm) and also with
reference wavelengths. The Lights reflected from the objects depend upon the moisture content and is
detected by analyzer to measure moisture (ratio of reflected light at these wavelengths to the reflected
light at reference wavelength). In GaAs PIN photodiodes, Pbs spectroscopically photoconductive
detectors are employed in moisture analyzer circuits.

1.2.3 Gas Analyzers:

IR sensors are used in gas analyzers which use absorption characteristics of gases in the IR region. Two
types of methods are used to measure the density of gas such as dispersive and non-dispersive.

1.2.4 Dispersive:

An Emitted light is divided and their absorption characteristics are used to analyze the gas ingredients and
the sample quantity.

1.2.5 Non dispersive:

It is most commonly used method and it uses absorption characteristics without dividing the emitted light.
Non dispersive types use discrete optical band pass filters, similar to sunglasses that are used for eye
protection to filter out unwanted UV radiation.

This type of configuration is commonly referred to as non-dispersive infrared (NDIR) technology. This
type of analyzer is used for carbonated drinks, whereas non dispersive analyzer is used in most of the
commercial IR instruments, for an automobile exhaust gas fuel leakages.

1.2.6 IR Imaging Devices:

IR image device is one of the major applications of IR waves, primarily by virtue of its property that is
not visible. It is used for thermal imagers, night vision devices, etc.
For examples Water, rocks, soil, vegetation, an atmosphere, and human tissue all features emit IR
radiation. The Thermal infrared detectors measure these radiations in IR range and map the spatial
temperature distributions of the object/area on an image. Thermal imagers usually composed of a Sb
(indium antimonite), Gd Hg (mercury-doped germanium), Hg Cd Te (mercury-cadmium-telluride)
sensors.
An electronic detector is cooled to low temperatures using liquid helium or liquid nitrogen’s. Then the
Cooling the detectors ensures that the radiant energy (photons) recorded by the detectors comes from the
terrain and not from the ambient temperature of objects within the scanner itself an IR imaging electronic
devices.
CHAPTER 02

CONTROL SYSTEM

2.1 Arduino UNO – Basics and Design

An Arduino is actually a microcontroller based kit which can be either used directly by purchasing from
the vendor or can be made at home using the components, owing to its open source hardware feature. It is
basically used in communications and in controlling or operating many devices. It was founded by
Massimo Banzi and David Cuartielles in 2005.

2.1.1 Arduino Architecture:

Arduino’s processor basically uses the Harvard architecture where the program code and program data
have separate memory. It consists of two memories- Program memory and the data memory. The code is
stored in the flash program memory, whereas the data is stored in the data memory. The Atmega328 has
32 KB of flash memory for storing code (of which 0.5 KB is used for the bootloader), 2 KB of SRAM
and 1 KB of EEPROM and operates with a clock speed of 16MHz. Block diagram of Arduino UNO
Architecture is shown in figure 2.1.

Figure 2.1 Arduino UNO Architecture


2.1.2 Arduino Pin Diagram

Arduino Uno consists of ATmega328- a 28 pin microcontroller. The Pin diagram of Arduino UNO is
given in Figure 2.2.

Figure 2.2 Pin Diagram of Arduino UNO

Arduino Uno consists of 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog
inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button

2.1.2.1 Power Jack: Arduino can be power either from the pc through a USB or through external source
like adaptor or a battery. It can operate on a external supply of 7 to 12V. Power can be applied externally
through the pin Vin or by giving voltage reference through the IORef pin.

2.1.2.2 Digital Inputs: It consists of 14 digital inputs/output pins, each of which provide or take up 40mA
current. Some of them have special functions like pins 0 and 1, which act as Rx and Tx respectively , for
serial communication, pins 2 and 3-which are external interrupts, pins 3,5,6,9,11 which provides pwm
output and pin 13 where LED is connected.

2.1.2.3 Analog inputs: It has 6 analog input/output pins, each providing a resolution of 10 bits.

2.1.2.4 ARef: It provides reference to the analog inputs

2.1.2.5 Reset: It resets the microcontroller when low.


2.1.3 Steps to program an Arduino:

(a) Programs written in Arduino are known as sketches. A basic sketch consists of 3 parts

1. Declaration of Variables
2. Initialization: It is written in the setup () function.
3. Control code: It is written in the loop () function.

(b) The sketch is saved with .ino extension. Any operations like verifying, opening a sketch,
saving a sketch can be done using the buttons on the toolbar or using the tool menu.
(c) The sketch should be stored in the sketchbook directory.
(d) Chose the proper board from the tools menu and the serial port numbers.
(e) Click on the upload button or chose upload from the tools menu. Thus the code is
uploaded by the bootloader onto the microcontroller.

2.2 Reasons why Arduino is being preferred these days:


1. It is inexpensive
2. It comes with an open source hardware feature which enables users to develop their own
kit using already available one as a reference source.
3. The Arduino software is compatible with all types of operating systems like Windows,
Linux, and Macintosh etc.
4. It also comes with open source software feature which enables experienced software
developers to use the Arduino code to merge with the existing programming language
libraries and can be extended and modified.
5. It is easy to use for beginners.
6. We can develop an Arduino based project which can be completely stand alone or projects
which involve direct communication with the software loaded in the computer.
7. It comes with an easy provision of connecting with the CPU of the computer using serial
communication over USB as it contains built in power and reset circuitry.

So this is some basic idea regarding an Arduino. You can use it for many types of applications. For
instance in applications involving controlling some actuators like motors, generators, based on the input
from sensors.
CHAPTER 03

LCD DISPLAY MODULE AND ACTUATORS

3.1 16×2 character LCD and Working:


We come across LCD displays everywhere around us. Computers, calculators, television sets, mobile
phones, digital watches use some kind of display to display the time. An LCD is an electronic display
module which uses liquid crystal to produce a visible image. The 16×2 LCD display (as shown in figure
3.1) is a very basic module commonly used in DIYs and circuits. The 16×2 translates to a display 16
characters per line in 2 such lines. In this LCD each character is displayed in a 5×7 pixel matrix.

Figure 3.1 Typical 16x2 display

Figure 3.2 Pin out Diagram of LCD


Pin
Function Name
No

Ground (0V)
1 Ground

Supply voltage; 5V (4.7V – 5.3V) Vcc


2

Contrast adjustment; the best way is to use variable resistor such as a potentiometer. The

output of the potentiometer is connected to this pin. Rotate the potentiometer knob Vo / VEE
3
forward and backwards to adjust the LCD contrast.

RS (Regis
4 Selects command register when low, and data register when high
Select )
5 Low to write to the register; High to read from the register Read/writ
Sends data to data pins when a high to low pulse is given; Extra voltage push is required
to execute the instruction and EN(enable) signal is used for this purpose. Usually, we
6 Enable
make it en=0 and when we want to execute the instruction we make it high en=1 for some
milli seconds. After this we again make it ground that is, en=0.
7 8-bit data pins DB0
8 DB1
9 DB2
10 DB3
11 DB4
12 DB5
13 DB6
14 DB7
Table 3.1 LCD pin descriptions
15 Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-
3.2 Interfacing a 16X2 LCD with Arduino
LCD modules form a very important part in many Arduino based embedded system designs to improve
the user interface of the system. Interfacing with Arduino gives the programmer more freedom to
customize the code easily. Any Arduino board (UNO, MEGA, and Due etc.), a 16X2 LCD display, a
couple of jumper wires and a breadboard are sufficient enough to build the circuit. The interfacing of
Arduino to LCD display is shown in figure 3.3.

Figure 3.3 Interfacing LCD with Arduino

3.3 LED Driver section:


LED driver section consist a BC547 transistor for controlling the load (in our case LED). Transistor is
used to drive the LED because Arduino does not supply enough voltage and current to drive the LED.
Arduino sends commands to this transistor and then LED will turn on/off accordingly.
CHAPTER 04

VISITOR COUNTER

4.1 Visitor Counter Circuit Diagram:

The outputs of IR Sensor Modules are directly connected to Arduino digital pin number 14(A0) and
19(A5). And Relay driver transistor at digital pin 2. LCD is connected in 4 bit mode. RS and EN pin of
LCD is directly connected at 13 and 12. Data pin of LCD D4-D7 is also directly connected to Arduino at
D11-D8 respectively. Rest of connections are shown in the figure 4.1.

Figure 4.1 Visitor counter circuit diagram


Block diagram for Visitor counter Circuit mainly consists of Four parts :
Entrance end IR module :It is the IR module which will sense the visitors entering the mall and
hence give the digital output to the Arduino-Uno.
Arduino-Uno: It is programmed using Arduino-IDE in such a way that it will give corresponding
output as sensed by Entrance end IR module and Exit end IR module across LED
driver and LCD display.
LCD Display: It will display the number of persons entered the mall.
Led Driver: Since we are using above circuit for demonstration we are indicating the output of
arduino using led lamp ,whenever visitors are present inside the mall led will glow
otherwise the led will be in off state.
5V-
Supply

Visitors
Entrance end A
Entering LCD Display
the Mall
IR Module R
D
U
I Visitors
Counting
N
O
Visitors Exit end U
leaving IR Module LED Driver
the Mall
N
O

Exit end IR module: It is the IR module which will sense the visitors leaving the mall and
hence give the digital output to the Arduino-Uno.

You might also like