You are on page 1of 14

CHAPTER 3

METHODOLOGY OF THE SYSTEM

3.1. Introduction
As the technology advances, more complicated systems emerge, requiring
sophisticated components and equipment. After some rigorous researches,
components and equipment suitable and available for the system have been selected to
ensure the system performance and to please the major objective of the project.
This section includes all the researches been done to confirm the appropriate
method which are implemented through electrical circuits. These circuits confirm
maximum output with minimum system requirements.
There are four different individual circuits for each aspects and the final circuit
is the integration of all circuits. For better interfacing with the sensors and actuator the
microcontroller used in this project is “Arduino Uno”. The individual and the
complete both circuits are tested under definite experimental conditions and
limitations.

3.2. System Overview


The proposed thesis is mainly designed and implemented into two parts. They
are the light with LDR and light with motion sensor. For the room light motion
sensor sense the motion of the body and give input to the Arduino and Arduino gives
the output to the LEDs as light. It is shown in figure 3.1.

Figure 3.1. System Block Diagram


20

For the walkway light, LDR sense the light intensity of the surrounding and
give that input to the Arduino after that Arduino gives output to the LEDs as light. All
the connections are done with the jumper wires. In room, if there is the motion of the
body, light will be ON automatically. For walkway, if the light of the surrounding is
greater than the light intensity given by the program, light will be ON automatically.
In other condition Light will be off automatically.

3.3. Types of Lighting System


Lighting systems are mainly divided into two types. The designation is as
home lighting. These are room light and walkway light system. For the walkway, as
the designation used of LDR, light system has no change in it only the light will be
ON for the whole time until any source switch OFF the light.
For the room light, the designation is with the motion sensor, and so no light if
there is the motion of a body. In automatic light system, there are further divisions.
But the main automatic light systems are the system using sensors, automatic light
system used only for energy saving and automatic light system controlled through
communication networks. Where these systems become successful in cases and also
remain as failure.

3.3.1. Smart Lighting Systems


It is explained that to ON the light automatically. This light system is achieved
by using PIR sensor and LDR. The main aim of this light system is saving power and
moving in the direction of development for intelligent ways. To have a note of
working of light system, measuring station will be planted near each light pole which
consists of sunshine sensor, presence sensor, failure sensor and an emergency switch.
Here the main sensor is PIR sensor which detects the movement of the user so that the
light will be ON as per the requirement. Light sensor will measure the light intensity
around the light pole so that it can manage to ON the light fully or partially.
Figure 3.2 shows the hardware used in the light system to achieve automatic
light system. The PIR sensor and LDR are used for the detection of humans and light
intensity in order to ON the light. Whenever there are human in the detection region
of PIR sensor then the light will get ON and the light will go to OFF position when
the human goes away from their region.
21

Figure 3.2. Sensors along with Home Light

3.3.2. Intelligent Lighting System using Arduino Uno


It is explained about smart light system. More than anything the main aim of
this article is saving power. Saving energy is the most important factor in this. In the
research study is shown that most of the countries these days are aware of regular
light system which is not environmental friendly as well as not budget friendly too.
For this work, LED lights are chosen over conventional lights because they do not
emit any CO2 and are friendly compared to the other light also controlling light
intensity is easy with LED lights. This way of power supply saves lot of energy as the
energy comes naturally through the sunlight and it is very ecofriendly. To reduce the
manual effort LDR is used to ON the light when it is night and OFF the light when it
is day light automatically.

3.3.3. Detection Methods


Many sensors these days are available in the market for the detection. Some of
the sensors are PIR sensor, Ultrasonic sensor, IR sensor, photoelectric sensor etc.
These have advantages and disadvantages also. There are implementations of these
sensors for the detection purpose in few methods as follows.
1. Detection of obstacles using IR sensors,
2. Detection of obstacles using light sensor and dimming technology,
3. Detection of obstacles using photoelectric sensor,
4. Detection of obstacles using sensors system and
5. Detection of PIR motion sensor.

3.4. PIR Sensor-Based Application in Smart Environment


PIR sensors are commonly used with a verity of sensors in diverse application
for building smart environments such as health care, smart energy system and
security.
22

3.4.1. Indoor Human Tracking with PIR Sensors


Many researchers have devoted a great deal of effort to developing
localization technology for indoor human tracking using PIR sensor. Gopinathan
developed pyroelectric motion tracking system based on coded aperatures, which
could detect human motion in one of the 15 cells in a 1.6 m square area using four
PIR detectors. Shankar developed a human tracking system using a low cost sensor
cluster consisting of PIR sensors and Fresnel lens arrays to implement the desired
spatial segmentations.
They analyzed the response characteristics of the sensor cluster and extracted
the velocity and the direction of motion over large areas of over 12m. Hao presented a
human tracking system using an MSP430 family microcontroller, an RF transceiver
and a radial sensor module with eight PIR detectors with Fresnel lens arrays arranged
around a circle.
They showed that the system can be used to track a single human target by
detecting its regular displacement while moving. LUO demonstrated a 3D simulation
study for human tracking using PIR sensors. Their approach showed the visibility
modulation of each sensor detector and the binary output of the PIR sensors.

3.4.2. Human Movement Detection with PIR Digital Outputs


More specifically, researchers have been working on detecting movement
direction and counting people entering or leaving the entrance of a room or building
using the on-off output signal of PIR sensors. Hashimoto et al. presented a people
counting system composed of a one-dimensional eight-element custom-fabricated
array detector, an IR-transparent lens and an oscillating mechanical chopper. They
show a 99% recognition accuracy of the two-way back-and-forth moving direction
and a 95% recognition accuracy of the number of passersby. Wahl et al. developed a
people counting system for an office space based on self-sustaining ultra-low power
sensor nodes composed of a pair of uni-directional PIR sensors. They simply
differentiate the direction of movement at a gateway by observing the time difference
between inward-facing and outward-facing PIR sensors. Through a real-life office
room study, they show their prototype system performs well on detecting all occupant
movements to and from the office room with a very low error rate (<1%). They also
proposed an approach to estimate people count per office space using distributed pairs
of PIR sensors and an algorithm to process the distributed sensor information.
23

3.4.3. Human Movement Detection with PIR Analog Outputs


The novel method of detecting the motion direction for an object moving in
the field of view of a single PIR sensor, whose dual sensing elements are reversely
polarized and aligned in the motion plane of the PIR sensor .
The analog output signal of PIR sensors involves more aspects beyond simple
on-off triggering, and such features have been exploited in several ways for
recognizing motion direction that built a low-cost PIR sensor-based wireless network
system for detecting the direction of movement and distinguishing the number of
people (two and three) walking in line, as well as walking side by side in a hallway.
It is also built a cluster system composed of two PIR sensors facing each other
in a hallway for detecting the direction of movement and distance intervals (close to
one sensor, in the middle, close to the other sensor) when a person is walking. They
extracted the passage duration and output amplitude from the PIR output signals and
performed classification analysis using the support vector machine and k-nearest
neighbor algorithms.
The research projects based on vision-based sensors mainly consider position,
speed, direction, shape and size (i.e., the number of pixels in cameras) as the principal
context for identifying the users and understanding their activities. Accordingly, as
shown in Figure 3.3, a motion tracking system will need to robustly detect:
(1) the identity of the moving object;
(2) at which location the object is;
(3) to which direction the object is moving; and
(4) how fast the object is moving.
We next consider the sensing systems for human movement detection and
identification for building a robust motion tracking system.

3.4.4. Human Movement Detection with PIR Analog Outputs


It detect the motion direction for an object moving in the field of view of a
single PIR sensor, whose dual sensing elements are reversely polarized and aligned in
the motion plane of the PIR sensor. The analog output signal of PIR sensors involves
more aspects beyond simple on-off triggering, and such features have been exploited
in several ways for recognizing motion direction.
24

That built a low-cost PIR sensor-based wireless network system for detecting
the direction of movement and distinguishing the number of people (two and three)
walking in line, as well as walking side by side in a hallway.
They extracted the passage duration and output amplitude from the PIR output
signals and performed classification analysis using the support vector machine and k-
nearest neighbor algorithms. The reduced feature set composed of three peak values
in the time domain for each PIR sensor. They were able to achieve 89%–95%
recognition accuracy according to machine learning algorithms.

3.5. Detecting Human Movement and Sensors


To build a smart environment where systems could understand the activities a
user is involved with and the surroundings and then adapting their services and
resources to the user’s context, we need to develop robust motion detection and
tracking system using various sensors.
The research projects based on vision-based sensors mainly consider position,
speed, direction, shape and size (i.e., the number of pixels in cameras) as the principal
context for identifying the users and understanding their activities.

Figure 3.3. Human Movement Detection and Identification

Accordingly, as shown in Figure 3.4, a motion tracking system will need to


robustly detect: (1) the identity of the moving object; (2) at which location the object
is; (3) to which direction the object is moving; and (4) how fast the object is moving.
We next consider the sensing systems for human movement detection and
identification for building a robust motion tracking system.
25

Figure 3.4. Experimental Setup for Data Collection while an Experimental subject is
Walking

3.6. Hardware Specification


As the technology advances, more complicated systems emerge, requiring
sophisticated components and equipment. After some rigorous researches,
components and equipment suitable and available for the system have been selected to
ensure the system performance and to please the major objective of the project. This
section includes all the researches been done to confirm the appropriate method which
are implemented through electrical circuits.
These circuits confirm maximum output with minimum system requirements.
There are two different individual circuits for each aspects and the final circuit is the
integration of all circuits. For better interfacing with the sensors and actuator the
microcontroller used in this project is “Arduino Uno”. The individual and the
complete both circuits are tested under definite experimental conditions and
limitations.
In this project areas of the departmental store are divided into different
sections for working purpose. There is a microcontroller unit (Arduino Uno) in every
section and every microcontroller unit (Arduino Uno) will be connected with
computer for controlling purpose. Every microcontroller unit controls light, humidity,
temperature and human body detection during closed time for security purpose.
Any automatic system requires an intelligent chip such as microcontroller that
controls the system components. Microcontroller is a small computer on a single
26

integrated circuit containing a processor core, memory, and programmable


input/output peripherals. The microcontroller unit used in this project is Arduino uno
which is a platform for prototyping interactive objects using electronics. It consists of
both hardware and software. Figure 3.5 shows the outlook of the hardware for the
auto lighting system.

Figure 3.5. Outlook of the Hardware for the Auto Lighting System

Arduino is based on the Atmel AVR CPUs and being deployed in a wide
variety of projects, ranging from sensors networks to robotic submarines. It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a
16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a
reset button. It contains everything needed to support the microcontroller.

3.7. Hardware Description

Figure 3.6. Pin Diagram of Lighting System


27

Level explanation from Figure 3.6


1. 5 V Pin,
2. Ground Pin from PIR Sensor,
3. Ground Pin from LDR,
4. A0 Pin of LDR,
5. Room Light Pin,
6. Walk Way Light Pin,
7. Vcc Pin and
8. Ground Pin of LED.
Figure 3.6 shows the pin that is connected with the sensors and the pin
number. These are responsible the input port and output port separately.
In the Arduino Uno board, there are two kinds of port: one part for digital and
another is analog.
For the room light, the light designation is with the PIR motion sensor. In PIR
motion sensor, three pins are consists of mainly that are V in pin, GND pin and VCC
pin. Vin pin is connected to the Pin 2 of Arduino Uno. GND pin is connected with the
GND pin of Arduino and VCC is connected to the Arduino Uno pin 8.
For the walkway light, the designation is with LDR. LDR has the two pin. One
pin is connected to the A0 pin of Arduino and another is connected to the GND pin of
Arduino. The fixed value of LDR is between the range of 0 to 1023. For the digital, it
can work at the two conditions of 0 and 1. So the value of 0 to 1023 cannot work at
the digital part. Therefore one pin of LDR is connected to the analog of Arduino A0.
These two sensors PIR and LDR give the input to Arduino. For the output,
LEDs show that as a light. So we must connect LEDs to the board with the resistors to
the resistance of electric energy. LEDs are connected in the parallel condition and
series condition with resistor. For the room light of LEDs is connected with pin 3 of
Arduino and the walkway light LEDs is connected with pin 4 of Arduino.

3.8. Control of Lighting System


Lighting control system is one most important part for a home. In this project
we have use two different sensors one is LDR (photoresistor) and another is PIR
(motion detector) sensor. Here photoresistor is used to determine the light intensity
and PIR sensor is used detect human body. Here one part of the LDR is connected to
the 5 V and another point is connected to the resistor R1 in series.
28

The voltage across R1 is the output voltage and this is the analog input to the
microcontroller unit (MCU) Arduino. For different light intensity the output voltage
will be different. If light intensity rises then voltage across LDR will decrease and
voltage across R1 will rise. Also if light intensity decreases then voltage across R1
will decrease. For different output voltage the MCU will turn on and turn off the
switches of light to control the light intensity in a specific area. In lighting control
system we have three different conditions for light intensity per square meter which
are given below:
If Light intensity>1000 lux then it will be consider as “high” light intensity.
If Light intensity=600 to1000 lux then it will be consider as “medium” light
intensity.
If Light intensity<600 lux then it will be consider as “low” light intensity.
To control light intensity our purpose is to keep the light intensity in medium
range. So according low light intensity the MCU will turn on switch 1and 2. It will
continue same in medium light intensity .if light intensity is high then MCU will turn
off switch 2 (Relay 2). If light intensity is low then MCU will turn on switch
2.according to light intensity the MCU will control the switches.

Figure 3.7. Integrated Diagram of the Auto Light System


29

At the same time light will not turn on in a specific area if no human exist in
that area. According to PIR sensor will detect the human body. If any human is
detected by sensor in that area then PIR sensor will send 3.3 V as analog signal to
MCU. When MCU get signal from PIR sensor. At that time the lights will actually
turn on. Here resistor across LDR, R1=200 Ω and resistor across PIR, R=50 Ω. Also
relays have used as switch where MCU will control these relay by digital output
which is equal to 5 V the flowchart of lighting control system.

Figure 3.8. Control Flow Chart of Lighting System with PIR Motion Sensor

The long term of PIR Motion Sensor is Passive Infra Red Motion Sensor. For
this system, the sensor gives the motion of the body as input to the MCU. MCU gives
the output as light to LEDs across the resistors.
When the start condition, PIR sensor check the motion of the body. If there is
any motion room light LEDs will turn ON. At the no motion conditions, PIR sensor
will be always check until there is any motion. For that no motion, no light conditions.
If a motion is appear around the sense area, PIR Sensor detects the motion and then
that sensor send that motion to the Arduino as an input.
Arduino gives output as light to the LED. If in the sense area no motion is
appeared, PIR will sense until the motion appear. If no motion, the condition of LED
will always in the condition of switch OFF, just in dark condition.
30

Figure 3.9. Light Turns ON When Human Body is Detected

Figure 3.10. Lights Turn off When no Human Body is Detected

Figure 3.7 shows the individual circuit implementation of lighting control


system which gives an understanding internal circuit complete system. The box is
sample representation of a single area in home. PIR sensor is connected to the
entrance side of the area and LDR is connected inside the box.

Figure 3.11. Control Flow Chart Diagram of Lighting System with LDR
31

The long term of LDR is Light Dependent Resistor. In this project LDR
mainly works at a condition of no light. However the light intensity can also be
adjusted as we want. The variable value of LDR is the range of 0 to 1023. As it is not
digital value, the analog pin must use when we connect LDR with Arduino MCU.
When the value of dark from the surrounding is greater than the dark value given by
the program, gives output to the walkway light LEDs as light. Else if, light will be off.
Figure 3.11 shows the control flow chart diagram of lighting system with LDR.

3.9. Distance Calculation of PIR Motion Sensor


a. The range distance between the sensor and surface object is calculated by
comparing the time the pulse left the scanner to the time each return is
received
b. Pulse laser Range distance (R) and range resolution (ΔR)
t
R=c 2 (3.1)
Δt
∆R=c 2 (3.2)
where,
c: speed of light (~299,792,458 meters/second)
t: time interval between sending/receiving the pulse (ns)
Δt: resolution of time measurement (ns)

3.10. Calculation of Working Time


2R
t= c (3.3)
[For example, flight altitude of 300m, object is 10 meters high directly
below sensor. What’s the laser pulse travel time?
Solution is 1.93467 x 10-6 (or 1935 nanoseconds)]
As the Lidar detect vehicle at distance less than “POINT_DISTANCE”
accordingly the light is ON.
‘POINT DISTANCE’ is the range that is set according to this code in the
thesis.

POINT-DISTANCE=3000
32

Point distance is measured in cm. If the point distance measured is below 3000
cm then object is detected and the light will be ON.
3.11. Calculation of Resistor
The value of resistor is differ according to the the color of LEDs is chosen.
is calculate the usage value of resistor by KVL,
-VCC+ILEDR+V(LED)=0 (3.4)
For the blue LEDs, we used 50 Ω resistor and for the yellow LED is used 200

Ω resistor.

You might also like