Project Report Subbmitted By: Automatic Temperature Control For High Performance Computer Room

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 53

AUTOMATIC TEMPERATURE CONTROL FOR

HIGH PERFORMANCE COMPUTER ROOM


PROJECT REPORT SUBBMITTED BY
Aredom Kalayu (RDEG/207/07)
Guesh Tensay (RDEG/449/06)
Melkamu Zewdie (RDEG/226/07)
Solomon mebrahtu (RDEG/325/07)
Under the guidance of Dr. Eristu Ygzaw
In partial fulfillment for the award of Degree
Of
Bachelor of Technology in Electronics Engineering
(Instrumentation Engineering)
At

DEFENSE UNIVERSITY COLLEGE OF ENGINEERING


BISHOFTU, ETHIOPIA
June,2019
CERTIFICATION
This is to certify that the thesis project entitled “AUTOMATIC TEMPERATURE CONTROL
FOR HIGH POWER COMPUTER ROOM” is the work carried out by AREDOM KALAYU,
GUESH TENSAY, MELKAMU ZEWDIE AND SOLOMON MEBRAHTU student of B.Tech,
Defense University College of Engineering, Bishoftu, during the year 2019. In partial fulfillment
of the requirement for the award of the Degree of Bachelor of Electronics Engineering and that
the project has not informed the basis for the award previously of any degree, associate ship,
fellowship or any other similar rule.

Advisor: Dr. Eristu Ygzaw Department Head: Maj. Samuel Amde

Signature……………………. Signature………………………….

Date…………………………. Date……………………………….

Examiners Signature

1.______________________ ____________________

2.______________________ ____________________

3.______________________ ____________________

i|Page
ACKNOWLEDGEMENT
First of all, we would like to thanks God the Almighty, for His blessings throughout our research
work to complete the work successfully. and we also want to express our deepest gratitude to
our advisors Dr. EristuYgzaw for the unwavering support and guidance throughout this Project.
We would also like to forward our heartfelt gratitude to our department for cooperation in giving
lab service and share ideas. We are also grateful to Cpl.Awot Dereje (Lecturer in Computer
Department Engineering,) and Cpl.Solomon Gezehagn (Lecturer in Electronics, Department
Engineering,) for they valuable supporting during our project simulations. And finally we would
like to express our sincere gratitude to everyone who supported the conduct of this project by
providing us benchmark information, direction, and insights to fulfill this project.

ii | P a g e
ABSTRACT
This project presents control of the temperature for the computer room based on automatic
temperature sensor. This is automatic system which controls the room temperature and controls
the circulation of temperature inside the room without human intervention. Automatic
temperature control is a microcontroller based circuit which is used to maintain a temperature
specified by the user. This project will be most helpful for data which store in the computer room
if the room temperature is higher than the set temperature. In this project of an automatic high
power computer room temperature Control system allows the user to set a reference
temperature which is then compared to the room temperature measured by a temperature
sensor. The temperature sensor will then sense the room temperature and communicates with
the microcontroller. With the help of a microcontroller, the system responds by turning ON and
OFF the air conditioner (AC) automatically depending on the temperature difference. So the air
conditioner is triggered ON when the room temperature is higher than the set temperature and
OFF when the room temperature is lower than the set temperature. The system was designed
and simulated using Proteus 8, PIC Microcontroller, and circuit building software used for building
electronics system. And MikroC hex file was loaded on the Proteus schematic design.

Keywords: PIC Microcontroller, LM35 temperature sensor, Liquid Crystal Display (LCD)

iii | P a g e
Table of Contents Page
Certification ....................................................................................................................................i

Acknowledgment............................................................................................................................ii
Abstract..........................................................................................................................................iii
Table of contents .......................................................................................................................... iv
List of Tables ................................................................................................................................. vi

List of Figures ............................................................................................................................... vii

List of acronyms .......................................................................................................................... viii

CHAPTER ONE ........................................................................................................................ 1

1. INTRODUCTION ................................................................................................................1
1.1 Back Ground .............................................................................................................................1

1.2Automatic Control Theory .................................................................................................. 2

1.2.1 Open Loop Control Theory …............................................................................2

1.2.2Closed Loop Control Theory …............................................................................ 2

1.1 Statement of theproblem.........................................................................................................5

1.2 Objective ................................................................................................................................. 5

1.2.1 General objective .................................................................................................... 5

1.2.2 Specific objective .................................................................................................... 5

1.3 Scope of the project..................................................................................................................6

1.4 Methodology ............................................................................................................................6

CHAPTER TWO ...................................................................................................................... 7

2. LETRATURE REVIEW ……................................................................................................. 7


2.1 Previous work...........................................................................................................................7

iv | P a g e
CHAPTER THREE.................................................................................................................... 9

3. PYSICAL SYSTEM OF MATHMATICAL MODELING A


COMPUTER ROOM FOR TEMPERATUR CONTROL ..........................................................9
3.1 Introduction of physical System Model Designing ...................................................................9

3.2 Differential Equation of Physical System ..............................................................................10

3.2.1 Electrical System ............................................................................................... 11

3.2.2 Analogues System ........................................................................................... ...12

3.3 Thermal System .................................................................................................................... 13

3.4 Transfer Function ...................................................................................................................16

3.5 Analysis of Controller Using Mat lab ......................................................................................18

CHAPTER FOUR ....................................................................................................................20

4. SIMULATION USING SOFTWARE ................................................................ …………20


4.1 Software Tools ........................................................................................................................20

4.1.1Portus software ...............................................................................................20

4.1.2Micro C ........................................................................................................... 21
4.2 System Block Diagram ........................................................................................................... 22

4.3 System Block Diagram Component Description .....................................................................22

4.3.1Pic microcontroller……. ......................................................................................... 22

4.3.1.1 General Organization of Pic 16F877A Microcontroller ...............................24


4.3.1 LM35 Temperature Sensor ................................................................................... ..27
4.3.2 Power Supply to The Pic ......................................................................................... 30
4.3.3 16×2 LCD Display ................................................................................................ ....30
4.3.4 DC Motor ................................................................................................................ 31
4.3.5 Motor Driver L293D IC ....................................................................................... …..32

v|Page
4.3.6 Buzzer .................................................................................................................... 32
4.3.7 Crystal Oscillator ................................................................................................... 33
4.4 Flow Chart Diagram ............................................................................................................... 34
4.5 Interfacing of Pic16F877A with External Device.................................................................. 34
4.5.1 Pin Description of Pic16F877A ............................................................................ 34
4.6 Circuit Diagram of A System ................................................................................................. 36
4.6.1 General Operation of the Circuit.......................................................................... 36

CHAPTER FIVE ..................................................................................................................….37

5.RESULT AND DISCUSSION .......................................................................................... 37


5.1 System Overview ...................................................................................................................37
5.2 Conclusion and Recommendation .........................................................................................39
5.2.1 Conclusion.......................................................................................................39
5.2.2 Recommendation........................................................................................... 39
Reference .....................................................................................................................................40

Appendix ......................................................................................................................................41

List of Tables

Table 1: Analogous Electrical and Mechanical Quantities………………………………………………………….13


Table 2:PIC16F877A Port Description………………………………………………………………………………………25
Table 3: Result and Analysis Using mat lab……………………………………………………… ……………………….37

vi | P a g e
List of figures
Figure 1.1: Shows Generalize Block Diagram of Feedback Control System ................................. 3
Figure 3.1: Shows block diagram of physical system model designing ......................................... 9
Figure 3.2: Shows Ideal Element ..................................................................................................11
Figure 3.3: Shows Parallel RLC Circuit excited by a Current Source. ....................................... ….11
Figure 3.4: Shows Defense Engineering College Server Room Model. ..................................... .14
Figure 3.5: Shows Thermal System Feedback Block Diagram of D.E.C Server Room Model. … …17
Figure 4.1: Shows Proteus design suite version 8.........................................................................20
Figure 4.2: Shows Block Diagram of Automatic Computer Room Temperature Control ........... 22
Figure 4.3: Shows PIC Microcontroller ........................................................................................ 23
Figure 4.4: Shows PIC16F877A Microcontroller Chip. ............................................................... 24
Figure 4.5: Shows LM35 Temperature Sensor .............................................................................28
Figure 4.6: Shows LM35 Interfacing with PIC Microcontroller .................................................. 28
Figure 4.7: Shows 16×2 LCD Display. ......................................................................................... 30
Figure 4.8: Shows Brushless Dc Motor. ....................................................................................... 31
Figure 4.9: Shows Motor Driver L293DIC................................................................................... 32
Figure 4.10: Shows Symbol of Crystal Oscillator ........................................................................ 33
Figure 4.11: Shows Flow Chart Diagram ..................................................................................... 34
Figure 4.12: Shows Pin Description of PIC16F877A Microcontroller ........................................ 35
Figure 4.13: Shows Circuit Diagram of A System. ...................................................................... 36
Figure 5.1: Shows snap Shoot Result of Simulation When Temperature is Greater than 16‟c. .38

vii | P a g e
List of Acronyms

ADC…….…………………. Analog to Digital Converter

AC………….………………. Air condoner

AT89C51 ………….………………. Atmel 89C51

CPU………….……………. Central Processing Unit

DC………….………………. Direct Current

DEC……….………………. Defense Engineering College

EEPROM…………………...Electrical Erasable Programmable Read Only Memory

GSM………………………. Global System Mobile

IC…………………………...Integrated circuit

I/O…………………………. Input output

LCD………………………...Liquid Crystal Display

MCLR……………………...Master Clear

MCU…………………….... Microcontroller unit

OSC………………………. Oscillator

PID…………………………Peripheral Integral Derivative

PWM………………………. Pulse Width Modulation

RLC………………………...Resistor, Inductor and Capacitor

USB………………….……. Universal Serial Bus

viii | P a g e
CHAPTER ONE

INTRODUCTION

1.1 Back ground

Generally, some electronic systems produce heat, while operating. The heat should be reduced
in order to keep the system performance, so the automatic temperature control is certified as
the best method in any application because the temperature is usually controlled automatically
(no human intervention involved) throughout the process. As the human civilization is being
modernized day by day the demand of automatic is increasing accordingly, because weather is
forever varying and changes on short intervals, and as a result, the external conditions always
have an influence on the room conditions, so the automatic control of many days to day tasks
relieves the human beings from performing repetitive manual operations.

The principle of automatic control is not a human being, executes the control action. Where a
control system is a system of devices or set of devices, that manages commands, directs or
regulates the behavior of other device(s) or system(s) to achieve desire results. The reason one
wishes to control a process is to have it behave in a desired way. Now the same operation of
measuring the temperature and estimating the error between the desired temperature and the
actual temperature, or error between the actual temperature and the desired temperature is
continuously obtained and used to activate the controller. This may involve the process becoming
more accurate, more reliable or more economic. In some cases, the uncontrolled process is
unstable and good control is necessary in order not to damage it (which sometimes can cause
extensive damage). Hence, good control can mean different things in different applications. The
control signal is adjusted automatically, by the controller, until the difference between the
references or set point (desired) value and the actual, measured value of the process variable is
sufficiently small. This difference is denoted the control error. Hence, automatic control is
obtained with error-driven control. [1]
This project uses a microcontroller to automatically control the temperature of an area. This area
could be research area, small plant, a house or any place or devices that require a controlled
temperature like an incubator (egg) system.

1|Page
1.2 Automatic control theory
An automatic controller compares the actual value of the plant output with the reference input
(set value), determines the deviation, and produces a control signal that will reduce the deviation
to zero or to a small value. Control systems can be classified as either open loop or closed loop.
1.2.1Open loop control system
In an open loop system, (a non-feedback control system) there is no means by which the output
is monitored by the system, or a system in which the output has no effect on the control action,
or control system. That mean no measurements are made at the output. For a given input the
system produces a certain output. If there are any disturbances, the output changes and there is
no adjustment of the input to bring back the output to the original value. A traffic control system
is a good example of an open loop system. The signals change according to a preset time and are
not affected by the density of traffic on any road. This control type is simple and easy to build,
cheaper, as they use, less number of components to build and usually stable. But this open loop
control system is less accurate, if external disturbances are present, output differs significantly
from the desired value. [2]
1.2.2 Closed Loop Control Systems
A closed loop system has a feedback path from the output of the controlled process to the input
of the control system allowing the output to be monitored. These are also called feedback control
systems. A system which maintains a prescribed relationship between the controlled variable and
the reference input, and uses the difference between them as a signal to activate the control.
The output or the controlled variable is measured and compared with the reference input and an
error signal is generated. This is the activating signal to the controller which, by its action, tries to
reduce the error. Thus the controlled variable is continuously feedback and compared with the
input signal. If the error is reduced to zero, the output is the desired output and is equal to the
reference input signal. A feedback control system is represented as an interconnection of blocks
characterized by an input output relation.

2|Page
Fig1.1 Shows Generalize Block Diagram of feedback Control System

The input to the entire system is called as a reference input or a command input, r (t). An error
detector senses the difference between the reference input and the feedback signal equal to or
proportional to the controlled output. The feedback elements measure the controlled output and
convert or transform it to a suitable value so that it can be compared with the reference input. If
the feedback signal, b (t), is equal to the controlled output, c (t), the feedback system is called as
unity feedback system. The difference between the reference input and the feedback signal is
known as the error signal or actuating signal e (t), this signal is the input to the control elements
which produce a signal known as manipulated variable, u (t). This signal manipulates the system
or plant dynamics so that the desired output is obtained. The controller acts until the error
between the output variable and the reference input is zero. The major advantage of feedback
system is that it is insensitive to external disturbances and variations in parameters.
Comparatively cheaper components can be used to build these systems, as accuracy and
tolerance, and do not affect the performance. [3]

3|Page
I. Reference input or a command input, r(t)
It is the actual signal input to the control system is an external signal applied to a
feedback control system in order to command a specified action of the plant; it
often represents ideal plant output behavior.
II. And Summing Point
Isa circle with a cross is the symbol that indicates a summing operation. The plus
or minus sign at each arrow head indicates whether that signal is to be added or
subtracted.
III. Actuating signal (error signal) e(t)
The difference between the reference input and the feedback signal is called as
the error signal or actuating signals.

IV. Controller
An automatic controller compares the actual value of the plant output with the
reference input, determines the deviation, and produces a control signal that will
reduce the deviation to zero or to a small value. And the manipulated variable is
the quantity of the condition that is varied by the controller so as to affect the
value of controlled variable

V. Plant or system
The Plant or system is the device, process, or system that needs to be controlled,
controlled system of which a particular quantity or condition is to be controlled.

VI. Feedback signal


It is the measure of the output signal, and system which compares output to some reference input
and keeps output as close as possible to this reference. The feedback elements measure the
controlled output and convert it to a suitable value and it can be compared with the reference
input.
VII. Control output (c)
The final element is Controlled variable (output) Quantity or condition of the plant
which is controlled the quantity that must be maintained at prescribed value.
4|Page
1.3 Statement of the problem
Most of the time it is difficult to adjust the room temperature level using manually when the
computer room temperature changes, and in most time the electrical devices control and
operation in Ethiopia is predominantly manual control. Since the data and documents store in
the computer have been lost as a result of this, and the problem happens when the temperature
is uncontrolled and must be manually turned ON and OFF the fun. Sometimes it can lead to high
usage of temperature from the computer room, because computers itself generate high amount
of heat in a limited space, and the data store have lost. One of these limitations is when the
temperature is still functioning in the computer room although the function is uncontrolled and
must be manually control by the user. And also the user has to adjust the system every time the
external conditions change. This is very tiring and proves out not to be an effective way of
controlling temperature of a room.

1.4 Objective
1.4.1 General objective
The main objective of this project is to control the temperature in the high power computer
room using PIC -microcontroller.

1.4.2 Specific objective


To realize the general objective of this work, the following sub-tasks are performed
1. Measure the room temperature by using temperature sensor
2. Read data from temperature sensor which will be displayed on LCD
3. Analysis using Mat lab

5|Page
1.5 Scope of the project
To design and develop an automatic temperature control for computer room using pic
microcontroller, project scopes need to be defined for assist and guide the development of the
project. The main scopes for this project are:

 Data collection: Collect necessary data through literature review on existing control systems,
microcontroller, sensor, driven motor and circuit design.
 Design electronics system: Design a circuit diagram.
 Programming and Testing: Build the complete set of program for pic microcontroller unit and run the
testing for the complete automatic control temperature for computer room.

1.6 Methodology
For successful completion of this project some steps have been followed to carry out different
tasks. We started with the problem, and we tried to identify and view previous works on
automatic controls. After that we made our specification and proposed the automatic
temperature control for high power computer room. And we have to design the software
prototype.

I. Identify the problem


II. System model design
III. Revise literature
IV. Simulation based on the model

6|Page
CHAPTER TWO
LITERATURE REVIEW

2.1 Previous work


Many research articles and papers were reviewed before finalizing the objectives for this project.
Some of the main papers reviewed are discussed below:
1. MustafaSaad (2014), Automatic Fan Speed Control System using Microcontroller Technology.
This project is Automatic control vast technological area whose central aim is to develop control
strategies that improve performance when they applied to a system. The fans are generally
available with speed control and depending on the requirement the speed is set. Usually, when
the temperature is high the fan set at high speed and at lower temperatures the fan is operated
with lower speed. However, this system is focused only on the speed of the fun but it is not
control the temperature when it is randomly increased in the room. [4]
2.ArunBera, and Sonal Kumar, (2011), Automatic Temperature Control with cooling system using
microcontroller, this project is designed to control the room temperature automatically for those
temperature sensitive instruments and any other industrial applications. This automatic control
is used microcontroller AT89S52. But this is need to Analog to Digital Converter in order to
convert the device in to electrical system. [5]
3.Okpagu, P.E. &Nwosu, A.W. Development and temperature control of smart egg incubator
system for various types of egg. This work is aimed at modeling, designing and developing an egg
incubator system that is able to incubate various types of egg within the temperature range of
35 – 400C. This system uses temperature and humidity sensors that can measure the condition
of the incubator and automatically change to the suitable condition for the egg. Mathematical
model of the incubator was developed using Mat lab Simulink. But the deference with our project
are, entire element is controlled using AT89C52 Microcontroller, [6] ] Based on the literature
review we replace the microcontroller by pic microcontroller in order to decrease extra additional
circuit ADC converter because pic microcontroller have consisted of ADC port.

7|Page
3. Abu-Bakr Muhammad Auwal (2017), Microcontroller Based Automatic Temperature
Controller. This project presents, a microcontroller based automatic temperature controller. The
system is based on PIC16F877A microcontroller interfaced with LM35 temperature sensor, LCD,
switching transistors and relays. This aim is used to control using microcontroller in turns
automatically switches on/off a heater or a fan based on the result of the comparison. But it not
control for the high power computer room specifically, because, in the high power computer
room, the heater is generated heat at any time. [7]
4. Gaurav S. Ashara, Dipesh S.Vyas, design and simulation of temperature control of chamber
based on automatic fun speed control. This project aim is to create an automatic fan system that
can monitor the box temperature and compare with set value using a temperature sensor.
Where, electric fan automatically switches the speed according to change inner temperature of
the box. The system uses LM35 temperature sensor, 89C51 microcontroller, fan interface circuit
and the box model, to apply in this function. But in our project we have used server room model
system and PIC microcontroller to control the temperature. [8]

8|Page
CHAPTER THREE
PHYSICAL SYSTEMS OF MATHEMATICAL MODELING

COMPUTER ROOM FOR TEMPERATURE CONTROL


3.1 Introduction of physical system model designing
In order to analysis, designing, or synthesize a complex system a physical model has to be obtained, and also
it depends up on the specific problems. Idealizing is an assumption made for purpose of analysis and
synthesis of a system,

Fig.3.1 Shows block diagram of physical system model designing

Whenever a task is to be performed, a set of physical objects are connected together and a suitable input is
given to them, to obtain the desired output. This group of objects is usually termed as the system. In order
to analyses, design or synthesize a complex system, a physical model has to be obtained, no physical system
can be represented in its full physical intricacies and therefore idealizing assumption are always made for
the purpose of analysis and synthesis of a system. A physical system can be modeled in number of ways
depending up on the specific problem to be dealt with and the desired accuracy. For example, an electronic
amplifier may be modeled as interconnection of linear lumped elements, or some of these may be pictured
as nonlinear elements in case the stress is on the distortion analysis. A communication satellite may be
modeled as a point, a rigid body or a flexible body depending up on the type of the study to be carried out.
As idealizing assumption are gradually removed for obtaining a more accurate model. Once a physical model
of a physical system is obtained, the next step is to obtain a mathematical model which is the mathematical
representation of the physical model through use of appropriate physical laws. Depending upon the choice
of variable and the coordinate system, accurate model. Once a physical model of a physical system is
obtained, he next step is to obtain a mathematical model which is the mathematical accurate model. Once
a physical model of a physical system is obtained, the next step is to obtain a mathematical model which is
the mathematical representation of the physical model through use of appropriate physical laws. Depending
upon the choice of variable and the coordinate system, a given physical model may lead to different
mathematical model.

9|Page
And this physical model may be a simplified version of the more complex system. The behavior of
this physical model is then described in terms of a mathematical model so that known techniques
of mathematical analysis can be applied to the given system. [9]

3.2 Differential Equation of Physical Systems

This is the method of obtaining differential equation models of physical systems by utilizing the
physical laws of process. Depending up on the system well-known physical laws like Newton’s
laws, Kirchhoff’s laws, etc. will be used to build mathematical models. Mathematical models of
most physical elements are characterized by differential equations. And a mathematical model is
linear, if the deferential equation describing it has coefficients, which are either function only of
the independent variable or are constant. On the other hand, if the coefficients of the describing
differential equations are constant, the model is linear time-invariant. We shall in first step build
the physical model of the system as interconnection of idealized system elements and describe
these in form of elemental laws. These idealized elements are sort of building blocks of the
system. An ideal elements result by making basic assumptions.
I. Spatial distribution of the element is ignored and it is regarded as a point phenomenal.
Thus mass which has physically dimensions, is considered concentrated at a point and
temperature in a room which is distributed out into the whole room space is replaced by
a representative temperature as if a single point in the room. The process of ignoring the
spatial dependence by choosing a representative value is called lumping and the
corresponding modeling is known as lumped-parameter modeling as distinguished from
the distributed parameter modeling which accounts for space distribution.

II. We shall assume that the variable associated with elements lie in the range the element
can be described by simple linear law of (1) a constant of proportionality or (2) a first
order derivative or (3) a first-order integration, to begin with we shall consider ideal
elements which have a single-port or two terminal representations and so have two
variables associated with it as shown below.

10 | P a g e
1. Through variable VT: - which sort of passes through the element and so has the same

value in at one port and out at the other. Example current through an electrical resistance.

Fig 3.2 Shows ideal element

2. Across Variable VA: - which appears across the two terminals of the element, for

example voltage across the electrical resistance.

3.2.1 Electrical Systems


Most of the electrical systems can be modeled by three basic elements, Resistor, inductor, and
capacitor. Circuits consisting of these three elements are analyzed by using Kirchhoff's Voltage
law and Current law. Consider the parallel RLC network excited by a current source below and
find the (a) differential equation representation and (b) transfer function representation of the
system.

Fig 3.3 Shows Parallel RLC Circuit Excited by a Current Source

11 | P a g e
(a)Applying Kirchhoff's current law at the node,

(1)

Replacing d (t) by , the flux linkages, we have,

(2)

(b) Taking Laplace transform of eqn. (2). We have,

(3)
If the voltage is taken as the output, taking Laplace transform of eqn. (1), we get

3.2.2 Analogous systems

Analogous systems have the same type of equations even though they have different physical
appearance. Mechanical systems, fluid systems, temperature systems etc. may be governed by
the same types of equations as that of electrical circuits. In such cases we call these systems as
analogous systems. A set of convenient symbols are already developed in electrical engineering
which permits a complex system to be represented by a circuit diagram. The equations can be
12 | P a g e
written down easily for these circuits and the behavior of these circuits obtained. Thus if an
analogous electrical circuit is visualized for a given mechanical system, it is easy to predict the
behavior of the system using the well-developed mathematical tools of electrical engineering.
Designing and constructing a model is easier in electrical systems. The system can be built up with
cheap elements, the values of the elements can be changed with ease and experimentation is
easy with electrical circuits. Once a circuit is designed with the required characteristics, it can be
readily translated into a mechanical system. It is not only true for mechanical systems but also
several other systems like acoustical, thermal, and fluid and even economic systems.

Table 1: Analogous Electrical and Mechanical Quantities


Mechanical system
Electrical system Translational Rotational
Voltage V Force F Torque T
Current I Velocity U Angular velocity
Charge Q Displacement X Angular displacement
Inductance L Mass M Moment of inertia J
Capacitance C Compliance Compliance
Resistance R Damping coefficient B Damping coefficient B

3.3 Thermal Systems


The basic requirement for the representation of the thermal system by linear models is that the basic
temperature of the medium be uniform which is generally not the case, thus for precise analysis a
distributed parameter model must be used. Here, however, in order to simplify the analysis, uniformity of
temperature is assumed and there by the system is represented by a lumped parameter model. Thermal
systems are those systems in which heat transfer takes place from one substance to another. They can be
characterized by thermal resistance and capacitance, analogous to electrical resistance and capacitance.
Thermal system is usually a nonlinear system and since the temperature of a substance is not uniform
throughout the body, it is a distributed

13 | P a g e
system. But for simplicity of analysis, the system is assumed to be linear and is represented by Lumped
parameters model. Thermal systems may be analyzed in terms of resistance and capacitance, although the
thermal capacitance and thermal resistance may not be represented accurately as lumped parameters.
Substances that are characterized by resistance to heat flow have negligible heat capacitance, and that
substances that are characterized by heat capacitance have negligible resistance
to heat flow. [10]
Consider from the thermal system shown fig 3.4 assume that the room is insulated to eliminate
heat loss to the surrounding air, there is no heat storage in the insulation and the computer in
the room is kept at uniform temperature. Thus single temperature may be used to describe the
thermal state of the entire temperature. If there is high temperature present so, there is a
complex temperature distribution through the computer and the problem becomes one of the
distributed parameters, requiring the use of partial differential equations. Assume that the
steady-state temperature of the reference (set-point) is , and that of the output from
computers room temperature is the steady-state heat input rate from the heater is H. To obtain
a linear model we shall use small-signal analysis.

Fig.3.4 Shows D.E.C. Server Room Model

14 | P a g e
Let ) be a small increase in the heat input rate from its steady-state value. This increase
in heat input rate will result in increase of heat output rate by an amount and a heat stroge
rate of the computer in the room by an amount . Consequently the temperature of the
computer in the room and therefore of output temperature rises by . Since the insulation
has been regarded as perfect, the increase in output rate is only due to the rise in temperature
of the output rate temperature is given by
= /R (1)

Where R =1/Qs, is defined as the thermal resistance and has units of /J/min.So the rate of heat
storage in the room is given by

Where C =MS, is defined as the thermal capacitance and has the units of J . From the differential
equations the heat flow balance is
+

= /R + C
R( ) =RC

Equation (3) describes the dynamic of the thermal system with the assumption that the
temperature rate temperature inflowing to the room is constant. The along with a heat input
signal from the Computers, there is an additional signal due to changing in the temperature of
the room which is known as disturbance signal.
Let i be change in the temperature of the room from the steady-state value. Now in addition
to the change in heat input from the Computers, there is a change in heat carried by the rate
temperature in the room. Therefore the heat flow equation becomes

+ /R= /R+ C

RC

Let as now relax the assumption that the room insulation is perfect. As the set temperature
increases by , the rate of heat flow through the room to the ambient medium increases by
15 | P a g e
Where Rt is the thermal resistance of the room, so the equation (4) is modified to

Or

R’C ) (6)

Where R’ = - is the effective thermal resistance due to temperature outflow and room
(Its parallel combination of R and Rt’)
3.4 Transfer Functions
The transfer function of a linear time-invariant system is defined to be the ratio of the Laplace
transform of the output variable to the transform of the input variable under that initial
conditions are zero. It describes the input output behavior of the system and does give any
information concerning the internal structure of the system. Thus when the transfer function of
a physical system is determined, the system can be represented by a block, which is a short-band
pictorial representation of the cause and effect relationship between input and output of the
system. The functional operation of the system can be more readily visualized by examination of
a block diagram rather than by the examination of the equation describing the physical system.
Therefore when working with a linear-time-invariant system, we can think of system or its sub-
system simply as interconnected block with block described by a transfer functions. So the
Laplace transforming, and the transfer function of the thermal system is:

The highest power of the complex variable s in the denominator of the transfer function determines the
order of the system. So the block diagram representation of the system is shown in the fig. 3.5a below
when the system is subjected to a disturbance, the dynamic is describes by equation (4) taking the Laplace
transformation of this equation, we get

(RCs + 1) = +R (8)
16 | P a g e
The corresponding block diagram representation is given in the fig 3.5b

Fig.3.5 shows the thermal system feedback block Diagram of D.E.C server room model

17 | P a g e
3.5 Analysis of Controller using Mat lab

R C Step response
TF
num = [0 0.3 ]; 0.5 3 Settling time
% Numerator: s is 8 seconds
den = [1.5 1 ]; %
Denominator: s^2 +
2 s + 10
H = tf(num, den)
>> TFT

H=

0.3
---------
1.5 s + 1

Continuous-time
transfer function.
>> step(H);
>> grid
num = [0 1 ]; % 1 6 30 seconds
Numerator: s
den = [6 1 ]; %
Denominator: s^2 +
2 s + 10
H = tf(num,den)
>> TFT

H=

1
-------
6s+1

Continuous-time
transfer function.
>>step(H)
18 | P a g e
num = [0 2 ]; % 2 4 42 seconds
Numerator: s
den = [8 1 ]; %
Denominator: s^2 +
2 s + 10
H = tf(num,den)
>> TFT

H=

2
-------
8s+1

Continuous-time
transfer function.
>> step(H);
>> grid
>>
>>num = [0 3 ]; 3 4 60 seconds
den = [12 1 ];
H = tf(num,den)

H=

3
--------
12 s + 1

Continuous-time
transfer function.

>> step(H); grid

19 | P a g e
CHAPTER FOUR
SIMULATION USING SOFTWARE
4.1 Software Tools

4.1.1 Proteus software


Proteus is a virtual system modeling (VSM) that combines circuit simulation, animated
components and microprocessor models to co-simulate the complete microcontroller based
designs. Proteus provides a comprehensive and powerful environment for performing full-chip
proximity correction, building models for correction, and analyzing proximity effects on corrected
and uncorrected IC layout patterns. It is mainly popular because of availability of almost all
microcontrollers in it. So it is a handy tool to test programs and embedded designs for electronics.
It is easily possible to simulate the result of programming of microcontroller in Proteus simulation
software. So this software is adequate to show the simulation result of practically implementable
to design and simulate electronic circuits. [11]

Fig.4.1 Shows Proteus Design Suite Version 8

Benefits
 Production-proven performance and superior quality of results
 Fully pipelined tape out flow to efficiently utilize expensive hardware resources
 The most accurate, easy to use and flexible modeling environment
 Senators Lithography rigorous simulation interfaces within Proteus
 manufacturing tools
 Best cost of ownership through the use of optimized general purpose hardware
 Core technology uniquely connects manufacturing information to design
20 | P a g e
Features of Proteus design suit v 8.0
 A new application framework lets you view models of Proteus as tabs a single window
or, via drag and drop, as separate windows for a side-by-side view.
 A new common parts database enables sharing of information between schematic and
PCB so that changes to data is instantly reflected across the software.
 A new live net list means changes to connectivity in the schematic can be instantly
reflected on the PCB, the bill of materials and the design explorer.

4.1.2 MikroC
Software tools Micro C compiler is used to edit and compile C code for PIC16F877A.It is designed
to provide the programmer with the easiest possible solution to developing application for
embedded system. Also help to testing the code. MikroC is a powerful, feature rich development
tool for PIC microcontrollers. The software is written in C‟‟ language using mikroC compiler. The
source program is converted into hex code by the compiler.PIC and C fit together well.PIC is the
most popular 8-bit chip in the world used in a wide variety of application, and C prize for its
efficiency, is the natural choice for developing embedded system. [12]

Features of MikroC
 Write C source code using the highly advanced code editor.
 Use the included MikroC libraries to dramatically speed up the development, data
acquisition, memory, displays, conversions & communications
 Monitor program structure, variables, and functions in the Code Explorer.
 Generate commented, human-readable assembly and standard hex Compatible with all
programmers.
 Inspect program flow and debug executable logic with the integrated

21 | P a g e
4.2 System Block Diagram

Fig.4.2 Shows Block Diagram of Automatic Computer Room Temperature Control

4.3 System Block Diagram Component Description

4.3.1 PIC Microcontroller

The name PIC initially referred to "Peripheral Interface Controller". A programmable Interface
Controller (PIC) microcontroller is a single chip computer. A programmable interface controller
is also a solid state control system that continuously monitors the status of devices connected as
inputs. Based upon a user written program, stored in memory, it controls the status of devices
connected as outputs. It has the functions of reading the data available at the sensor output, send
the data to the LCD display and operate the other motor in case of any faults in the belt. The
PIC16F877A is one of the PIC Micro families of microcontrollers which are currently popular
among professionals and hobbyists alike. This is because the PIC16F877A is easily programmed
and with the flash memory technology allows up to a thousand re-writes. The superiority of this

22 | P a g e
microcontroller compared with others within its peer group show that the PIC has the speed and
flexibility for many uses, from automotive industries and controlling home appliances to
industrial instruments, remote sensors, electrical door locks and safety devices. It is also ideal for
smart cards as well as for battery supplied devices because of its low consumption. [13]

Fig.4.3 Shows PIC Microcontroller

We are using this particular series of PIC microcontroller because

 It is very simple yet very powerful to use


 It can be programmed and reprogrammed numerous times
 It is small in size while have sufficient input/ output ports
 Wide range of interfaces including USB, A/D, programmable comparators, PWM, etc.
 It has low current consumption
 It has on board multichannel analog to digital convertor
 PICs are popular with both industrial developers and hobbyists alike due to their low
cost, wide availability, large user base, and extensive collection of application notes.
 Availability of low cost or free development tools, and serial programming (and
reprogramming with flash memory) capability.

Limitation of the pic microcontroller:


 A disadvantage of the device is that it has no internal oscillator so we will need an
external crystal of other clock source.

23 | P a g e
4.3.1.1 General Organization of PIC16F877A Microcontrollers
The PIC16F877A microcontroller is the heart of the entire system. It takes the inputs from the
LM35 temperature sensor to measure the current computer room temperature. This controller
is widely used for experimental and modern applications because of its low price, wide range of
applications, high quality, and ease of availability. and the Microcontroller (PIC16F877A) is a low
power, high performance CMOS 8-bit micro controller with 8kbytes of flash programmable and
256byte of read only memory data (EEPROM). The on-chip flash allows the program memory to
be reprogrammed in-system or by a conventional non-volatile memory programmer. By
combining a versatile 8-bit CPU with flash on a monolithic chip, the PIC16F877A is a powerful
microcomputer, which provides a highly flexible and cost-effective solution to many embedded
control applications. PIC16F877A have 40-pin with each pin has been assigned a number of
functions.

Fig.4.4 Shows Pic16F877A Microcontroller Chip

The specific function of a pin is selected by configuring various bits of internal registers.
Microcontroller has a number of input/output pins which are used for connection with external
devices. It has total 40 pins. Out of these 40 pins, 33 pins can be used as input output pins. PIC
16F877 has 5 basic input/output ports. They are usually denoted by PORT A, PORT B, PORT C,
PORT D, and PORT E. these ports are used for input/output interfacing.
24 | P a g e
Where, the figure of chip is shown fig.4.4. By using this controller, the data inputs from the
temperature sensor is passed to the parallel port of the microcontroller and accordingly the
program responds. This microcontroller could be used in controlling the temperature according
to the computer room temperature sensor. Some pins of the I/O ports are multiplexed with an
alternate function from the peripheral features on the device. If a pin is used as any other
function, then it may not be used as a general purpose I/O pin. Here we will just restrict with the
input output features of ports. [14]
Table 2: PIC16F877A port description,
Port Pin number Bit wide(bit)
Port a RA-0 to RA-5 6
Port b RB-0 to RB-7 8
Port c RC-0 to RC-7 8
Port d RD-0 to RD-7 8
Port e RE-0 to RE-2 3

1. PORTA and the TRISA Registers


PORTA is a 6-bit wide bi-directional port. The direction of this port is controlled by TRISA data
direction register. Setting a TRISA (=1) makes corresponding PORTA pin as an input, clearing the
TRISA (=0) making the corresponding PORTA pin as an output. Pin RA4 is multiplexed with the
“Timer0” module clock input to become the RA4/T0CKI pin and functioning either input/output
operation or Timer 0 clock functioning module.

2. PORTB and the TRISB Registers


PORTB is also an 8-bit bi-directional PORT. Its direction controlled and maintained by TRISB data
direction register. Setting the TRISB into logic „1‟ makes the corresponding “PORTB” pin as an
input. Clearing the TRISB bit make PORTB as an output.

3. PORTC and the TRISC Registers


PORTC is an 8-bit wide. It is bidirectional PORT which controlled and maintained by TRISC data
direction register. Setting a TRISC bit (= 1) will make the corresponding PORTC pin an

25 | P a g e
input (i.e., put the corresponding output driver in a High-Impedance mode). Clearing a TRIS C bit
(= 0) will make the corresponding PORTC pin an output PORTC is also multiplexed with several
peripheral functions. PORTC pins have Schmitt trigger input buffers.

4. PORTD and TRISD Registers


PORTD is an 8-bit PORT with bi-directional nature. This port also with Schmitt Trigger input
buffers, each pin in this PORTD individually configurable as either input or output. PORTD can be
configured as an 8-bit wide microprocessor PORT (functioning as Parallel Slave PORT) by setting
control bit.

5. PORTE and TRISE Registers

PORTE has only three pins which are individually configurable as inputs or outputs. These pins
controllable by using its corresponding data direction register “TRISE” and have Schmitt Trigger
input buffers. TRISE register which also controls the Parallel Slave PORT operation. PORTE pins
are multiplexed with analogue inputs. When selected for analogue input, these pins will read as
„0‟s. TRISE controls the direction of the RE pins, even when they are being used as analog inputs.
The user must make sure to keep the pins configured as inputs when using them as analog inputs.

6. MCLR
Master clear (reset) input is connected to pin 1. This pin is an active low to the device. This pin is used to
erase the memory locations inside the PIC (i.e. when we want to re-program it).In normal use it is
connected to the positive supply rail.

7. OSC1/CLK IN and OSC2/CLKOUT


These are crystal oscillator input and output and are connected to pins 13 & 14 respectively.
These pins are where we connect an external clock, so that the microcontroller has some kind of
timing. These are connected to crystal or resonator in crystal oscillator mode. The crystal
oscillator used in the electrical circuit connection is shown below.

26 | P a g e
Features of PIC16f877
 Maximum operating frequency is 20MHz
 Flash program memory (14 bit words), 8KB
 Data memory (bytes) is 368
 EEPROM data memory (bytes) is 256
 5 input/output ports
 3 timers
 2 serial communication ports (MSSP, USART)
 PSP parallel communication port
 10bit A/D module (8 channels) Special features:

 Hundred thousand times erase/write cycle enhanced memory


 Self-programmable under software control
 In-circuit serial programming and in-circuit debugging capability
 Single 5v, DC supply for circuit serial programming
 Programmable code protection
 Power saving sleep modes
 Selectable oscillator option

4.3.2 LM35 Temperature Sensor


LM35 is precision integrated-circuit temperature devices with an output voltage linearly
proportional to the Centigrade temperature. It is small in size and very cheap as compare to other
temperature sensors. Its range of measuring lies between -55 to 150 degree centigrade. This is a
device which converts the physical signal into electrical signal. That’s why this is known as the
transducer. Minimum temperature that can be measured by the LM35 device is -55°C. And
maximum temperature that can be measured by LM35 is 150°C. LM35 feed the microcontroller
with an analog temperature voltage that is measured from the room. This analog signal is then
converted to digital signal in the microcontroller because the microcontroller can only interpret
digital data. LM 35 is connected to PORT A on the micro-controller because PORTA is Analog input
pin by default. The temperature sensor used in this proposed system is LM 35.

27 | P a g e
Fig.4.5 Shows LM35 Temperature Sensor
It is a 3- pin analog temperature sensor which has high precision than mostly available sensors.
The Pin-1 senses the temperature in the surroundings and gives output as a Voltage through Pin2.
The main advantage of using this sensor is that it can be operated at any harsh and extremely hot
climatic conditions. To make the interfacing of control circuitry and readout circuitry very easy,
low impedance at output side, output which is linear and precise inherent calibration of
LM35 plays an important role. Temperature sensor takes a very low current of order 60 μA from
the input supply. Heat loss in the LM35 is very less degree of around 0.1°C. For the calibration of
the temperature sensor, we use the linear modeling approach. As it was used as a basic
temperature sensor, any change in temperature by 1 °C is converted to 10 mV. The maximum
voltage readout of the temperature sensor was 1 V corresponding to 100 °C. This was then used
as a reference in programming the microcontroller. Hence for every 1-degree increase in
temperature there will be a increment of 10m volt in output voltage of LM35 sensor.
PIC16F877A microcontroller is used to measure analog voltage value. [15]

PIC16F877A
LM3 5 Analog signal MC U
sensor
s sensor ADC C chan
h
S nel l
Temperature

Fig.4.6 Shows LM35 interfacing with PIC microcontroller·

28 | P a g e
PIC16F877A microcontroller built in ADC (analog to digital converter) is used to measure analog
voltage. The figure above shows the interfacing between the LM35 sensor and the pic
microcontroller devices. PIC16F877A PORTA has six built in ADC channels. The general equation
used to convert output voltage to temperature is:

Temperature (°C) =Vout (100°C/VT) (1)

Or

Vout=Temperature (°C) × (VT/100°C) (2)

Where VT is the supply voltage and Vout, is the output voltage of the LM35 temperature sensor.
Though, from our code, we have declared how this temperature is going to be read and
converted.

In choosing a temperature sensor the following factors are taken into account

 You can measure temperature more accurately than using a thermistor.


 The sensor circuitry is sealed and not subject to oxidation.
 The LM35 generates a higher output voltage than thermocouples and may not
require that the output voltage be amplified.
 The LM35 does not require any external calibration. It can be used with single
power supplies, or with plus and minus supplies
 High sensitivity 10mV/ C
 Easy to interface
 Low cost
 Low power consumption supplies available for sensor Special features of
LM35

 It has an output voltage that is proportional to the Celsius temperature.


 The scale factor is .01V/oC
 The LM35 does not require any external calibration or trimming and maintains
an accuracy of +/-0.4oC at room temperature and +/- 0.8oC over a range of 0oC
to +100oC.
29 | P a g e
 Another important characteristic of the LM35 is that it draws only 60 micro
amps from its supply and possesses a low self-heating capability. The sensor
self-heating causes less than 0.1 oC temperature rise in still air.
 The output voltage is converted to temperature by a simple conversion factor.
 The sensor has a sensitivity of 10mV/oC. Use a conversion factor that is the
reciprocal that is 100oC/V.

4.3.3 Power supply to the PIC


The power supply of a PIC is from 3.5v Dc up to 5v Dc. So to get this voltage from 240 AC voltages
we need a step down transformer, a rectifier and a regulator IC. The complete circuit is shown
below. The Power supply available mostly is 240V AC. But this power is converted to +5V DC since,
the optimal input power for the PIC Microcontroller is +5V DC. This is made possible by means of
a Converter consisting of various power electronic devices. The power supply was designed Most
of the components operates on 5 V DC, while the motor driver operating at 12 V were used,
hence the need to step down the normal power supply voltage from mains (Approx. 240 V AC),
to a reasonably voltage that will have to be rectified (convert to DC) and further filter to remove
unwanted pulsation.
4.3.4 LCD Display
LCD is used to show alpha numeric characters. In this project LCD we use is 16×2 which means
we can display 16 characters in two lines. LCD is used to show the reference temperature and
actual temperature, In order to display the room temperature.

Fig.4.7 Shows 16x2 LCD

30 | P a g e
The LCD has many advantages, such as low consumption, small Volume, rich contents displayed,
delicate and thin etc. It has been widely used in many kinds of meters and other low consumption
systems. It is integrated with PIC16F877A MCU. A liquid crystal display or LCD is combination of
two states of matter, the solid and the liquid. LCD uses a liquid crystal to produce a visible image.
[16] Advantage of LCD‟s:
 LCD‟s consumes less amount of power compared to CRT and LED
 LCD‟s are consist of some microwatts for display in comparison to some mill

watts for LED‟s

 LCDs are of low cost  Provides excellent contrast

 LCD‟s are thinner and lighter.

4.3.5 DC motor
It is used to reduce temperature to our desire temperature; the dc motor used in this project is
a Brushless DC motor. The cooling fan starts to operate whenever there is abnormal or a high
temperature is present in the computer room. The operating voltage of the Brushless DC motor
is 8V to 12V. It operates when the LM 35 senses high temperature and initiates the PIC
microcontroller to act accordingly.

Fig.4.8 shows brushless DC Motor


Brushless DC Motors are commutated electronically; they do not use brushes so called brushless
DC motor. These motors provide better speed versus torque characteristics, noiseless operation
and high efficiency over brushed DC motors

31 | P a g e
4.3.6 Motor driver L293D IC
A motor driver is an electrical switch that uses an electromagnet to move the switch from the off
to on position instead of a person moving the switch. Motor drivers are either current amplifiers
or pulse sequencers or both. They are used to drive the motors and prevent the microcontroller
from getting burnt. of that current that’s why we are selected L293D driver IC. We could reduce
the voltage needed to turn off the transistors from12V.The L293D is a 16 pin IC which is known
for their efficiency in controlling DC motors.

Fig.4.9 Shows Motor Driver L293D IC


Motor drivers act as current amplifiers since they take a low-current control signal and provide a
higher-current signal. This higher current signal is used to drive the motors. Enable pins 1 and 9
(corresponding to the two motors) must be high for motors to start operating. When an enable
input is high, the associated driver gets enabled. As a result, the outputs become active and work
in phase with their inputs. Similarly, when the enable input is low, that driver is disabled, and
their outputs are off and in the high-impedance state.

4.3.7 Buzzer
Buzzer is an electrical device, which is similar to a bell that makes a buzzing when the room
temperature is above the reference value the buzzer is ON. To interface a buzzer the standard
transistor interfacing circuit is used; because the transistor is used as a switch to control the
buzzer. And power supply must be connected to provide a common reference. If a battery is used
as the power supply, it is worth remembering that Pezos sounders draw much less current than
buzzers. Buzzers also just have one tone, where as a Pezos sounder is able to create sounds of
many different tones.
32 | P a g e
4.3.7 Crystal Oscillators
A quartz crystal determines the frequency at which an oscillator works. When a direct current is
applied, these crystals vibrate at a frequency that depends on its thickness value and on the
manner in which it is cut from the original mineral rock. To determine the frequency, some
oscillators employ combinations of inductors, resistors, and capacitors. But, the use of quartz
crystals gives the best stability (constancy of frequency) in oscillators. In a computer the clock
serves as a sort of pacemaker for the microcontroller. The clock is nothing but a specialized
oscillator. The clock frequency (also called as clock speed) is usually specified in megahertz (MHz)
frequency.

Fig. 4.10 Shows Symbol of Crystal Oscillator

33 | P a g e
4.4 Flow Chart Diagram of the System

Fig.4.11 Shows Flow Chart Diagram

4.5 Interfacing of PIC16f877A with external devices


4.5.1 Pin description of PIC16F877A
The PIC16F877A micro controller is a 40-pin IC. The 11th and 32th pins of the controller are Vdd
pin and the 5V dc supplies are given to these pins. The 12th and 31th pins of the controller are
Vss pin and are grounded. 8MHZ crystal oscillator is connected to 13th and 14th pins of the
PIC16F877A micro controller and two 22pf capacitors are connected to ground from 13th and
14th pins. The 1st pin is Reset pin. Special function register, RA0-RA5 where RA is a

34 | P a g e
bidirectional port. That is, it can be configured as an input or an output. The number following
RA is the bit number (0 to 5). So, we have one 5-bit directional port where each bit can be
configured as Input or Output. [17]

Fig.4.12 Shows Pin Description PIC16F877A Microcontroller

Special function register RB0-RB7, and the RB is a second bidirectional port. It behaves in exactly
the same way as RA, except there are 8- bits involved. RC0-RC7 & RD0-RD7, RC & RD are
bidirectional ports. They are 8-bit wide pins. RE0-RE2, 3-bit wide, bidirectional, VSS and VDD,
These are the power supply pins. VDD is the positive supply, and VSS is the negative supply. And
the OSC1/CLK IN and OSC2/CLKOUT, these pins are where we connect an external clock, so that
the microcontroller has some kind of timing. MCLR, this pin is used to erase the memory locations
inside the PIC (i.e. when we want to re-program it). In normal use it is connected to the positive
supply rail. T0CK1, this is another clock input, which operates an internal timer. It operates in
isolation to the main clock.

35 | P a g e
4.6 Circuit Diagram of a system

Fig.4.13 Shows Circuit Diagram of a System

4.6.1 General Operation of the Circuit


At first the user is prompted to input reference temperature that he or she wants to maintain in
their room. The temperature sensor will then measure the surrounding temperature and
communicates the value to the microcontroller. The microcontroller reads the temperature and
compares it with the reference value. If the measured value is greater than the reference value,
the cooler/fan will be turned ON to cool the room back to the reference temperature and turns
OFF once it’s at that reference point again. The measured room temperature from the
temperature Sensor is analog in nature. But the pic microcontroller has Analog-to-Digital (A/D),
converters which convert the analog signal into digital signal itself because the pic
microcontroller is a digital device, and can only work with binary numbers.
36 | P a g e
CHAPTER FIVE
Results and Discussion
5.1 System Overview
For controlling the temperature of a high power computer room, the thermal system model was
used. This is observed from the defense engineering college of server room. As can be seen, from
thermal model transfer functions, the relationship is linear and R is the thermal resistance
indicates the radiation heat transfer, or the heat flow in the room, where C, is thermal
capacitance is the ability to store thermal energy in the room.
Table3: Result Analysis Using Mat lab
R=0.3 R=1 R=2 R=3
C=3 C=6 C=4 C=4
Step response Step response Step response Step response
Stilling time is Stilling time is Stilling time is Stilling time is
8 second 30 second 42 second 60 second
As we can see from the table above table that when the thermal resistance of the room or the
heat flow is increased, the time to reduce the heat in the computer room is long, so when the
time is long the data stored in the computers may get lost.
Figure shown below is the Simulation results of complete circuit carried out using Proteus
software. The results obtained from the PIC16F877A microcontroller interfaced with LM35,
temperature sensors; in this project pic micro controller integrated Chip plays the main role. The
program for this project is embedded in this pic micro controller Integrated Chip and interfaced
to all the peripherals. During simulation, first of all the required components are imported to the
design window by clicking a “P” button on the window which means pick a component from a
library, when this button is clicked, another window will be opened to select the desired
component. By writing the name of the component and selecting it or double clicking on it, the
component is imported to the design window. In this way all components can be imported, by
selecting from the imported list of components, each component is placed on the appropriate
position on the design space. After putting the components, the necessary connection is done
exactly the same as the overall integration circuit diagram.

37 | P a g e
Fig.5.1 Shows Snap Shoot Result of Simulation when temperature is greater than 16‟c

According to our project the fun is driven by DC motor. And this DC Motor is used as a fun to the
purpose of reducing the temperature, if the temperature in the high power computer room is
greater than (16‟C). The heater shows heat generates the heat continuously from the computer
room. The pic microcontroller compared the two temperatures and switches the fun ON since
the room temperature was higher than the reference temperature; and this pic microcontroller
reads the temperature every second and compares it with the reference value. In this case the
reference temperature (16‟C) is first set in the embedded programs. It was observed that when
the room temperature is 16‟C and above, the fan switches on automatically. However, when the
room temperature is below, the fun automatically switches off. And the Liquid Crystal Display
(LCD) is interfaced topic microcontroller to display the temperature value.
38 | P a g e
5.2 Conclusion and Recommendation

5.2.1 Conclusion

The overall aim of this project was to developed automatic temperature control system, for the
high power computer room which consists of thermal systems. When the thermal system was
constructed by observing a real server room at DEC. A mathematical model of the closed-loop
The system uses PIC16F877A microcontroller for the control unit, and LM35 as the temperature
sensor. The output was varied by setting the temperature at various levels and it was discovered
that the Fan was triggered ON when the room temperature was higher than the reference
temperature (160c). And the fun was triggered OFF when the room temperature was lower than
the reference temperature. The system was designed using Proteus 8 and Micro C Software. And
the system was simulated and working according to the design specifications analysis of mat lab.
So this system is very marketable because of its simplicity, low cost, low power consumption.

Limitations
 All projects have their own limitations. We have tried our best to achieve the goal but our
project also has some limitations which cannot read negative temperature.

5.2.2 Recommendation

The goal of this project was purposely kept within what was believed to be attainable within the
allotted timeline. As such many improvements can be made upon this initially design the
following recommendations are provided as ideas for future expansion of this project.

 Changeable temperature limits can be applied by adding matrix keypad.


 High precision sensors such as Platinum Wire can be used. This makes Possible to
measure more range of temperature.
 Multiple sensors can be used to provide the controlling room over wider area.
 In future a GSM module can be integrated with the system so that one can be able to
operate their temperature control system from a distance.

39 | P a g e
REFERENCE
[1]. Ogu Emmanuel C., Temperature Control System, department of computer science and
Mathematics school of science and technology Babcock University, Ilishan-Remo, Nigeria ,April,
2011.
[2]. A text book of Richard C. Dorf, Modern Control Systems, University of California, Davis
Twelfth edition
[3]. A text book of Katsuhiko Ogata, Modern Control Engineering Fifth Edition.
[4]. MustafaSaad, Hossam, Automatic Fan Speed Control System Using Microcontroller,
November 2014, Electronics and Civil Engineering, At Cape Town (South Africa)
[5]. Arun Bera, and Sonal Kumar, automatic temperature control with cooling system using
Microcontroller, Department of Electronics and Communication Engineering May, 2011
[6]. Okpagu, P.E. &Nwosu, A.W. Development and temperature control of smart egg incubator
System for various types of egg, University Uli Anambra State, NIGERIA)
[7]. Abubakar Muhammad Auwal, Microcontroller Based Automatic Temperature Controller,
Department of Computer Engineering, Federal Polytechnic Ede, Osun state, Nigeria.2017
[8]. Gaurav S. Ashara1, Dipesh S.Vyas, design and simulation of temperature control of chamber
[9]. A text book of Dr. N.C. Jagan, Control Systems, Second Edition, Retd Professor in Electrical
Engineering University College of Engineering Osmania University, Hyderabad.[10] Control
systems Engineering. J.Nagrath and M.Gopal,third edition,1999,
[11]. Muhammed Ali Mazidi, J. G. (1990). The 8051 Microcontroller and Embedded Systems
[12]. MikroC, “mikroCusermanual” availableatwww.mikroe.com/pdfMikroc/mikroc_manual.pf
[13]. Iovine John- “PIC Microcontroller Project Book”, 2nd Edition, Singapore: McGraw Hill [14].
Muhammad Ali Mazidi- “PIC Microcontroller and Embedded systems”, 3rd edition:
Pearsons Education; 2007
[15]. Ghana ShyamSoren, Temperature Controlled DC Fan using Microcontroller, Department
Of Electrical Engineering National Institute of Technology Rourkela Rourkela – 769008, India
[16]. http://www.embetronicx.com/tutorials/microcontrollers/pic/lcd-interfacing-with-
16F877A/microcontroller
[17]. Embedded systems programming with the PIC16F877 Second Edition by Timothy D.
Green2008 England London

40 | P a g e
APPENDIX
Source code for the PIC16F877A Microcontroller,
//
===================================================================== =====

// Project name: AUTOMATIC TEMPRATURE CONTROL FOR HIGH POWER COMPUTER ROOM

//============= LCD module connections =================

// LCD pin out settings

Sbit LCD_RS at RC4_bit;

Sbit LCD_EN at RC5_bit;

Sbit LCD_D4 at RC3_bit;

Sbit LCD_D5 at RC2_bit;

Sbit LCD_D6 at RC1_bit;

Sbit LCD_D7 at RC0_bit;

Sbit buzz at RC6_bit;

// pin Direction

SbitLCD_RS_Direction at TRISC4_bit;

SbitLCD_EN_Direction at TRISC5_bit;

Sbit LCD_D4_Direction at TRISC3_bit;

Sbit LCD_D5_Direction at TRISC2_bit;

Sbit LCD_D6_Direction at TRISC1_bit;

Sbit LCD_D7_Direction at TRISC0_bit;

// =========== End LCD module connections ==============

41 | P a g e
#define HEATER PORTB.RB0

#define fun PORTB.RB1

#define ON 1

#define OFF 0

Void main ()

Unsigned short Txt [14];

Unsignedinttemp, i;

Float mV, ActualTemp;

TRISA0_bit=1; //Configure port A of bit 0 as input

TRISC=0; //Configure port C as out put

TRISB0_bit=0; //Configure port B of bit 0 as out put TRISB1_bit=0;

//Configure port B of bit 1 as out put

Lcd_Init (); // Initialize LCD

Lcd_Cmd (_LCD_CLEAR); // Clear display

Lcd_Cmd (_LCD_CURSOR_OFF); // Cursor off

Lcd_Out (1, 1, "Automatic Temp"); //Display string on the first raw

Lcd_Out (2, 1, "Control System"); //Display string on the second raw


HEATER=OFF;
Fun =OFF; Buzz=OFF;

delay_ms (250); //2s delay


Lcd_Cmd (_LCD_CLEAR); // Clear display
//
===================================================================== ====

42 | P a g e
// LOOP OF THE PROGRAME

//

===================================================================== ====

While (1) { // endless loop

//Display Reference Temperature and Actual Temperature

Temp = ADC_Read (0); //Read temperature from AN0

MV = temp * 5000.0/1024.0; //Convert to mV

ActualTemp = mV/10.0; // Convert to degrees Celsius

Lcd_out (1,2,"COMP Room T=");

FloatToStr (ActualTemp, Txt); //Convert to string and assign to txt.

Txt [4] =0;

Lcd_Out (1, 12, Txt);

Lcd_Chr (1, 14,223); //Char code for degree

Lcd_Chr (1, 15,'C');

//
=====================================================================
=
// COMPARATION BTWEEN REFERANCE TEMPRATURE AND ROOM TEMPRATURE

//
=====================================================================
=

If (ActualTemp>=16) //If Temp of the Room Industry is greater than 16 fun ON

{
HEATER = OFF;
Fun = ON;
//buzzer=ON;
43 | P a g e
buzz=ON;

Lcd_out (2, 4," fun is ON");

If (ActualTemp<16) // If Temp of the Room Industry is less than 14 the room heater is ON

HEATER = ON;

Fun = OFF;

Lcd_out (2,4,"Heater is ON");

//

===================================================================== ====

// CONTINOUS DISPIAY ON LCD

//

===================================================================== ====

// Moving Text

/* for (i=0;i<10;i++) // Move text to the left 10 times

Lcd_cmd (_LCD_SHIFT_LEFT);

Delay_ms (50);

} */

}
44 | P a g e

You might also like