Temperature Based Fan Speed Control & Monitoring Using Arduino"
Temperature Based Fan Speed Control & Monitoring Using Arduino"
Temperature Based Fan Speed Control & Monitoring Using Arduino"
B.Tech
In
Electronics and communication Engineering
Of
KOLKATA-700144
MAY OF 2017
This is to certify that Mr. JAGANNATH DUTTA, Reg No. 142810120041, Mr.
SUMAN MUKHERJEE, Reg no. 142810120151, Mr.SUBHAM GHOSH, Reg No.
142810120061have submitted project report on ”TEMPERATURE BASED FAN
SPEED CONTROL & MONITORING USING ARDUINO” For partial
fulfillment of the requirements for the award of the course of B.Tech in Electronics
and Communication Engineering at GARGI MEMORIAL INSTITUTE OF
TECHNOLOGY. This volume has submitted a satisfactory report about the project
in the academic year 2017.
This report is ready for evaluation
EXAMINER
On the eve of the happy moment, we would like to express our deep gratitude and
thanks to the people and personalities who had helped us during the preparation of our
project.
It given us immense pleasure in conveying our heartiest gratitude to our Principle and
H.O.D Mr. S. MAITI for his constant interest and source of encouragement in our
project.
Above all. We thanks our project guide PROF Mrs. D. RAY for this kind and
esteemed co-operation, which enable us to get knowledge about the project with
positive the effectiveness of the project.
Finally, we would like to thank all friends, who by means of their constructive
comment, suggestion, criticism and valuable advice contributed for the successful
completion of our project.
Day by day, there are different types of intelligent systems are introduced with
the improvement in technology. Everything is getting more intelligible and stylish.
There is a growth in the demand of cutting edge technology and also smart electronic
systems. In the proposed systems, microcontroller plays a vital role in the smart
systems development. Microcontrollers have become an essential part in the present
technologies that are being presented daily. This article discusses temperature based
fan speed control and monitoring system using an Arduino system. This system is
used to control the cooling system automatically based on the room temperature. The
system uses an Arduino board to implement a control system. Since this system is
proposed to control the cooling system and it is very important to know Arduino
controlled system well.
The study was conducted with the design and manufacture of Automatic Fan
Control System. Further functional testing tools, as well as temperature sensor
is used.
1. INTRODUCATION ..................................................................01
2. BLOCK DIAGRAM ................................................................. 02
3. CIRCUIT DIAGRAM .............................................................. 03
4. HARDWARE REQUIRQMENT ............................................. 04
5. ARDUINO ..................................................................... 05
6. LCD .......................................................................................... 10
7. LM35 TEMPERATURE SENSOR ......................................... 12
8. 9V DC MOTOR ....................................................................... 14
9. BD139 NPN POWER TRANSISTOR ..................................... 16
10. DIODE 1N4001 ....................................................................... 18
11. RESISTORS ............................................................................. 19
12. POTENTIOMETER - 1K OHM, LINEAR .............................. 20
13. CAPACITOR ........................................................................... 21
14. 9V BATTERY .......................................................................... 22
15. LED .......................................................................................... 23
16. SOFTWARE DESIGN ............................................................. 24
17. SOURCE CODE ..................................................................... 25
18. TESTING AND RESULT ........................................................ 28
19. APPLICATION ........................................................................ 30
20. ADVANTAGES ....................................................................... 31
21. CONCLUTION........................................................................ 32
22. FUTURE SCOPE..................................................................... 33
23. BIBLIOGRAPHY ..................................................................... 34
FIG – 1 ................................................................................................. 02
FIG – 2 ................................................................................................. 03
FIG – 3 ................................................................................................. 06
FIG – 4 ................................................................................................. 08
FIG – 5 ................................................................................................. 10
FIG – 6 ................................................................................................. 13
FIG – 7 ................................................................................................. 14
FIG – 8 ................................................................................................. 15
FIG – 9 ................................................................................................. 17
FIG – 10 ............................................................................................... 18
FIG – 11 ............................................................................................... 19
FIG – 12 ............................................................................................... 20
FIG – 13 ............................................................................................... 20
FIG – 14 ............................................................................................... 21
FIG – 15 ............................................................................................... 22
FIG – 16 ............................................................................................... 23
FIG – 17 ............................................................................................... 28
FIG – 18 ............................................................................................... 29
Electric fan is one of the most popular electrical devices due to its cost-
effectiveness and low power consumption advantages. It is a common circuit and
widely used in many Applications. It is also one of the most sensible solutions to offer
a comfortable and energy efficient. In fact, the fan has been long used and still
available in the market.
Nowadays, the demand for accurate temperature control and air freshening
control has conquered many of industrial domains such as process heat, automotive,
industrial places or office buildings where the air is cooled in order to maintain a
comfortable environment for its occupants. One of the most important concerns
involved in heat area consist in the desired temperature achievement and consumption
optimization. So, an automatic temperature control system technology is needed for
the controlling purpose in the fan speed according to the temperature changes.
Many researches focusing on automatic temperature control system
application in different fields will gain the benefits. For examples, an automatic
temperature controller for multi element array hyperthermia systems , multi-loop
automatic temperature control system design for fluid dynamics , design of automatic
temperature- control circuit module in tunnel microwave heating system, the
automatic temperature system with Fuzzy self-adaptive Proportional- Integral-
Derivative (PID) control in semiconductor laser .
LCD DISPLAY
(16X2)
R
LM35
N FAN
O (9V DC MOT OR)
UNO
Fig 1 - Block Diagram of the Temperature-Based Fan Speed Control & Monitoring using Arduino
Now Arduino board is very progressive among all electronic circuits, thus we
employed Arduino board for fan speed control.The proposed system is designed to
detect the temperature of the room and send that information to the Arduino board.
Then the Arduino board executes the contrast of current temperature and set
temperature based on the inbuilt program of the Arduino.
The outcome obtained from the operation is given through the o/p port of an
Arduino board to the LCD display of related data. The generated pulses from the
board which is further fed to the driver circuit to get the preferred output to the fan.
Fig 2 - Circuit Diagram of the Temperature-Based Fan Speed Control & Monitoring using Arduino
Board-Arduino Uno
Lcd-16x2 Display
IC-LM35 temperature sensor
Transistor-BD139
Diode-1N4007
LED
R1-R2-1-kilo-ohm
Variable resistor-10 kilo-ohm
Capacitor-10uF,16velectrolicty
Fan-9v dc
Battery-12 cd for fan
Microcontroller: ATmega328
Operating Voltage: 5V
Input Voltage (recommended): 7-12V
Input Voltage (limits): 6-20V
Digital I/O Pins: 14 (of which 6 provide PWM output)
Analog Input Pins: 6
DC Current per I/O Pin: 40 mA
DC Current for 3.3V Pin: 50 mA
Flash Memory: 32 KB of which 0.5 KB used by bootloader
SRAM: 2 KB (ATmega328)
EEPROM: 1 KB (ATmega328)
Clock Speed: 16 MHz
Arduino Technology
Digital I/Ps
It comprises of 14-digital I/O pins, each pin take up and provides 40mA current.
Some of the pins have special functions like pins 0 & 1, which acts as a transmitter
and receiver respectively. For serial communication, pins-2 & 3 are external
interrupts, 3,5,6,9,11 pins delivers PWM o/p and pin-13 is used to connect LED.
Analog i/ps: It has 6-analog I/O pins, each pin provide a 10 bits resolution.
Aref: This pin gives a reference to the analog i/ps.
Reset: When the pin is low, then it resets the microcontroller.
Basically, the processor of the Arduino board uses the Harvard architecture where the
program code and program data have separate memory. It consists of two memories
such as program memory and data memory. Wherein the data is stored in data
memory and the code is stored in the flash program memory. The Atmega328
microcontroller has 32kb of flash memory, 2kb of SRAM 1kb of EPROM and
operates with a 16MHz clock speed.
Digital read pin reads the digital value of the given pin.
Digital write pin is used to write the digital value of the given pin.
Pin mode pin is used to set the pin to I/O mode.
Analog read pin reads and returns the value.
Analog write pin writes the value of the pin.
Serial. Begins pin sets the beginning of serial communication by setting the
rate of bit.
Pin Description:
Pin
Function Name
No
1 Ground (0V) Ground
2 Supply voltage; 5V (4.7V – 5.3V) Vcc
3 Contrast adjustment; through a variable resistor VEE
Selects command register when low; and data register when Register
4
high Select
5 Low to write to the register; High to read from the register Read/write
6 Sends data to data pins when a high to low pulse is given Enable
7 DB0
8 DB1
9 DB2
10 DB3
8-bit data pins
11 DB4
12 DB5
13 DB6
14 DB7
15 Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-
The operating temperature range is from -55°C to 150°C. The output voltage varies
by 10mV in response to every o C rise/fall in ambient temperature, i.e., its scale factor
is 0.01V/ o C.
Features:
Pin Description:
A DC motor is any motor within a class of electrical machines whereby direct current
electrical power is converted into mechanical power. Most often, this type of motor
relies on forces that magnetic fields produce. Regardless of the type, DC motors have
some kind of internal mechanism, which is electronic or electromechanical. In both
cases, the direction of current flow in part of the motor is changed periodically.
The speed of a DC motor is controlled using a variable supply voltage or by changing
the strength of the current within its field windrings. While smaller DC motors are
commonly used in the making of appliances, tools, toys, and automobile mechanisms,
such as electric car seats, larger DC motors are used in hoists, elevators, and electric
vehicles.
A 9v DC motor is small and inexpensive, yet powerful enough to be used for many
applications. Because choosing the right DC motor for a specific application can be
challenging, it is important to work with the right company. A prime example is
METMotors, which has been creating high-quality permanent magnet DC motors for
more than 45 years.
Fig 7 - 9v DC motor
The essential usefulness of a transistor comes from its ability to use a small signal
applied between one pair of its terminals to control a much larger signal at another
pair of terminals. This property is called gain. It can produce a stronger output signal,
a voltage or current, which is proportional to a weaker input signal; that is, it can act
as an amplifier. Alternatively, the transistor can be used to turn current on or off in a
circuit as an electrically controlled switch, where the amount of current is determined
by other circuit elements.
There are two types of transistors, which have slight differences in how they are used
in a circuit. A bipolar transistor has terminals labeled base, collector, and emitter. A
small current at the base terminal (that is, flowing between the base and the emitter)
can control or switch a much larger current between the collector and emitter
terminals. For a field-effect transistor, the terminals are labeled gate, source,
and drain, and a voltage at the gate can control a current between source and drain.
Characteristics
Fig 11 - Resistor
Fig 12 - potentiometer
Capacitor is a passive component used to store charge. The charge (q) stored in a
capacitor is the product of its capacitance (C) value and the voltage (V) applied to it.
Capacitors offer infinite reactance to zero frequency so they are used for blocking DC
components or bypassing the AC signals. The capacitor undergoes through a recursive
cycle of charging and discharging in AC circuits where the voltage and current across
it depends on the RC time constant. For this reason, capacitors are used for smoothing
power supply variations. Other uses include, coupling the various stages of audio
system, tuning in radio circuits etc. These are used to store energy like in a camera
flash.
Fig 14 - Capacitor
This is a 9Volt battery. Inside it there are 6 very small cells connected together
in series. Each small cell has a voltage of 1.5 Volts. This type of battery can only
produce a small electric current compared to the ones above but the higher Voltage
means that it can be used to make special types of circuit work.
The symbol consists of 6 single cells connected together.
Fig 15 – 9V Battery
Light emitting diodes (LEDs) are semiconductor light sources. The light emitted
from LEDs varies from visible to infrared and ultraviolet regions. They operate on
low voltage and power. LEDs are one of the most common electronic components and
are mostly used as indicators in circuits. They are also used for luminance and
optoelectronic applications.
Based on semiconductor diode, LEDs emit photons when electrons recombine with
holes on forward biasing. The two terminals of LEDs are anode (+) and cathode (-)
and can be identified by their size. The longer leg is the positive terminal or anode
and shorter one is negative terminal.
The forward voltage of LED (1.7V-2.2V) is lower than the voltage supplied (5V) to
drive it in a circuit. Using an LED as such would burn it because a high current would
destroy its p-n gate. Therefore a current limiting resistor is used in series with LED.
Without this resistor, either low input voltage (equal to forward voltage) or PWM
(pulse width modulation) is used to drive the LED. Get details about internal structure
of a LED.
15
Temp >=40
#include <LiquidCrystal.h>
LiquidCrystal lcd(7,6,5,4,3,2);
int led = 8;
int temp;
int fanSpeed;
int fanLCD;
void setup()
pinMode(fan, OUTPUT);
pinMode(led, OUTPUT);
pinMode(tempPin, INPUT);
lcd.begin(16,2);
Serial.begin(9600);
void loop()
temp = readTemp();
Serial.print( temp );
fanSpeed = 0;
analogWrite(fan, fanSpeed);
fanLCD=0;
digitalWrite(fan, LOW);
fanSpeed=1.5*fanSpeed;
analogWrite(fan, fanSpeed);
digitalWrite(led, HIGH);
else
digitalWrite(led, LOW);
lcd.print("TEMP: ");
lcd.print(temp);
lcd.print("C ");
lcd.setCursor(0,1);
lcd.print(fanLCD);
lcd.print("%");
delay(200);
lcd.clear();
int readTemp()
temp = analogRead(tempPin);
The time taken by the Arduino to convert analog data into digital form is
dependent on the frequency of clock source.
For speed variation we have used PWM concept which in turn stands by duty
cycle variation.
Duty cycle variation needs, different on time and off time duration, which
are generated in program through delay generation logic, where value of
digit is inversely proportional to the delay value selected for off time delay
from the speed lookup table.
RESULT
Human also mostly demands something that easily to be used without wasting
energy. To minimize or reduce the power usage, this project developed an
Automatic fan system where speed is controlled by the room temperature.
Personal computers
Washing machines
The circuit can be used for Car Engine to reduce the heat.
This paper elaborates the design and construction of fan speed control system
to control the room temperature. The temperature sensor was carefully chosen to
gauge the room temperature. Moreover, the fan speed will increase automatically if
the temperature room is increased. As conclusion, the system which designed in this
work was perform very well, for any temperature change and can be classified as
automatic control.
The focus of this research will be on the implementation of sensor that controls the
speed of the fan. Scopes of this research are:
The project will concentrate on electric standing fan rather than other type of
fan such as ceiling fan
We can monitor more parameters like humidity, light and at the same time
control them.
We can send this data to a remote location using mobile or internet.
We can draw graphs of variations in these parameters using computer.
When temperature exceeds the limit, a call will be dialed to the respective
given number by an automatic Dialer system.
Reference Books
Websites :
www.electroschematics.com
https://www.arduino.cc/
http://fun-engineering.net/
www.gadgetronicx.com.