Project Title
FAN AUTOMATION WITH TEMPERATURE
SENSOR
USING ARDUINO
About me:
MUHAMMAD DANISH HASSAN
BS(SE) COMSATS UNIVERSITY ISLAMABAD
WAH CAMPUS
OBJECTIVE
 TEMPERATURE MEASURMENT
 DEGITAL DISPLAY OF TEMPERATURE
 USE OF ARDUINO TO DISPLAY TEMPERATURE
 FAN AUTOMATION
COMPONENT
 LM35 sensor.
 Arduino uno
 Computer.
 LCD 16x2.
 Variable Resistor 10K.
 5V DC Relay.
 12V DC Fan.
WORKING
 When sensor reads temperature from surrounding , it feeds
the reading to analog input pin of Arduino.
 There is ADC in Arduino which converts the analog value into
digital value and displays the temperature on LCD.
 The principle of LM35 working is that as the temperature
increases, it sends the voltage accordingly to the Arduino for
conversion. The formula is
10mV = 1C rise in
WORKING…
 Here we have put the conditional statement in the Arduino
coding for fan switching. When temperature rises by 37C, the
digital pin8 of Arduino becomes active and send some voltage
to the dc relay. Then the DC relay amplifies the voltage to
some value enough to operate the fan and feeds it to the fan
and the fan turns on every time the pin8 is enabled.
CODING:
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
const int A= 0;
int FAN= 8;
void setup()
{
Serial.begin(9600);
lcd.begin(16,2);
pinMode(FAN, OUTPUT);
}
CODING…
void loop()
{
int v = analogRead(A);
float mV = (v / 1024.0) * 5000;
float Celsius = mV / 10;
CODING…
lcd.clear();
lcd.setCursor(0,0);
lcd.print("CENTIGRADE=");
lcd.print(celsius);
lcd.print("C");
lcd.setCursor(0,1);
lcd.print("FARENHEIT=");
lcd.print((celsius * 9)/5 + 32);
lcd.print("F");
delay(1000);
CODING…
if (celsius >37)
{
digitalWrite(8, HIGH);
}
else
digitalWrite(8, LOW);
}
THANK YOU

Project presentation