ENERGY SAVING CONTROL SYSTEM APPLICATION IN LECTURE ...
Transcript of ENERGY SAVING CONTROL SYSTEM APPLICATION IN LECTURE ...
ENERGY SAVING CONTROL SYSTEM APPLICATION IN LECTURE
HALL
NORHAYANIE ROSLAN
This thesis is submitted as partial fulfillment of the requirement
for the award of the
Bachelor of Electrical Engineering
(Power System)
Faculty of Electrical & Electronics Engineering
Universiti Malaysia Pahang
NOVEMBER, 2008
ii
“I hereby acknowledge that the scope and quality of this thesis is qualified for the
award of the Bachelor Degree of Electrical Engineering (Power System)”
Signature : _________________________________
Name : NORHAFIDZAH BINTI MOHD SAAD
Date : _28 OCTOBER 2008________
iii
“All the trademark and copyrights use herein are property of their respective owner.
References of information from other sources are quoted accordingly; otherwise the
information presented in this report is solely work of the author.”
Signature : ________________________________
Author : NORHAYANIE ROSLAN__________
Date : 28 OCTOBER 2008_______________
iv
To My Beloved Father and Mother & All My Family
Roslan Saad
Embun Ahmad
Nurul Liyana Roslan
Nurul Shafika Roslan
Iman Shahira Roslan
And To All My Friends
Thanks For Everything
BEP still in memories...
v
ACKNOWLEDGEMENT
In the name of Allah S.W.T, invocation and greetings to adoration of Nabi
Muhammd s.a.w., thank be to God because give me the strength and patience in
finishing the degree project.
Firstly I would like to thank my supervisor, Mrs Norhafidzah Binti Mohd
Saad for her advice, ideas and guidance throughout my project. I greatly appreciate
her care and dedication in constructively critizing my work, including in my first
dissertation.
I also would like to express my gratitude to my parent Roslan Saad and
Embun Ahmad for giving me their loves and supports throughout my four years
study in Universiti Malaysia Pahang.
Special thanks to FKEE staffs for helping me to complete my project. Not
forget all my friends participating in my study deserve a big thank you. Suggestions
and criticisms from my friends have always been helpful in finding solutions to my
problems.
I also wish acknowledgment to the people who give support direct or
indirectly to the project and during the thesis writing. Once again, thank you very
much.
vi
ABSTRACT
Energy Saving Control System is created to reduce the power consumptions
in University Malaysia Pahang (UMP). This system is designed to control the
lighting system and air-conditioner. The quantity and the consumed of the lighting
system and air conditioner can cause a lot of electrical energy wasted everyday. We
all know sometimes lecturers or students forget to switch off the lighting system and
air-conditioner before leaving the room. This system can control 8 units of lightning
system and 6 unit of air conditioner.
This project uses the Passive Infrared Sensor (PIR sensor) to detect the body
heat and the movements of humans. The PIR sensor will give signal to hardware. The
hardware of this project is PIC18F4620 and RS232 communication module to
interface with Visual Basic (VB). When PIC get signal from the sensor, so lighting
system and air-conditioner will turn OFF automatically after a delay time off 10
minutes. Within 10 minutes time frames, if the sensor detects human movement or
heat in the area, the control system will reset its program not turn OFF the lighting
system or air-conditioner system.
vii
ABSTRAK
Project Sistem Kawalan Penjimatan Elektrik di bina adalah untuk
mengurangkan kadar penggunaan tenaga elektrik di University Malaysia Pahang
(UMP). Projek ini di bina untuk mengawal system pencahayaan dan juga penghawa
dingin. Kadar bilangan dan penggunaan sistem lampu dan penghawa dingin yang
tinggi boleh menyebabkan banyak pembaziran tenaga elektrik setiap hari. Seperti
diketahui ramai, pensyarah atau pelajar kadangkala terlupa untuk memadam lampu
dan penghawa dingin sebelum meninggalkan bilik. Perisian ini dapat mengawal
sehingga 8 lampu dan 6 penghawa dingin.
Projek ini mengunakan sensor yang boleh mengesan pergerakan dan haba
badan manusian. Sensor ini akan menghantar data ke PIC. PIC18F4620 digunakan
untuk mengaturcaraan dan kemudiannya pengaturcaraan ini dihantar ke Visual Basic
melalui modul komunikasi RS232. When PIC mendapat data daripada sensor, system
pencahayaan dan system penghawa dingin akan padam secara automatic selepas 10
minit. Dalam masa 10 minit, sekiranya alat pengesan mengesan pergerakan dan haba
dari manusia, system kawalan ini akan berfungsi semula tetapi tidak menghentikan
operasi sistem pengcahayaan dan sistem penghawa dingin.
viii
TABLE OF CONTENTS
CHAPTER TITLE PAGE
1
2
TITLE
DECLARATION
DEDICATION
ACKNOWLEDGMENT
ABSTRACT
ABSTRAK
TABLE OF CONTENTS
LIST OF TABLES
LIST OF FIGURES
LIST OF ABBREVIATIONS
LIST OF APPENDICES
INTRODUCTION
1.1 Overview
1.2 Objectives of the Project
1.3 Scopes of the Project
1.4 Thesis Outline
LITERATURE REVIEW
2.1 Introduction
2.2 Case Study at DK13, UMP Lecture Hall
2.3 Sensor
2.4 Passive Infra-Red (PIR) Sensor
2.5 Microcontroller PIC18F4620
2.6 Visual Basic Based GUI
i
ii
iv
v
vi
vii
viii
xi
xii
xiv
xv
1
1
2
2
3
5
5
6
8
8
11
14
ix
3
4
2.6.1 Language Features
2.6.2 Characteristic Present in Visual Basic
METHODOLOGY
3.1 Introduction
3.2 Project Block Diagram
3.3 Project Development
3.4 Sensor Selection
3.5 Relay Selection
3.6 Relay Interface Circuit
3.7 RS232 Connection
3.8 RS232 - Interface Circuit
3.9 PIC18F4620 Microcontroller Selection
3.10 PIC Microcontroller Interface Circuit
3.11 The Energy Saving Control System Circuit
3.12 Software Development
3.12.1 Microsoft Visual Basic 6.0
3.12.1.1 Designing Visual Basic
3.12.2 Melabs Programmer Beta
3.12.3 PIC Programming
3.13 Project Flow Chart for Hardware
3.14 Conclusion
RESULT AND ANALYSIS
4.1 Introduction
4.2 Interface with Visual Basic
4.2.1 Predetermine Time
4.3 PIC Microcontroller Circuit Analysis
4.4 Relay Interface Circuit Analysis
4.5 RS232 Communication Module
4.6 Circuit Design and Modeling
4.7 Conclusion
14
16
18
18
18
20
22
23
25
27
28
28
29
31
32
32
32
34
35
36
37
38
38
38
40
43
47
48
49
50
x
5 CONCLUSION
5.1 Conclusion
5.2 Recommendation and Future Development
5.2.1 Cost and Commercialization
REFERENCES
APPENDICES
APPENDIX A
APPENDIX B
APPENDIX C
APPENDIX D
APPENDIX E
APPENDIX F
APPENDIX G
51
52
53
53
55
56
56
57
58
65
76
77
79
xi
LIST OF TABLES
TABLE NO. TITLE PAGE
3.1
5.1
5.2
5.3
Specification of Relay for this System
Cost for the Controller Board
Cost for Hardware Connection
Overall Cost of the Project
24
53
54
54
xii
LIST OF FIGURES
FIGURES NO. TITLE PAGE
2.1
2.2
2.3
2.4
2.5
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
3.10
3.11
3.12
3.13
3.14 (a)
314 (b)
3.15 (a)
Power Consumption vs. Date
Number of ON Air Conditioner vs. Date
Number of Lighting On vs. Date
PIR Sensor
The Configuration of PIC18F4620
Block Diagram of the System
Project Development Flow Chart
Internal Structure of a PIR Sensor
PIR Sensor
Example of Relay
Architecture of Relay
Relay Interface Circuit
Schematic of AN425
9-way Serial Port
RS232-Interface Hardware and Software
The Configuration of PIC18F4620
PIC Microcontroller Interface Circuit
The Circuit of Energy Saving Control
Layout of Main Form
Coding of Main Form
Melabs Programmer Main Window
6
7
7
10
13
19
21
22
23
24
24
25
26
27
28
29
30
31
33
34
34
xiii
3.15 (b)
3.16 (a)
3.16 (b)
3.17
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.9
4.10
4.11
Configuration Window
Compile Only Programmer Main Window
Compile and Program Windows
Software Flow Chart
Time Delay for Lighting System and Air
Conditioner OFF
Setting Time for 3 Times OFF.
Runtime Error Windows
PIC Microcontroller Circuit
Testing with LED
Sensor Detect Human Presence
After 10 minutes when no Human Presence
Relay Interface Circuit
RS232-Interface hardware and Software
System Design Circuit and Modeling
Hardware Design
35
35
36
37
39
41
42
43
44
45
46
47
48
49
50
xiv
LIST OF ABBREVIATIONS
PIC
MHz
IC
VDC
AC
VB
kWh
LED
SPDT
Programmable Interface Controller
Mega Hertz
Integrated Circuit
Volt Direct Current
Alternate Current
Visual Basic
Kilo Watts per Hour
Light Emitting Diode
Single Pole Double Throw
xv
LIST OF APPENDICES
APPENDIX NO. TITLE PAGE
A
B
C
D
E
F
G
PIC18F4620 Pin Diagrams
Circuit Design of the Project
Source Code for Visual Basic
Source code for PIC 18F4620
Block Diagram of Control System
Datasheet of PIR Sensor
PIC18F4620 Block Diagram
56
57
58
65
76
77
79
CHAPTER 1
INTRODUCTION
1.0 Overview
Nowadays, electricity is the one of the important energy in human life. The usage
of electricity in this world is increasing because we do not have the awareness of the
importance of electricity. This is the reason of the increasing cost of managing,
conserving and distributing. This problem also occurs in all university in Malaysia. The
level of electricity usage is high especially at the lecture halls. Students do not aware that
how important for them to reduce the cost of electricity. Thus, this energy saving project
will be created. From the previous case study, at the end of the lecture session, the
lighting system and air-conditioner are left on and unattended. Sometimes lecturers or
students forget to switch off the lighting system and air-conditioner. This will increase
the waste of electricity in University Malaysia Pahang (UMP). Based on this problem,
this energy saving project will be created using PIC microcontroller and Visual Basic
V.6 for interface.
This project will be used the Passive Infrared Sensor (PIR sensor) to detect the
body heat of humans. These projects also use Visual Basic V.6 to interface with the
hardware. When the sensor detects nobody is in the lecture halls so the microcontroller
will calculate to 10 minutes. If within this time there are students coming into the lecture
hall, the air-conditioner and lighting system will reset its programmed but if the hall
2
stays empty the lighting system and air conditioner will turn off automatically. Besides
that, other features of this system is pre-determine timer. These pre-determined times
can be changed at Visual Basic (VB 6.0) software which has been developed for setting
of the control system. Lighting system and air-conditioner will turn off automatically at
pre-determine time.
1.1 Objective
The general objective of the system is to prevent electrical energy wasted that
consumer have to pay for it. We can see that a lot of energy wasted happened nowadays.
The better energy saving must be made to prevent this problem. The objectives of this
project are:
I. To design and built the energy saving control system for application in University
Malaysia Pahang (UMP) lecture halls, in order to reduce energy wasting
occurences in lecture halls.
II. To build an automatic control system by using motion sensor (PIR sensor).
1.2 Scope of Work
This energy saving control system consists of 2 parts. First part is hardware
development and second part is software development. The scope of project that needs
to be proposed:
I. To develop hardware.
The microcontroller that will be used is the PIC18F4620 and the
sensor is the Passive Infrared Sensor (PIR sensor).
3
II. To develop software using Visual Basic for interface.
Software that will be used is Visual Basic. This software is used to
interface with the hardware.
1.3 Thesis Outlines
This thesis contains 5 chapter which is every chapter have its own purpose. After
viewing the entire chapter in this thesis hopefully viewer can understand the whole
system design for this project.
Chapter 1 describes the introduction of this project includes, the problem
statement of this project, the objective of the project, the scope of the project and the
outline of this thesis of every chapter.
Chapter 2 describes the literature review of this energy saving control system.
This chapter will explain the information about the article that related to the project
design. Besides that, this chapter will be important references to me when do the project.
This chapter also include the important information when do the research about the
project. The information got from several sources as website, books and others.
Chapter 3 describes about the methodology of this project. The methodology
includes the block diagram and flow chart of this system. The project explanation will be
explained through block diagram of this project.
Chapter 4 is about the results and the analysis for this project. This chapter
explains about the result and the analysis of this project.
4
Chapter 5 is for conclusion chapter. This chapter will explain the conclusion of
the project that is simple explanation of the project. It also includes the application of the
project in the real world. This chapter also describes the further improvement can be
done for the project. Besides that, this chapter also includes the cost and
commercialization of this project.
CHAPTER 2
LITERATURE REVIEW
2.1 Introduction
Energy saving control system is the system that created to reduce the uses of
electricity in University Malaysia Pahang (UMP). Saving energy is one of the most
fundamental things we can do as student of University Malaysia Pahang to save money
and help balance our budget. "This is an opportunity to cut expenses without affecting
services; I encourage everyone to make energy conservation part of our daily routine",
(President Curt Tompkins), [1].
The control system can be applied in lecture halls at UMP. The energy system is
designed to satisfy the externally specified demand for useful energy. Although energy
systems engineering also deals with, e.g., operation of energy supply systems and
development of energy equipment, these issues are not reflected in the research
questions and will hence be omitted in this review. So in this literature review, the author
will only focus on hardware and software that be used.
6
2.2 Case Study at DK13, UMP Lecture Halls
This energy control system is designed to practice it in University Malaysia
Pahang (UMP) lecture halls. With this control system, the uses of electricity will be
reduced. From the case study, showed that the higher of uses of electricity in UMP
because at the end of the lecture session, the lighting system and air-conditioner are left
on and unattended. Sometimes lecturers or students forget to switch off the lighting
system and air-conditioner. This will increase the waste of electricity in University
Malaysia Pahang (UMP). Figure 2.1 show the power consumption versus date in DK13,
UMP ‘s lecture hall [8].
.
Figure 2.1 Power Consumption vs. Date
The survey is done in March 2008 at DK13, UMP’s lecture hall. The data were
collected three times daily, which is after 1300pm, 1700pm and 2300pm. The data were
taken when the hall is unoccupied. The highest energy consumption is 135.3 kWh on
18th March 2008. The lowest energy consumption is 15.3 kWh on 19th March 2008
(holiday). 7 units air-conditioning and 4 units of lighting system is ON when the hall
was unoccupied on 18th March contribute to high energy consumption. The trend of
power consumption vs date
020406080
100120140160
3/3/
2008
4/3/
2008
5/3/
2008
6/3/
2008
7/3/
2008
10/3
/200
811
/3/2
008
12/3
/200
813
/3/2
008
14/3
/200
817
/3/2
008
18/3
/200
819
/3/2
008
20/3
/200
821
/3/2
008
24/3
/200
825
/3/2
008
26/3
/200
827
/3/2
008
28/3
/200
831
/3/2
008
date
kwh
7
graph for power consumption and energy wasting due to air-conditioning are almost
same. Figure 2.2 and figure 2.3 show the number of ON air-conditioner and lighting
system versus date in DK13 [8].
Figure 2.2 Number of ON Air Conditioner vs. Date
Figure 2.3 Number of Lighting ON vs. Date
No of On aircond vs Date
012345678
3/3/
2008
4/3/
2008
5/3/
2008
6/3/
2008
7/3/
2008
10/3
/200
8
11/3
/200
8
12/3
/200
8
13/3
/200
8
14/3
/200
8
17/3
/200
8
18/3
/200
8
19/3
/200
8
20/3
/200
8
21/3
/200
8
24/3
/200
8
25/3
/200
8
26/3
/200
8
27/3
/200
8
28/3
/200
8
31/3
/200
8
Date
No
of O
N a
ir co
nd
No of lighting ON vs date
0
2
4
6
8
10
12
3/3/20
08
5/3/20
08
7/3/20
08
11/3/
2008
13/3/
2008
17/3/
2008
19/3/
2008
21/3/
2008
25/3/
2008
27/3/
2008
31/3/
2008
date
No
of li
ghtin
g O
n
8
2.3 Sensor
Sensor is a device that measures a physical quantity and converts it into a signal
which can be read by an observer or by an instrument. Sensors are used in everyday
objects such as touch-sensitive elevator buttons and lamps which dim or brighten by
touching the base. There are also innumerable applications for sensors of which most
people are never aware. Applications include cars, machines, aerospace, medicine,
manufacturing and robotics [10].
Because sensors are a type of transducer, they change one form of energy into
another. For this reason, sensors can be classified according to the type of energy
transfer that they detect. There are all types of sensor available for usage: thermal,
electromagnetic, mechanical, chemical, optical radiation, acoustic, motion, distance and
more.
A good sensor should be sensitive to the measured property, insensitive to any
other property and should not influence to the measured property [10].
2.4 Passive Infra-Red (PIR) Sensor
This energy saving control system includes hardware and software. Software that
be used is Visual Basic and programming in Microcontroller, PIC 18F4550. The sensor
is most the important element in this project.
In this project, the PIR sensor will be used to detect the human present in the
lecture halls. A Passive Infrared sensor (PIR sensor) is an electronic device which
measures infrared light radiating from objects in its field of view. Apparent motion is
detected when an infrared source with one temperature, such as a human, passes in front
of an infrared source with another temperature, such as a wall [2].
9
PIR stands for Passive Infra-Red. The sensor is passive because, instead of
emitting a beam of light or microwave energy that must be interrupted by a passing
person in order to sense that person, the PIR is simply sensitive to the infrared energy
emitted by every living thing. When an intruder walks into the detector’s field of vision,
the detector sees a sharp increase in infrared energy. All objects emit what is known as
black body radiation. This energy is invisible to the human eye but can be detected by
electronic devices designed for such a purpose. The term ‘passive’ in this instance means
the PIR does not emit energy of any type but merely accepts incoming infrared radiation
[3].
The passive infrared (PIR) sensor found in popular integrated-circuit (IC)
packages does not lend itself well to achieving wide fields of view. These integrated-
circuit sensor packages typically include one or more planar sensing elements which are
irradiated through a window on the surface of the IC package. These IC sensor packages
are most sensitive to head-on radiation, incident at 90° to the window surface. Their
sensitivity drops off the more the incident radiation approaches the sensor from the side,
i.e., the more the radiation approaches the sensor at a glancing angle. To achieve a wide
field of view, known motion detectors generally require complicated optical
arrangements for directing the infrared radiation from the outlying reaches of the desired
field of view into the significantly narrower angular reach of the sensor sensitivity. Some
motion detectors have achieved wider fields of view by compounding a plurality of
integrated-circuit sensor packages, each having its own limited field of view, with
optical arrangements that bring the incident radiation to the proper sensor at the proper
angle to be perceived. In any event motion detectors with wide fields of view have
generally involved a tradeoff among increases in cost, complexity, and the physical size
of the motion detector unit, and a compromise in performance. For motion detectors
approaching a full 360° field of view the tradeoff is all the more stringent [9].
The Passive Infrared sensors (PIR sensor) have a lot of advantage compare with
other sensors. This sensor is simple, being reliable, and having low prices. No motion