10
·DESIGN AND CONSTRUCTION OF MICROCONTROLLER BASED AMBIENT TEMPERATURE FAN BY NNAM HEL Ef' Af VlUCHE 2005/22058EE A Project submitted to the Department Of Electrical and Computer Engineering. Federal University of Technology, Minna. November, 2010.

·DESIGN AND CONSTRUCTION OF MICROCONTROLLER …dspace.futminna.edu.ng/jspui/bitstream/1/4067/1/DESIGN AND... · sensor, analogue to digital converter, microcontrolIer, liquid crystal

Embed Size (px)

Citation preview

·DESIGN AND CONSTRUCTION OF

MICROCONTROLLER BASED AMBIENT

TEMPERATURE COf~TROLLED FAN

BY

NNAM HELEf' AfVlUCHE 2005/22058EE

A Project submitted to the Department Of

Electrical and Computer Engineering. Federal

University of Technology, Minna.

November, 2010.

DEDICATION

To God Almighty for sparing my life till this moment, to my family members

for their encouragement and unending love, to all my friends, and all my colleagues

for making it all possible for me to have completed this project.

Ii

DECLARATION

1 Nnam Helen Amuche declare that this work was done by me and has never been presented

elsewhere for the award of a degree. I also hereby relinquish the copy right to the Federal University

of Technology, Minna.

NNAM HELEN AMUCHE Student

ENGR RAJI H.O.D

flI ~.\\ Qj:)\\l .~.~ .. ... ..... / / Signature and date

MR PAUL ATTAH Supervisor

~Joju/~ Signature and date

Q~~.GJ(\ Extemal examiner

l(t~(O Signature and date

111

ACKNO\VLEDGEMENT

I thank God Almighty whose infinite grace led me throughout the project. Also thank

Him for giving me the ability to overcome the ups and downs of running a successful degree

program.

I would like to appreciate the invaluable contribution of my honorable supervisor Mr:

Paul Attah and the co assessor Mallam K. Mohammed for their supervision.

I also appreciate the effort of my lovely parents Mr and Mrs Nnam for their constant

help, prayers, financial and moral support, and their words of encouragement and advice. My lovely

siblings, joy, Gloria, Sammy, Excel and Peace, I acknowledge your efforts on me.

r also appreciate Mr. Obinna Emmanuel Okeke for his effort, support (morally and

spiritually), prayers and all his advice.

A well deserving appreciation goes to all my esteemed friends and colleagues;

Folashade Tunmise Oyadiran, Mustapha Hafiz, Victoria Edu Ufaruna,Omite Ogbelu, Onyinye

Uzochukwu, Grace Halima Baba, John Amakor, Osisiogu Enyinnaya, Rose Nwonye, Rakiya

Zubairu, Divine Ekodi, Experience Jamiu, you are all appreciated.

l V

ABSTRACT

This project presents the design, construction and control of the speed of an

electric fan based on the ambient temperature. This fan system consists of temperature ..

sensor, analogue to digital converter, microcontrolIer, liquid crystal display (LCD)

with integration of software programming using A T89s52 as the microcontroller. The

electric fan automatically switches the speed according to the ambient temperature

changes using the temperature sensor LM35. lfthe temperature is between (18-25) °c,

it gives a logic high signal at the outputl.i.e. Relay l.if the temperature is between

(26-32) °c, it gives a logic high signal at the output 2.i.e.Relay 2. lfthe temperature is

between (33-40) °c, it gives a logic high signal at the output 3.i.e. Relay 3.ifthe

temperature is below the lowest temperature and above the highest temperature, it

gives a logic low signal at all outputs. This project also presents the expected

performance of the automatic fan system, construction of hardware and software

development to gather the performance data.

v

TABLE OF CONTENTS

Title page-------------------------------------------------------------------------------------- i

Dedication------------------------------------------------------------------------------------ 11

Declaration----------------------------------------------------------------------------------- iii

A~kn ow 1 ed geITI ent --------------------------------------------------------------------------- iv

Abstract---------------------------------------------------------------------------------------- v

Table of contents--------------------------------------------------------------------------- VI

Chapter One: Introduction

1.1 Project Background--------------------------------------------------------------------- 1

1.2 Problem statement -----------------------------------------:.-------------------------------

1.3 Aims and objectives---------------------------------------------------------------- ---- 2

1.4 S cope of work -------------------------------------------------------------------- ------- 2

1.5 Methodology---------------------------------------------------------------------------- 3

1.6 Reviews of thesis contents------------------------------------------------------------- 3

Chapter Two: Literature Review / Theoretical Background

2.1 Brief history of fan-------------------------------------------------- ------------------ 5

2.2 Methods of speed control------------------------------------------------------------- 5

2.2.1 PWMing the fan directly--------------------------------------------------- 6

2.2.2 Linear regu lati on----------------------------------------------------------- 7

2.2.3 DC - DC regulation------------------------------------------------------ - 8

2.3 temperature and other parameters in process control---- ------------------------ 8

2.4 available fan cooling system----------------- ----------------------------------------- 9

2.4.1 Temperature - based fan control using MAXQ2000 microcontroIIer---9

2.4.2 Digital I/O tern perature sensor----------------------------------------------11

VI

2.5 theoretical backgrounds----------------------------------------------- ----------------- 12

2.5.1 Power supply---------------------------------~----------------------------- 12

2.5.2 MicrocontroIIer-------------------------------------------------------------- 12

2.5.3 Analog to digital converter-------------------:-----------------------------13

2.5.4 Temperature sensing unit------------------------------------------------- 13

2.5.5 The display unit---------------------------------------------------------------14

Chapter Three: Design and Construction

3.1 Block diagram description ---------------------------------------------------------- 16

3.1.1 The 89s52 microcontroIler------------------------------------------------- 16

3.1.2 Temperature sensor LM35 block---- ------------------------------------ 16

3.1.3 Output block ----------------------------------------------------------------- 18

3.1.4 ADC 0804 block ------------------------------------------------------------ 18

3.1.5 Display (LCD) block------------------------------------------------------- 20

3.16 power supply block ---------------------------------------------------------- 21

3.2 System software----------------------------------------------------------------------- 22

3.3 Components specification------- ----------------------------------------------------- 23

3.4 Construction-------- -------------------------------------------------------------------- 23

3.5 Comprehensive circuit diagram----------------------------------------------------- 26

Chapter four: Tests, results and discussion

4.1 Testing ---------------------------------------------------------------------------------- 27

4.1.1 Temperature sensor (LM35) test ------------~-------------------------- 27

4.1 .2 Analog to digital test------------------------------------------------------- 28

4.1 .3 Complete project test------------ ---------------------------------------- 28

Vll

Chapter Five: Conclusions and Recommendation

5.1 Conc! usi ons---------------- --------------------------------------------------------- 30

5.2 Recomm endati on s-------------------------------------------------------------------- 30

References------------------------- -------------------------------------------------------- 31

A ppen d ix 1------- -------------------------------------------------------------------------- 32

A ppen d ix 2 -------------------------------------------------------------------------------- 33

A P pen d ix 3 ------------------------------------------------------------------------------- 34

Vlll

LIST OF FIGURES

Fig 1.0. Workflow of the project-------------------------------------------------------------- 4

Fig 2.1. Connection thermistor to the MAXQ2000 evaluation kit---------------------- 10

Fig 2.2. Connection of the PWM output to the fan--------------------------------------- 10

Fi g 3.1. Block diagram of a tern perature controlled fan---------------------------------- 15

Fig 3.2. Temperature sensor LM35------------------------ --------------------------------- 17

Fig 3.3. ADC interfacing with microcontroller------------------------------------------- 20

Fig 3.4 16 x 2 LCD---------------------------------------------------------------------------- 20

Fig 3.5 power supply of a rectifier--------------------------~------------------------------ -22

Fig 3.6 block diagram of a power supply-------------------------------------------------- 22

Plate 3.7 veroboard construction----------------------------------------------------------- 25

Plate 3.8 the casing-------------------------------------------------------------------------- 27

Fig 3.9 the circuit diagram of a microcontroller based ambient temperature

controlled fan--------------------------------------------------------------------- 28

ix

LIST OF TABLES

Table 3.0. Description of LCD pins--------------------------------------------------21

Table 4.0. LM35 temperature sensor test-------------------'--------------------------28

x