intelligent fan regulation system
DESCRIPTION
INTELLIGENT FAN REGULATION SYSTEM USING MICRO CONTROLLER 8051/52, ADC 0808TRANSCRIPT
APROJECT REPORT
ON
INTELLIGENT FAN REGULATION SYSTEM
Submitted By
Ajnadkar Vedant V.
Bairagi Rahul D.
Patil Vijay S.
In the partial fulfillment for the award of
Third Year Engineering
Electronics and Telecommunication Engineering
Pune University
Pune (MS)
DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION
SIR VISVESWARAYA INSTITUTE OF TECHNOLOGY
CHINCHOLI, NASHIK.
(2012 – 2013)
ABSTRACT
This project is a standalone automatic fan speed controller that controls the speed of an electric fan according to our requirement. Use of embedded technology makes this closed loop feedback control system efficient and reliable. Micro controller allows dynamic and faster control. LED bar graph makes the system user-friendly. The fan speed level is displayed on the LED bar graph. Micro controller is the heart of the circuit as it controls all the functions.
In industry fan may be AC or DC (most probably AC) or it may be cooler. As the temperature increases the speed of fan also increases linearly to cool it down. And as temperature decreases the speed also decreases. For any constant temperature the speed also remains constant.
However, traditional way uses manual regulator switch to control the speed of fan. So here we present a demo of automated kind of application. As the temperature increases from 25 oC to 55 oC the speed of DC fan increases from min to max. The temperature sensor LM35 senses the temperature and converts it into an electrical (analog) signal, which is applied to the micro controller through ADC. The analog signal is converted into digital format by the analog-to-digital converter (ADC). The micro controller drives motor driver to control the fan speed. The level of speed is indicated on LED bar graph.
The system uses a compact circuitry built around 8051 microcontroller. Programs are developed in Embedded C. Flash magic is used for loading programs into Microcontroller.
CONTENTS
List of Abbreviations I
List of Symbols II
List of Figure III
List of Tables IV
1. INTRODUCTION 11.1 INTRODUCTION
2. LITERATURE SURVEY 2
2.1 LITERATURE SURVEY
3. MODELING/DEVELOPMENT OF SYSTEM
3.1 BLOCK DIAGRAM 3
3.2 BLOCK DIAGRAM DESCRIPTION 3
3.3 CIRCUIT DESCRIPTION 4
3.3.1 ADC Section 5
3.3.2 Control & Driver Section 8
3.4 POWER SUPPLY DESIGNING 12
3.5 OPERATION 16
5. RESULT & CONCLUSION 17
5.1 Advantages
5.2 Disadvantages
5.3 Applications
5.4 CONCLUSION 18
6. REFERENCES 19
6.1 REFERENCES 19
6.2 APPENDIX 20
I - List of Abbreviations
AC Alternate Current
DC Direct Current
LED Light emitting diode
IC Integrated circuit
ADC Analog to digital converter
P0 Port0
P1 Port1
P2 Port2
P3 Port3
RPS Regulated Power Supply
I
II - List of Symbols
V Volts
mV milli-Volts
mA milli- Amps
mW milli- watts
ms milli seconds
μs micro seconds
Hz hertz
KHz Kilo hertz
MHz Mega hertz
°C Degree Celsius
Ω Ohm
II
III - List of Figures
Figure No. Title of Figure Page No.1 Block Diagram 32 Circuit diagram 43 ADC Section 54 LM 35 pin diagram 65 ADC 0804 pin diagram 76 Control & Driver section 87 Microcontroller 89C52 pin diagram 98 LED bar graph 109 ULD293D motor driver pin diagram 1010 ULD293D motor driver description 1111 Power supply 12
III
IV - List of Tables
Table No. Title of Table Page No.1 LED bar graph display 92 Operation details 11
IV
Chapter 1 : INTRODUCTION
1.1 INTRODUCTION
Obviously we might have seen so many temperature controller and indicator applications using different micro-controllers, micro-processors or other controlling devices. But this is the actual application of temperature controller that controls speed of DC fan as temperature varies. It is not a simple ON-OFF type controller that switches fan ON / OFF when temperature increases / decreases certain limit. But its continuous type controller that continuously varies speed of DC fan as temperature increases / decreases. That is a demo of actual industrial application.
We have made a temperature controlled DC fan whose speed increases with the rise in temperature and decrease as the temperature falls ! It has got a lot of practical usage as it does not require to manually operated.
In industry fan may be AC or DC (most probably AC) or it may be cooler. As the temperature increases the speed of fan also increases linearly to cool it down. And as temperature decreases the speed also decreases. For any constant temperature the speed also remains constant.
So here we present a demo of same kind of application. As the temperature increases from 25 oC to 55 oC the speed of DC fan increases from min to max. obviously the industrial temperature range will be in terms of 100 oC or even more but here for demo I have design it for very low range. At the end of article I have suggested some ideas some modifications with which the project can be used for actual industrial application.
1
Chapter 2 : LITERATURE SURVEY
2.1 LITERATURE SURVEY
When we are talking about automation, we must think about microcontroller. Microcontroller finds its application in each and every automation control like Remote controllers, Hand-held communication devices, automatic and semi-automatic washing machines, security system, telephone printing machines, automobiles, indicating and measuring instruments. The project described here being also a microcontroller based project, used for controlling temperature. The use of microcontroller in this project is to store the data, process data and change data according to the room temperature. This is possible because microcontroller has CPU, memory, I/O ports, timers/counters, ADC/DAC, serial ports, interrupt logic, oscillator circuitry, and many more functional blocks on single chip. Hence it reduces the cost of hardware. Also there is no need to connect external RAM for memory storage. This is the most important feature of microcontroller. There are various types of microcontrollers available in market. The examples are Intel MCS-51, PIC family by microchip, ATMEL 89CXX, 89CXX51. The microcontroller used for this project is ATMEL-89C52.
Now days, a problem of controlling temperature is very much important everywhere in the world. So, in large firms or companies, to protect the machines from overheating, controlling temperature of different chemicals, controlling surrounding temperature for processing , they generally use this type of controllers. By using this type of temperature controllers they can get the control of temperature of each part of their premises. The system is quite easy to install and use. Through this, one can control more number of fans, coolers of different areas. The system has a Keypad by which the predefined temperature range can be entered through it. The system then work according to given set points.
These systems are studied in order to obtain some idea for the project that was built. Although the system in the market nowadays suits with the new technology and more advanced idea must still need to be obtain through the literature review.
The literature review works help to expose and generate skills of searching for information from a various sources. These skills are very important in order to solve the problems that encountered or will face in the future.
2
Chapter 3 : MODELING/DEVELOPMENT OF SYSTEM
3.1 BLOCK DIAGRAM
Figure 3.1.1 : Block diagram
3.2 BLOCK DIAGRAM DESCRIPTION
Temperature sensor: - it’s a transducer. It converts temperature into equivalent electrical
signal. Its output voltage increases linearly with increase in temperature. So by measuring the
output voltage we may observe increase or decrease in temperature.
ADC: - because the output of sensor is an analog form, it must be converted into equivalent
digital form before it is given to micro-controller. So, 8-bit ADC converts analog signal from
sensor into 8-bit digital signal that is given to micro-controller.
Micro-controller: - it performs following tasks
· Controls ADC and reads digital value at periodic interval
· Generates PWM and controls speed of DC fan through DC driver
· Indicates current speed on LED bar graph display.
3
LED bar graph: - its 5-step bar graph that displays min speed as one LED ON and max speed
as all five LEDs ON.
DC Driver: - the direct micro-controller output is not able to drive DC motor. So the DC
driver will take input PWM signal from micro-controller and generates enough current to drive
DC motor through this PWM.
3.3 CIRCUIT DESCRIPTION
Figure 3.3.1 : Circuit Diagram
The complete circuit is divided into two sections:
1. ADC Section2. Contol & Driver Section
4
3.3.1 ADC Section
Figure 3.3.2 ADC section
5
a) Temperature sensor : - It’s a transducer. It converts temperature into equivalent electrical
signal. Its output voltage increases linearly with increase in temperature. So by measuring the
output voltage we may observe increase or decrease in temperature.
Figure 3.3.3 : LM35
Features:-
1. Calibrated directly in ° Celsius (Centigrade)
2. Linear + 10.0 mV/°C scale factor
3. 0.5°C accuracy guaranteed (at +25°C)
4. Rated for full -55° to +150°C range
5. Operates from 4 to 30 volts
6
b) ADC : - Because the output of sensor is an analog form, it must be converted into equivalent
digital form before it is given to micro-controller. So, 8-bit ADC converts analog signal from
sensor into 8-bit digital signal that is given to micro-controller.
Figure 3.3.4 : ADC0804
Output of ADC changes to ±10 mV with change in ± 1 oC. We have set the reference voltage (Vref) of
ADC to 2.56 V. so its full scale input voltage will be 5.12 V. and resolution will be
ADC resolution = FSV / (28 - 1)
= 5.12 / 256
= 0.02
= 20 mV
From above calculation we can say that for every 2 oC change in temperature, the ADC output will
change. So ADC output is perfectly calibrated to oC change in temperature. Its control signals and data
bus are interfaced with micro-controller. There are four control signals CS, RD, WR, INTR, and 8-bit
data bus.
8-bit data bus – it is connected with port P1 of 89C52. It sends 8-bit digital data equivalent to
analog output form LM35.
CS (chip select) – active low input signal. Connected to ground permanently to always enable
chip.
RD (read enable) – active low input signal. Connected with pin no 17 (P3.7) of 89C52
7
WR (write enable) – active low input also known as start of conversion (SoC). Connected with
pin no 16 (P3.6) of 89C52
INTR (interrupt out) – low output signal also know as end of conversion (EoC). Connected
with pin no 13 (P3.3 of 89C52)
3.3.2 Contol & Driver Section
Figure 3.3.5 Control & Driver section
8
a) Micro-controller: -
It performs following tasks
· Controls ADC and reads digital value at periodic interval
· Generates PWM and controls speed of DC fan through DC driver
· Indicates current speed on LED bar graph display.
Figure 3.3.6 : Microcontroller 89C52
Connections: -
The connections from previous sections (ADC) are shown. Five LEDs LED1 to LED5 are
connected to port2 pins P2.0 to P2.4 as shown. A 12 MHz crystal with two 33 pF capacitors is
connected to 89S52 crystal pins to provide clock signal. A capacitor C4 with diode D1 and resistor R4
forms power on reset circuit. This completes controller section.
9
b) LED bar graph : - its 5-step bar graph that displays min speed as one LED ON and max speed
as all five LEDs ON
Figure 3.3.7 : LED Graph
Table 3.3.1 : Temperature range & No. of LED’s
Temp.
Range
25˚–30˚ 31˚–36˚ 37˚–42˚ 43˚–49˚ 50˚-56˚
No.of LED’s 01 02 03 04 05
c) DC Driver : - the direct micro-controller output is not able to drive DC motor. So the DC
driver (ULD293D ) will take input PWM signal from micro-controller and generates enough
current to drive DC motor through this PWM.
Figure 3.3.8 : Motor Driver L293D
10
The L293 is a high-current half-H driver. The L293D is designed to provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36 V.
Figure 3.3.9 : Motor Driver Description
11
3.4 DESIGNING OF POWER SUPPLY:
Figure 3.4.1 : Power supply
3.6.1.1 Design of step down transformer:-
The following information must be available to the designer of the transformer.
1) Power output.
2) Operating voltage.
3) Frequency range.
4) Efficiency and regulation.
Size of core is one of the first consideration in regard of weight and volume of a transformer. This depends on type of core and winding configuration used. Generally following formula is used to find Area or Size of the Core.
Ai = √ Wp / 0.87
Where Ai = Area of cross section in square cm.
Wp = Primary Wattage.
For our project we require +12V output, so transformer secondary winding rating is 12V, 500mA.
So secondary power wattage is,
P2 = 12 * 500mA
= 6 Watt
12
So,
Ai = √ 6 / 0.87
= 2.82
Generally 10% of area should be added to the core.
So,
Ai = 2.8
a) Turns per volt: - Turns per volt of transformer are given by relation.
Turns per volt = 100000 / 4.44 f * Bm * Ai
Where,
F = Frequency in Hz.
Bm = Density in Wb / Square meter.
Ai = Net area of the cross section.
Following table gives the value of turns per volt for 50 Hz frequency.
Table - The value of turns per volt for 50 Hz frequency
Flux density 0.76 Wb /sq m 1.14 1.01 0.91 0.83
Turns per Volt
45 / Ai 40 / Ai 45 / Ai 50 / Ai 55 / Ai
Generally lower the flux density better the quality of transformer. For our project we have taken the turns per volt are 0.91 Wb / sq.m from above table.
Turns per volt = 50 / Ai
= 50 / 2.8
= 17.85
13
Thus the turns for the primary winding is,
220 * 17.85 = 3927
And for secondary winding,
12 * 17.85 = 215
b) Wire size: - As stated above the size is depends upon the current to be carried out by winding which depends upon current density. For our transformer one tie can safely use current density of 3.1 Amp / sq.mm. For less copper loss 1.6Amp/sq.mm or 2.4sq.mm may be used generally even size gauge of wire are used.
R.M.S secondary voltage at secondary to transformer is 9V. So maximum voltage Vm across secondary is
= 12 * 1.141
= 16.968V
D.C output voltage Vm across secondary is,
Vdc = 2 * Vm/pi
= 2 * 16.968/3.14
= 10.80 V
P.I.V rating of each diode is
PIV = 2Vm
= 2 * 10.80
= 21.6 V
Maximum forward current, which flow from each diode is 500 mA. So from above parameter, we select diode IN4007 from the diode selection manual.
14
B) Design of filter capacitor:-
Formula for calculating filter capacitor is
C = ¼ √ 3 r * F * R1
Where,
r = ripple present at output of rectifier, which is maximum 0.1 for full wave rectifier.
F = frequency of AC main.
R1 = input impedance of voltage regulator IC
C = ¼ √ 3 * 0.1 * 50 * 28
= 1030 µf
= 1000 µf
C) Specification of voltage regulator IC:-
Specification of voltage regulator IC
Parameter Rating
Available output DC voltage. +5V
Line regulation. 0.03
Load regulation. 0.5
Vin maximum. 21.6 V
Ripple rejection. 60-80db
15
Chapter 4 : OPERATION
4.1 Operation: -
Table 4.1.1 : Operation Details
Temp.
Range
25˚–30˚ 31˚–36˚ 37˚–42˚ 43˚–49˚ 50˚-56˚
Duty Cycle 30% 50% 70% 80% 90%
No.of LED’s 01 02 03 04 05
· The micro-controller initially starts rotating motor at minimum speed by applying 30% duty cycle.
· Then periodically it will read the digital value of current temperature from ADC.
· If new value is higher than previous value then duty cycle is increased in 5 steps as 30%, 50%, 70%, 80% and 90%.
· Similarly if new value is lower duty cycle is decreased in same steps.
· If temperature remains constant the output duty cycle also remains constant and so does the speed.
· So this is continuous process. The micro-controller continuously reads new temperature value and continuously varies speed of fan.
16
Chapter 5 : ADVANTAGES, DISADVANTAGES & APPLICATIONS.
5.1 Advantages: -
a) Reduction in manual operation,
b) Low cost,
c) Effectively manages speed of cooling systems,
d) Reduce energy consumption,
e) LED graph makes the system more user friendly,
5.2 Disadvantages: -
a) System failure / excessive delay may be caused,
b) For actual application signal conditioning elements need to be used,
c) LM 35 can not be used for higher temperature ranges
5.3 Applications: -
a) Used in automation of industrial cooling systems,
b) Can be used in different storage plants like vegetable storage plants,
c) Can be used in cooling systems of machines,
d) Also can be used in home automation systems.
175.4 CONCLUSION
The project “ Intelligent fan regulation system ” has been successfully designed and tested.
Integrating features of all the hardware components used have developed it. Presence of every
module has been reasoned out and placed carefully thus contributing to the best working of the unit.
Secondly, using highly advanced IC’s and with the help of growing technology the project has been
successfully implemented.
18