Top Banner
A WIRELESS TEMPERATURE MONITORING SYSTEMS NOORISMAAWI BIN YUSOP A thesis submitted in fulfillment of the requirements for the award of the degree of Bachelor of Computer Science (Computer Systems & Network) Faculty of Computer Systems & Software Engineering University College of Engineering and Technology Malaysia NOVEMBER, 2005
24

A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

Jan 17, 2017

Download

Documents

lamduong
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

A WIRELESS TEMPERATURE MONITORING SYSTEMS

NOORISMAAWI BIN YUSOP

A thesis submitted in fulfillment of the

requirements for the award of the degree of Bachelor of Computer Science

(Computer Systems & Network)

Faculty of Computer Systems & Software Engineering

University College of Engineering and Technology Malaysia

NOVEMBER, 2005

Page 2: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

ABSTRACT

These days, the use of computer laboratory in higher learning institution has

become a compulsory element for the student in order to finish and settle down the

assignment given by lectures. Unfortunately, computer laboratory do not have any

temperature warning sign. This can cause an emergency like being fire in the room

because the people did not notice of what is happening. In this project which is focus

in Fakulti Sistem Komputer Dan Kejuruteraan Perisian (FSKKP) computer

laboratory. The temperature of the computer laboratory can be detected and will be

displayed in liquid crystal display (LCD) all the time and also will be displayed in

the system. Testing is done on the device attach to the computer (system) by using

the wireless technology. The overheat current temperature data transmitted to the

system by using the radio frequency (RF) from the device to the system. It's mean

the current temperature from the device will transmitted to the system by using radio

frequency (FR). Operation RF is 433.92 mega hertz (MHZ). The type of hardware

used is 16F877 microcontroller that will be main controller of this project. In the

device also has the buzzer that will be ringing when the current temperature as hot.

Meanwhile in the system, it will be displayed the temperature when the temperature

is hot. Hopefully, with this project, its can help to ensure that the current laboratory

temperature always in normal condition.

V

Page 3: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

ABSTRAK

Sekarang mi, penggunaan makmal komputer di institusi - institusi pengajian

tinggi menjadi begitu penting kepada pelajar untuk melaksanakan sebarang tugasan

yang diberikan oleh pensyarah. Malangnya, makinal komputer mi tidak mempunyai

sebarang tanda amaran terhadap suhu persekitaran di dalamnya. mi boleh

mewujudkan keadaan kecemasan seperti kebakaran di dalam makmal komputer

kerana pelajar atau pengguna makmal tidak diberi sebarang petunjuk awal terhadap

perubahan suhu yang mendadak di dalam makmal komputer tçrsebut. Di dalam

pembangunan projek mi yang mana difokuskan di makmal komputer Fakulti Sistem

Komputer dan Kejuruteraan Perisian (FSKKP) Projek mi akan mengesan keadaan

suhu semasa dan akan memaparkannya di LCD (Liquid Crystal Display) pada

perkakasan sepanjang hari danjuga akan rnemaparkannya di dalam sistem. Teknik

yang digunakan di dalam projek mi adalah frekuensi radio (RF). mi bermakna

penghantaran data bagi suhu mi dari perkakasan ke sistem adalah dengan

menggunakan frekuensi radio (RF). Frekuensi yang digunakan bagi mernbolehkan

projek ml beroperasi adalah pada 433.92 mega hertz (MHZ) dan perkakasan utamanya adalah 'microcontroller' jenis 16F877. Pada projek mi juga iaitu pada

perkakasannyajuga dilengkapi dengan buzzer yang akan mengeluarkan bunyi

amaran sekiranya projek mi dapat mengesan suhu yang terlampau panas di dalam

makmal komputer tersebut. Sementara itu pada sistem projek mi, ia akan

mengeluarkan 'message popup ' apabila suhu semasa menjadi terlalu panas. Diharap

dengan adanya projek ini dapat memastikan keadan suhu semasa di dalam makmal

komputer berada di dalam keadaan normal.

A

Page 4: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

TABLE OF CONTENTS

CHAPTER TITLE PAGE

Title Page i

Declaration

Dedication

Acknowledgement iv

Abstract V

Abstrak vi

Table Of Contents vii

List Of Tables xii

List Of Figures xiii

List Of Abbreviations xv

List Of Symbols xvi

List Of Appendices xvii

INTRODUCTION

11 Introduction I

1.2 Problem Statement 2

1.3 Problem Solution 2

1.4 Objective 4

1.5 Scope 4

vii

Page 5: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

viii

2 LITERATURE REVIEW

2.1 History (Early Computing Machines) 6

2.2 Microcontroller 7

2.2.1 PlC 1617877 Microcontroller 9

2.3 Microprocessor io

2.4 Differences Between Microcontroller And 11

Microprocessor

2.5 Serial Communication Interlaces (SCI) 13

2.5.1 RS-232 Serial Port 13

2.6 Serial Peripheral Interlaces (SPI) 14

2.7 Memory 15

2.8 Analog To Digital Converter (ADC) 16

2.9 Liquid Crystal Display (LCD) 17

2.10 Temperature Measuring Devices 18

2.11 Temperature Sensors 18

2.12 Types Of Temperature Sensors 19

2.12.1 LM35DZ Temperature IC Sensor 20

2.13 Infrared Technology 21

2.14 Radio Frequency Technology 22

2.15 Language For The Systems 24

2.15.1 Assemblers 24

2.15.2 Higher Level Language 25

2.16 Language For The Application Development 25

2.17 Current System/Project 26

2.17.1 Continuous Temperature And Humidity 27

Loggers

Page 6: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

x

2.17.2 TempAware 27

2.17.3 TempTrax Model F 28

2.17.4 App Note 198: Network Temperature

Monitoring 29

2.18 System/Project Solution 29

3 METHODOLOGY

3.1 Introduction 32

3.2 System Workflow 33

3.3 System Development Life Cycle (SDLC) 36

3.3.1 Project Identification And Selection 37

3. 3.2 Project Initiation And Planning 37

3.3.3 Analysis 38

3.3.3.1 Analysis On P1C16F877 38

Microcontroller

3.3.3.2 Analysis On LM35DZ IC 40

Temperature Sensor

3.3.3.3 Analysis On 741 Operational 41

Amplifier

3.3.3.4 Analysis On HDD44780 43

Liquid Crystal Display (LCD)

3.3.3.5 Analysis On The Radio 45

Frequency (RF)

3.3.4 Design 46

3.3.4.1 Circuit Design 47

3.3.4.2 System Design 51

Page 7: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

x

3.3.5 Implementation 53

3.3.6 Maintenance/Testing 54

3.3.6.1 Circuit Testing On IC 54

Temperature Sensor And

Amplifier

3.3.6.2 Circuit Testing On 57

Microcontroller, Liquid

Crystal display (LCD) And

Buzzer

3.3.6.3 Circuit Testing On The 57

Transmitter And Receiver

3.4 Hardware Requirement 58

3.5 Software Requirement 60

3.5 Discussion 60

4 RESULT AND DISCUSSION

4.1 Introduction 61

4.2 Result From The Software Testing Phase 62

4.3 Result From The Hardware Testing Phase 67

4.4 Advantages And Disadvantages Of The System 70

4.5 Discussion 70

4.6 Assumption And Constraints 71

4.7 Recommendations And Further Research 71

4.7.1 Database 71

4.7.2 Short Message System (SMS) 71

Page 8: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

x

CONCLUSION

73

REFERENCES

75

APPENDICES

77-89

Page 9: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

xli

LIST OF TABLES

TABLE NO TITLE PAGE

2.1 Differences between microcontroller and

microprocessor. 12

2.2 The five bands in the RF spectrum, showing

frequency and bandwidth ranges. 23

3.1 Advantage of using 741 Amplifier 43

3.2 Electronic Component List 59

Page 10: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

LIST OF FIGURES

FIGURE NO TITLE PAGE

1.1 The block diagram of the project 3

2.1 Block diagram of a typical microcontroller system 8

2.2 RS-232 serial port 14

2.3 Connection pin of LCD 17

2.4 LM35DZ IC temperature sensor 20

2.5 Infrared technology 21

2.6 Block diagram of transmitter 23

2.7 Block diagram of receiver 24

3.1 The flow chart of the project 35

3.2 System development life cycle (SDLC) 36 3.3 Pin diagram of the PlC 16F877 39 3.4 LM 35DZ wired on a circuit board 40 3.5 Pins of the 741 OP-AMP 42 3.6 The Non-Inverting Voltage Amplifier 42

3.7 Pin Assignment of the 110D44780 LCD 44 3.8 The pins function of the TLP434 Transmitter 45 3.9 The pins function of the RLP434 Receiver 46 3.10 Project block diagram 47

3.11 Complete circuit design 50 3.12 An example of the message popup interface for 51

danger condition

3.13 An example of the message popup interface for 52

beware condition

3.14 An example of the print confirmation 53

xlii

Page 11: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

3.15 Circuit testing on IC temperature sensor and 55

amplifier

3.16 pin connections of microcontroller, LCD and 57

buzzer

3.17 Circuit testing on transmitter and receiver 58

4.1 The main interfaces of this system 62

4.2 Close confirmation 63

4.3 The message popup interface for danger condition 63

4.4 Print confirmation 65

4.5 The message popup interface for beware condition 66

4.6 The transmitter device design 68

4.7 The receiver device design 68

4.8 The result on the Liquid Crystal Display (LCD) 69

4.9 The connection between the device and computer 69

through serial port

xiv

Page 12: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

LIST OF ABBREVIATIONS

PC - personal computer

LCD - liquid crystal display

RF - radio frequency

CPU - central processing unit

ROM - read only memory

RAM - random access memory

MCU - microcontroller unit

EPROM - erasable programmable read only memory

EEPROM - electrical erasable programmable read only

memory

USART - universal asynchronous receiver transmitter

ADC - analog to digital converter

AC - alternating current

ASK - amplitude shift keyed

SCE - serial communication interfaces

DIE - data terminal equipment

DCE - data communication equipment

LED - light emitting diode

RID - resistance temperatures device IC - integrated circuit

TCP - transmission control protocol IP - internet protocol DTR - diurnal temperature range I/O - input/output RJW - read/write BIOS - basic input/output system

xv

Page 13: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

LIST OF SYMBOLS

A - Ampere

F - Farad

pF - Piko Farad

mF - Micro Farad

V - volt

kHz - Kilo Hertz

MHz - Mega Hertz

GHz - Giga Hertz

kByte - kilo Byte

Gbytes - Giga Byte

°C - Degrees Celcius

mV/°C - Miii volt per degrees Celcius

M. - Meter

km - Kilo meter

OF - Degrees fahrenheit

xv'

Page 14: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

LIST OF APPENDICES

APPENDIX TITLE PAGE

A Gantt Chart 77

B Software 79

C Hardware 89

xvii

Page 15: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

CHAPTER 1

INTRODUCTION

1.1 Introduction

Lately, often we heard about fire occurred in the building such as the

laboratory, room, office and others. This can bring to a big loss in terms of things

and life. This thing happens because there is no sign or warning for example of the

room temperature given to the people regarding the fire.

In university environment, there are many rooms that are used such as the

lecturer's room, classroom, computer laboratory and others that have no temperature

warning sign. This can cause an emergency like being fire in the room because the

people did not notice of what is happening. In this project which is focus in Fakulti

Sistem Koniputer Dan Kejuruteraan Perisian (FSKKP) computer laboratory, the

temperature of the computer laboratory can be detected and will be displayed in

liquid crystal display (LCD) all the time and also will be displayed in the system.

The reason why this project is focus in Fakulti Sistem Komputer Dan Kejuniteraan

Perisian (FSKKP) computer laboratory, because there are have about thirty (30)

valuable computers in this lab which is very important for student to do their work or

task during studies.

Here in KUKTEM itself, there are about eight (8) labs that are equip with

computers which are FSK4, FSK4B, FSK5, FSK5B, FSK6, FSK613, FSK7 and

FSK713. If these eight (8) labs did have any sign of emergency like sign of current

temperature, surely this can bring to a big loss in terms of things. In this project, by

using LCD, it will be displayed the current temperature all the time. Meanwhile in

Page 16: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

2

the system, it will be displayed the temperature when the temperature is overheat.

It's mean, the sign of emergency will be appear in the message popup in the window

environment to inform the Computer laboratory staff about the dangerous situation

that happened in the computer laboratory. So, the computer laboratory staff will take

an early action to avoid the dangerous situation from becomes worse.

1.2 Problem Statement.

All electronic equipment such as computer is sensitive to fluctuations in

temperature. These days, the use of computer laboratory in higher learning

institution has become a compulsory element for the student in order to finish and

settle down the assignment given by lectures. Unfortunately, computer laboratory do

not have any temperature warning sign. This can cause an emergency like being fire

in the room because the people did not notice of what is happening. It is because

there is no sign or warning appear when the computer laboratory in dangerous

situation like being in fire. There is no sign of temperature in the computer

laboratory that shows the current temperature all the day either in good condition or

dangerous condition. Another thing there is no system that can be informed to the

people when the temperature in the computer laboratory become overheats. Here the

thesis of application suggestion system created to manage the temperature of the

computer laboratory always in a good condition. This allows them to react quickly,

avoiding or minimizing the impact of situations on users and the organization. This

system also can be directed to inform the current temperature condition and gives the

computer laboratory assistant benefit because they appear extremely responsive in

resolving important system issues.

1.3 Problem Solution

(i) This project will detect the current temperature and displayed it in LCD

panel and also in the system. In the panel, it will display the current

Page 17: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

Buzzer

temperature all the time. In the system, it Will display in the message

popup just to inform to the computer laboratory staff if the current

temperature become overheat.

(ii) The computer laboratory staff can see the current temperature in the system

when the computer laboratory in dangerous condition like temperature

overheats. So, the staff can early take an action to avoid this situation from

become worse.

(iii) The buzzer in the device or in the circuit will be ringing when the

temperature become overheat. So, all the people around the lab can hear

and try to save their life and things from being in the fire.

The figure 1.1 shows the block diagram of the project. It shows the electronic

component connections from integrated circuit (IC) temperature sensor to computer.

LCD

Micro IC Controller Temperature sensor (probe)

Converter Computer

Figure 1.1 The block diagram of the project

Page 18: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

4

1.4 Objective

The objective and purpose of developing this project are:

(i) To develop a prototype that can detect the current temperature of the

computer laboratory and then displayed it by using the liquid crystal display

(LCD).

(ii) To develop the message popup in the window environment when the

temperature of the computer laboratory become overheat. The development

of message popup is done by using the Visual Basic (VB) programming

language.

(iii) Transmitted the overheat current temperature data to the system by using

the radio frequency (RF) from the device to the system.

(iv) In the device or circuit, there is a buzzer that will be ringing when the project

detected the overheat current temperature.

(v) The report of the overheat current temperature will be printed if needed.

1.5 Scope

The scopes of this project are:

(i) Implemented in FSKKP computer laboratory.

(ii) Testing on Windows environment. The created system will be applying and

testing by using Windows 98 and Millennium Edition (ME). The

development of the system is by using Visual Basic (VB) version 6

programming language

Page 19: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

(iii) Testing on the device attach to the computer system by using the wireless

technology. The testing processes which involve the device that is the circuit

attach to computer of the laboratory staff using the wireless technology.

Transmitted the overheat current temperature data to the system by using the

radio frequency (RF) from the device to the system. Operation RF is

433.92MHZ. The type of hardware used is 16F877 microcontroller that will

be main controller of this project.

Page 20: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

CHAPTER 2

LITERATURE REVIEW

2.1 History (Early Computing Machines)

Microcontrollers developed from microprocessors, which in turn developed from

computers. Computers originated more than 5000 years ago. During prehistory, human

beings learned to count and build tools. In 1617, the early of computing machines of the

systems are to perform multiplication and division based on logarithms. In 1694, the

enhancements of these systems were found based on the mechanical machine that could

add, subtract, multiply, divide, and perform square roots. It demonstrated the advantage

of the binary over the decimal system for mechanical computers.

Through the end of 1990, there has been tremendous development and

innovation in semiconductor technology. Related to this development, microcontroller

having skills in both circuit design and software programming to design and build a

computer-controlled device. It has been started to be used instead of microprocessor

that is not used for the reason of cost, capacity, and programmable difficulty. Using a

microcontroller can reduce the number of components and thus the amount of design

work and wiring required for a project. The interfaces between the microcontroller and

the outside world vary with the application and may include equipments such as display,

sensors, relays, motors and others. [1]

Page 21: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

7

2.2 Microcontroller

Generally, microprocessors are involving in two (2) directions, performance and

integration. The performance direction emphasizes increased and faster processing

power with the ability to store more data. Computers use these microprocessors as

Central Processing Unit (CPUs). However, many control applications benefited by

having a reduced chip count and did not need the increased computing power. There

was a wish for more integration, so chip manufacturers developed CPU chips with built

in memory and interfaced circuits.

The general public is more aware of the former type of microprocessors because

of the popularity of personal computers. However, more controllers are sold than

powerful microprocessors because they are used in many machines, instruments, and

consumer products. A chip manufacturer will typically sell ten (10) times as many

microcontrollers as general- purpose microprocessors. Industry needs skilled people to

design, test, built, and service microcontroller-based system.

A Microcontroller is also a single integrated circuit that accepts and executes

coded instructions for the purpose of manipulating data and controlling a digital system

similar to a microprocessor. The difference is that a microcontroller also contains RAM, ROM, and 110 circuitry in that single integrated circuit (IC) package. This allows

miniaturization of single application, microprocessor controlled, digital systems because

the required associated circuitry is contained within the integrated circuit of a

microcontroller. Its construction and integration of common computer circuits make the

microcontroller ideal for single function, programmable, small control systems such as

those found in Microwave Ovens, Dishwashers, Automobiles, House Alarm Systems,

and many other household and industrial applications. [2]

Page 22: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

MICROCONTROLLER BUS BUFFERS AND CONVERTERS

[ }--[II

CLOCK CIRCUIT

POWER SUPPLY

__ p

OR MORY & PERIPHERALS

8

<> OUTSIDE WORLD

BUS - DATA ADDRESS CONTROL

Figure 2.1 Block diagram of a typical microcontroller system

The figure 2.1 shows the block diagram of a microcontroller unit (MCU). It's

has three basic parts. There are the central processing unit (CPU), memory and register.

Externally, it has pin for power, input/output (I/O), and some special signals. Most

microcontrollers today are based on the four (4) basic components required for an

embedded system. These include a CPU core, memory for the program (ROM or Flash

memory), memory for data (RAM), one or more timers, as well as I/O lines to

communicate with external peripherals and complementary resources and all this in a

single integrated circuit. A typical microcontroller will have a built in clock generator

and a small amount of random access memory (RAM) and read only memory (ROM),

meaning that to make it work, all that is needed is some control software and a timing crystal. [2]

Page 23: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

Microcontrollers will also usually have a variety of input/output (110) devices,

such as analog-to-digital converters, timers, or specialized serial communications

interfaces like Serial Peripheral Interface (SPI). Often these integrated devices can be

controlled by specialized processor instructions.

The central processing unit (CPU) controls the operation of the microcontroller.

For example of the 68HC1 1, the CPU is essentially equivalent to the 6800

microprocessor. Memory is where data and program code are stored. Physically there

are different types of memory, read-only memory (ROM), random access memory

(RAM), and electrical erasable programmable ROM (EEPROM). Some

microcontrollers Use erasable programmable ROM (EPROM) instead of ROM.

Register is used to handle specialized information. Essentially, register is the

equivalent of a workbench. It is a place where CPU works on modifies a binary number.

There are 110 register and CPU registers. There are three basic types of I/O register that

are data, control and status. Each 110 data register holds 110 data associated with its

corresponding 110 port. An I/O port is a collection of I/O pins on the chip that

represents a unit of data. Usually, I/O ports have eight (8) lines to transfer a byte of

data. These ports can be input only, output only, or programmable to be either. The

directions are always with respect to the chip. [2]

2.2.1 Plc 16F877 Microcontroller.

Microcontrollers are embedded devices having a central processing unit,

interrupts, counters, timers, I/O ports, RAM, ROMJEPROM which are used to control

Other systems. As their structures are based on CMOS technology. The integrated

Circuit used usually operates at 20 MHz clock frequency and runs each instruction as fast

as 200 nano second (us). It has eight 8K times fourteen (14) words of flash as a program memory and 256 byte erasable programmable read only memory (EPROM) as a data

Page 24: A WIRELESS TEMPERATURE MONITORING SYSTEMS ...

10

memory. As their structures are based on CMOS technology, PICs consume very less

energy.

The P1C16F877 has 33 I/O pins, divided into five (5) ports (Port A to Port E),

which can be configured in various ways to communicate with many different peripheral

devices. Port A has 6 pins, Port B to Port D each has 8 pins and Port E has 3 pins.

Many of these pins are multiplexed with more than one function. User can control the

function of each pin by writing the proper value to the appropriate special function

register. PlC 16F877 features 256 bytes of EPROM data memory, self programming,

eight (8) channels often (10) bit Analog-to-Digital (A/D) converter, two (2) additional

timers, two (2) capture and compare functions, the synchronous serial port can be

configured as either three (3) wire Serial Peripheral Interface or the two (2) wire Inter-

Integrated Circuit bus and a Universal Asynchronous Receiver Transmitter (USART).

All of these features make it ideal for more advanced level applications in automotive,

industrial and consumer applications. [5]

2.3 Microprocessor

A Microprocessor is a single integrated circuit (IC) that accepts and executes

coded instructions (machine code or machine language) for the purpose of manipulating

data and controlling the associated circuitry (RAM, ROM, and 110 ICs) in a digital

system.

It is also design as a device that integrates a number of useful functions into a

single IC package some functions are:

(i) Ability to execute a stored set of instructions to carry out user defined tasks.

(ii) Ability to access external memory chips to read/write data from/to memory.

(iii) Ability to interface with 1/0 devices