REWARD POINT
ACTIVITY
REPORT
1
Design and Development of Automatic
Temperature Controlled Fan Using
Arduino
SLOT 7- FACULTY INITIATIVE –REWARD POINT
ACTIVITY REPORT
Submitted By
SRIDHARAN M
191EE228
DEPARTMENT OF ELECTRICAL AND ELECTRONICS
ENGINEERING
BANNARI AMMAN INSTITUTE OF TECHNOLOGY
(Autonomous Institution Affiliated to Anna University, Chennai)
SATHYAMANGALAM-638401
MAY 2020
2
DECLARATION
I affirm that the Faculty Initiative Reward Point task work “DESIGN
AND DEVELOPMENT OF AUTOMATIC TEMPERATURE
CONTROLLED FAN USING ARDUINO” being submitted as the record
of original work done by me under the guidance of Mrs. K.T.Maheswari,
Assistant Professor Level II, Department of Electrical and Electronics
Engineering.
SRIDHARAN M
191EE228
I certify that declaration made above by the candidates is
true.
(Signature of Guide)
Mrs.MAHESWARI K T
3
TABLE OF CONTENTS
SNO TITTLE PAGE NO
1 OBJECTIVE OF THE TASK 1
2 COMPONENTS REQUIRED 1
3 BLOCK DIAGRAM 2
4 CIRCUIT DIAGRAM 2
5 CIRCUIT DIAGRAM DESCRIPTION 3
6 THEORY
6.1. Arduino Uno 4
6.2. Temperature sensor 5
6.3. Lcd display: 5
7 CIRCUIT OPERATION 6
8 CODE 8
9 RESULT: 12
10 CONCLUSION 12
11 REFERENCE 13
4
1. OBJECTIVE OF THE TASK:
The main objective of this task is to design and development of
automatic temperature-controlled fan by using Arduino.
2. COMPONENTS REQUIRED:
Breadboard
Arduino Uno
16×2 LCD Display
LM35 Temperature sensor
12v DC Fan
12v Buzzer
100R Resistor
4.7k Resistor
1k Resistor
10k Resistor
10uf capacitor
Male to Male Jumper Wires
Battery 9v
Battery clip
USB port cable
LED bulbs (3)
1
3. BLOCK DIAGRAM:
4. CIRCUIT DIAGRAM:
2
5. CIRCUIT DIAGRAM DESCRIPTION:
1. In the Arduino board the LM35 sensor output is connected to the
analog input pin A0. Its Vcc positive pin is connected to +5 V and its
Gnd negative pin is connected to ground.
2. pin R1 is connected to A1 of the second analog input. Its two fixed
terminals are connected to Vcc ground and the middle sliding
connector is connected to pin A1.
3. LCD data pins D4, D5, D6 and D7 are connected to digital pins D5,
D4, D3 and D2 respectively. The LCD pin (En) is connected to pin 11
and the pin (Rs) is Connected to pin 12.
4. The RW pin is connected to ground.
5. The 10K potentiometer is connected to the third VEE pin of the
LCD to change its brightness.
6. LED anode pin and LED cathode pin are connected to 5 V and
ground to turn on LED lighting on LCD screen.
7. The 8ohm speaker is connected to the digital 10 pins.
8. Anode digital pins 6,7 to 8 of three red, green and blue LEDs are
connected to 470ohm current limiting resistors. Their cathodes are
small and grounded.
9. The 9th pin of the analog output controls the DC motor (fan) to
MZE3055 transistor. The 9th pin is connected to the base of the
3
MJE3055 by means of a current limiting resistor R2, the collector
exits the DC motor.
6.THEORY:
A temperature controller is a fundamental requirement in any
manufacturing, chemical or textile industry. They require a
temperature controller for a variety of processes. Any industrial
temperature control system has a temperature sensor, a temperature
control device, a display device, a temperature control device such as
a heater, refrigerator, compressor, fan, air cooler. A control device as
basic as a microcontroller.
6.1. Arduino Uno:
Arduino Uno is an opensource microcontroller based on the
Microchip ATmega328P microcontroller developed by Arduino. The
board is equipped with digital-to-analog input / output pins that can be
connected to various expansion boards or other circuits. This board
has 14 pins digital I / O pins, 6 analog I / O pins Can be programmed
4
with the Arduino IDE (Integrated Development Environment), a USB
Type B cable. USB or 9-volt battery, although it can also accept
between 7 and 20 volts.
6.2. Temperature sensor:
The LM35 is an IC temperature sensor whose output voltage
fluctuates with the ambient temperature. It is a low-cost IC that can be
used to measure temperatures from -55 ° C to -150 ° C.
It can be easily connected to any microcontroller with ADC function
or any development platform such as Arduino.
Turn on the IC by applying a regulated voltage such as + 5V to the
input pin and connecting the ground pin to the circuit ground. Now
we can measure the temperature as voltage.
6.3. Lcd display:
5
The 16x2 LCD screen is a very simple module that is often used in
various device circuits. 16x2 LCD means that it can display 16
characters per line, there are 2 lines. Each character on this LCD is
displayed with a 5x7 pixel matrix.
7. CIRCUIT OPERATION:
1.LM35 sensor output 0V to 10mV / s - means that when the
temperature fluctuates by 1 ° C, the output voltage of the sensor
increases by 10mV.
2.Since the sensor output is connected to the analog input of the
Arduino, it will change the numeric value from 0 to 1023.
3.The output of the LM35 sensor is limited to 0–1 V The internal
ADC reference is 5 V, so the sensor output is multiplied by 5 to get
the full range.
4.Then, as the temperature rises, the analog output of the sensor
increases from 0 to 1 V, and the Arduino produces the corresponding
numerical values from 0 to 1023.
5.The temperature rises, the analog output of the sensor increases
from 0 to 1. The Arduino outputs the corresponding numeric values
from 0 to 1023.
6.Therefore, the range from 0 to 1 V is divided into 1,024 steps. This
means that each phase has a resolution of 1/1024 = 0.00097 = 0.97
mV.
6
7.The LM35 sensor output changes 10mV for every 1 ° C change in
temperature, so if the analog reading changes from 10 / 0.97 = 10.31,
that means a 1 ° C change in temperature.
8.Then the Arduino reads the analog output voltage from the sensor,
gets an analog value from 0 to 1023, divides it by a factor of 10.31,
and displays that value as the current temperature on the LCD.
9.Arduino receives the temperature value set by potentiometer R1.
When the potentiometer is changed, the analog input voltage changes
from 0 to 5 V and the corresponding output changes from 0 to 1023. It
is displayed in the range from 0 to 100 because the temperature is set
between 0 and 100 oC.
10.Then you can change the dishes and set the temperature from 0 oC
to 100 oC, and it will show as the set temperature on the LCD.
11.Actual and target temperatures are sent to the PC via the serial port
and displayed on the Arduino IDE serial monitor.
12.if the actual temperature measured by LM35 is within ± 5 oC of
the set (reference) temperature, the LCD will display "Temperature in
range" and the GREEN LED will light up.
13.But if actual temperature increases more than 5 oC of set
temperature then RED LED turns ON and fan speed is increase by
increasing the pulse width at pin 9. The speaker starts generating
beep sound and the message is displayed on LCD as
“overtemperature, fan speed increased”
14.Similarly if actual temperature decreases less than 5 oC of set
temperature then BLUE LED turns ON and fan speed is decreased.
7
15.Again the speaker starts beeping and the message is displayed
on LCD as “temperature down, fan speed decreased”
16.So the fan speed automatically increased or decreased as the
temperature varies
8. CODE:
#include <LiquidCrystal.h>
# define temp_sensor_pin A0
# define ref_pin A1
#define fan_op_pin 9
#define red_led 6
#define green_led 7
#define blue_led 8
#define sound_pin 10
float temperature;
int fan_speed = 50;
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
8
Serial.begin(9600);
lcd.begin(16, 4);
lcd.clear();
lcd.print("set temp:");
lcd.setCursor(0,1);
lcd.print("cur temp:");
pinMode(red_led,OUTPUT);
pinMode(green_led,OUTPUT);
pinMode(blue_led,OUTPUT);
analogWrite(fan_op_pin, fan speed);
void loop()
int
sensor_value,ref_value,max_temp_limit,min_temp_limit;
sensor_value = analogRead(temp_sensor_pin); // get
the sensor reading
ref_value = analogRead(ref_pin);
ref_value = map(ref_value, 0, 1023, 0, 100);
max_temp_limit = ref_value+5;
min_temp_limit = ref_value-5;
temperature = (5*sensor_value)/10.31;
9
Serial.print("set temperature is ");
Serial.println(ref_value);
Serial.print("current temperature is ");
Serial.println(temperature);
lcd.setCursor(9,0);
lcd.print(ref_value);
lcd.print("*C");
lcd.setCursor(9,1); // set cursor to 2nd line 1st
column
lcd.print(temperature); // print temperature
lcd.print("*C");
if(temperature > max_temp_limit)
lcd.setCursor(0,2);
lcd.print("over temperature");
lcd.setCursor(0,3);
lcd.print("fan speed incr");
if(fan_speed<150) fan_speed += 20;
analogWrite(fan_op_pin, fan_speed);
digitalWrite(red_led,HIGH);
digitalWrite(green_led,LOW);
digitalWrite(blue_led,LOW);
10
tone(sound_pin,1245,1000);
else if(temperature < min_temp_limit)
lcd.setCursor(0,2);
lcd.print("temperature down");
lcd.setCursor(0,3);
lcd.print("fan speed decr");
if(fan_speed > 50) fan_speed-=20;
analogWrite(fan_op_pin, fan_speed);
digitalWrite(red_led,LOW);
digitalWrite(green_led,LOW);
digitalWrite(blue_led,HIGH);
tone(sound_pin,1245,1000);
else if((temperature<max_temp_limit) &&
(temperature>min_temp_limit))
lcd.setCursor(0,2);
lcd.print("temperature is ");
lcd.setCursor(0,3);
lcd.print("within limit ");
11
digitalWrite(red_led,LOW);
digitalWrite(green_led,HIGH);
digitalWrite(blue_led,LOW);
delay(1000); // 1 sec delay
9. RESULT:
Basic building blocks of temperature controller system. The given
project is a demonstration of such system. It uses LM35 as
temperature sensor and DC motor as a fan as a temperature
controlling device. It utilizes Arduino board as controlling device
and ATMega328 as a micro controller. It uses 16x4 LCD panel to
display actual temperature, set temperature and other message and
notifications
10.CONCLUSION:
Build a temperature-controlled fan using Arduino, With this
circuit, we will be able to adjust the fan speed in our home or
office according to the room temperature and also show the
temperature and fan speed changes on a 16x2 LCD display.
12
11.REFERENCE:
https://circuitdigest.com/microcontroller-projects/automatic-temperature-
controlled-fan-project
https://create.arduino.cc/projecthub/ambhatt/temperature-controlled-fan-
with-lcd-using-arduino-b0b257
https://create.arduino.cc/projecthub/embeddedlab786/temperature-based-
fan-speed-control-945f9d
13