0% found this document useful (0 votes)
11 views30 pages

Group Assigmment

Uploaded by

surafelgt10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views30 pages

Group Assigmment

Uploaded by

surafelgt10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

AUTOMATIC TEMPERATURE CONTROL FOR HIGH

PERFORMANCE COMPUTER ROOM

Derbre Berhan Polytechnic College


Industrial Automation and Control Technology Management
LEVEL V

Project Report Submitted By


….….…012/13

….....….018/13

..…….....031/13

...............031/13

Submission date : June, 2024

Submitted to : Wondmenh Manaye


Acknowledgement
There are plenty of persons to be thanked before we start this project that helped us in
bringing it all together. Firstly, we are grateful for almighty GOD who is the beginning and
the end for all this. Next, our teacher Mr. Wondmenh Manaye and his stuff colleagues who
managed and helped us in getting this project. Finally, are pleased to give the credit for all
the people who are involved through the study and our beloved friends for their active
participation in this project.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 1


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 Micro C hex file was loaded on the Proteus schematic
design.

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

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 2


Table of Contents Page
Acknowledgement………………………………………………………………………………………...……….1
Abstract………………………………………………………………………………………………………………………2

Chapter one…………………………………………………………………………………………………………….6

Introduction……………………………………………………………………………………………………………6

1.1 Back ground……………………………………………………………………………………………………………………………….6


1.2 Automatic control theory……………………………………………………………………………………………………………7

1.2.1 Open loop control system………………………………………………………………………………………………………..7

1.2.2 Closed loop control system……………………………………………………………………………………………………...7

1.3 Statement of the problem…………………………………………………………………………………………………………...9

1.4 Objective…………………………………………………………………………………………………………………………………….10

1.4.1 General objective…………………………………………………………………………………………………………………….10

1.4.2 Specific objective…………………………………………………………………………………………………………………….10

1.5 Scope of the project …………………………………………………………………………………………………………………..10

1.6 Methodology………………………………………………………………………………………………………………………………10

Chapter two…………………………………………………………………………………………………………….11
Literature Review………………………………………………………………………………………………………..11

2 Previous work………………………………………………………………………………………………………………………………..11
Chapter three…………………………………………………………………………………………………………..13
Physical system of mathematical modeling……………………………………………………………..13

3.1 Introduction of physical system model designing………………………………………………….13

3.2 Differential equation of physical systems……………………………………………………………...14

3.2.1 Electrical systems……………………………………………………………………………………………...15

3.2.2 Analogous systems…………………………………………………………………………………………….15

3.3 Thermal systems …………………………………………………………………………………………………16

3.4 Transfer Functions……………………………………………………………………………………………….17

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 3


Chapter four…………………………………………………………………………………………………………….18

Simulation using software……………………………………………………………………………………….18

4.1 Software tools……………………………………………………………………………………………………..18

4.1.1 Proteus software……………………………………………………………………………………………….18

4.1.2 Micro C………………………………………………………………………………………………………………19

4.2 System block diagram…………………………………………………………………………………………...19

4.3 System block diagram component description……………………………………………………….19

4.3.1 PIC Microcontroller…………………………………………………………………………………………….19

4.3.1.1 General organization of PIC16F877A microcontrollers……………………………………...21

4.3.2 LM35 Temperature sensor………………………………………………………………………………….21

4.3.3 Power supply to the PIC……………………………………………………………………………………...23

4.3.4 LCD display………………………………………………………………………………………………………..23

4.3.5 DC motor……………………………………………………………………………………………………………24

4.3.6 Motor driver L293D IC………………………………………………………………………………………..25

4.3.7 Buzzer ………………………………………………………………………………………………………………25

4.3.8 Crystal oscillators ……………………………………………………………………………………………...26

4.4 Flow chat diagram of the system……………………………………………………………………………26

4.5 Interfacing of PIC16F877A with external devices……………………………………………………27

4.5.1 Pin description of PIC16F877A …………………………………………………………………………..27

4.6 General operation of the circuit …………………………………………………………………………….27

Chapter five……………………………………………………………………………………………………..………28

Conclusion and recommendation…………………………………………………………………………….28

5.1 Conclusion…………………………………………………………………………………………………………..28

5.2 Recommendation ……………………………………………………………………………………………….28

Reference ………………………………………………………………………………………………………………..29

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 4


Figure Page
Fig 1.1………………………………………………………………………………………………………………8

Fig 3.1……………………………………………………………………………………………………………..13

Fig 3.2……………………………………………………………………………………………………………..14

Fig 3.3……………………………………………………………………………………………………………..15

Fig 3.4……………………………………………………………………………………………………………...17

Fig 4.1………………………………………………………………………………………………………………18

Fig 4.2………………………………………………………………………………………………………………19

Fig 4.3………………………………………………………………………………………………………………20

Fig 4.5………………………………………………………………………………………………………………21

Fig 4.6………………………………………………………………………………………………………………22

Fig 4.7………………………………………………………………………………………………………………24

Fig 4.8………………………………………………………………………………………………………………24

Fig 4.9 ……………………………………………………………………………………………………………...25

Fig 4.10……………………………………………………………………………………………………………..26

Fig 4.11……………………………………………………………………………………………………………26

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 5


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 shave 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 are a could be research area, small
plant, a house or any place or devices that require a controlled temperature like an
incubator (egg) system.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 6


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.1 Open 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.

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.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 7


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.

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
 Is a 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.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 8


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

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.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 9


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 sensor2.
2. Read data from temperature sensor which will be displayed on LCD3.
3. Analysis using Mat lab

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

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 10


CHAPTER TWO
LITERATURE REVIEW
2. 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.
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. 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
of35 – 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, 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.

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.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 11


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.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 12


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,

Physical Mathemati Transfer Controller


Idealizing Analysis Using
system cal model function
Mat lab

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 up on the choice of variable and the coordinate system, a given physical
model may lead to different mathematical model.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 13


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.

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.
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.
VA

‘ VT Fig 3.2 Shows ideal element

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 14


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.

Fig 3.3 Shows Parallel RLC Circuit Excited by a Current Source

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 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.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 15


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 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.

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.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 16


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

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.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 17


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.

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

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 18


4.1.2 Micro C
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. Micro C is a powerful,
feature rich development tool for PIC microcontrollers. The software is written in C‟‟
language using micro C 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.

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. ThePIC16F877A 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
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

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 19


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.

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.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 20


4.3.1.1 General Organization of PIC16F877A Microcontrollers
The PIC16F877A microcontroller is the heart of the entire system. It takes the inputs from
theLM35 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 and256byte 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.

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 micro controller 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.

Fig.4.5 Shows LM35 Temperature Sensor


Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 21
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 ofLM35 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.

Sensor

Fig.4.6 Shows LM35 interfacing with PIC microcontroller

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.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 22


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/0C
 Easy to interface
 Low cost
 Low power consumption supplies available for sensor Special features ofLM35
 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.
 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.1oC 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.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 23


Fig.4.7 Shows 16x2 LCD

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. 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

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 24


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

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.
Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 25
4.3.8 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

4.4 Flow Chart Diagram of the System

Fig.4.11 Shows Flow Chart Diagram


Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 26
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 thePIC16F877A micro controller and two 22pf capacitors are connected to
ground from 13th and14th pins. The 1st pin is Reset pin. Special function register, RA0-RA5
where RA is a 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.

4.6 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.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 27


CHAPTER FIVE
Conclusion and Recommendation
5.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 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
tope rate their temperature control system from a distance.

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 28


REFERENCE

[1]. A text book of Richard C. Dorf, Modern Control Systems, University of California,
DavisTwelfth edition

[2]. A text book of Katsuhiko Ogata, Modern Control Engineering Fifth Edition.

[3]. Arun Bera, and Sonal Kumar, automatic temperature control with cooling system
usingMicrocontroller, Department of Electronics and Communication Engineering May,
2011

[4]. Okpagu, P.E. &Nwosu, A.W. Development and temperature control of smart egg
incubatorSystem for various types of egg, University Uli Anambra State, NIGERIA)

[5]. Abubakar Muhammad Auwal, Microcontroller Based Automatic Temperature


Controller,Department of Computer Engineering, Federal Polytechnic Ede, Osun state,
Nigeria.2017

[6]. Gaurav S. Ashara1, Dipesh S.Vyas, design and simulation of temperature control of
chamber

Derbre Berhan Polytechnic College | AUTOMATIC TEMPERATURE CONTROL 29

You might also like