Introduction: Automatic Temperature Controlled Fan

This is a project on a automatic fan which changes it's speed with change in temperature . The temperature of the room is displayed on the lcd.
It is a cheap, fun and easy project to do.

Step 1: Materials Required

Arduino -1
Motor(with fan)-1
16,2 lcd display-1. (I have used a development board)
L293d( motor driver)-1(I have used a development board)
Bread board-1
LM 35 (temperature sensor)-1
Card board or any platform
Few jumper wires
Potentiometer-1

Tools
- computer with Arduino software
- cable to connect Arduino to computer

Step 2: Building the Circuit

Connecting the Lcd display to Arduino
- RW to ground
- RS to 12
- Enable to 11
- D7 to 2
- D6 to 3
- D5 to 4
- D4 to 5
- wiper to VO
- pin A of potentiometer to ground
- pin B of potentiometer to Vcc

Connecting l293D to Arduino
- Pin 1 of l293D to enable (5v)
- pin 2 of l293D to pin 7 Arduino
- pin 3 of l 293D to pin motor
- pin 6 of l293D to pin motor
- pin 4 of l293D to ground
- pin 7 of l293D to pin 8 Arduino
- pin 8 of l293D to 5v
- pin 16 of l293D to 5v

Connecting LM35 to Arduino
- Vcc (1st pin) to 5v
- Output (2nd pin) to Ao of Arduino
-Ground(3rd pin) to ground

(You can also use a development board with combined lcd and motor driver)

Connect the motors to pin 3 and 6 of l293D

Step 3: Coding Arduino

#include <LiquidCrystal.h>
float temp;
int temppin= 0;
int in1=7;
int in2=8;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{ lcd.begin(16, 2);
Serial.begin(9600);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
}
void loop()
{
temp=analogRead(temppin);
temp=temp*0.48828125;
lcd.setCursor(0, 1);
lcd.println(temp);
lcd.print("*f");
delay(500);
if(temp<100)
{
digitalWrite(in1,HIGH);
digitalWrite(in2,LOW); }
if(temp<90)
{ digitalWrite(in1,HIGH);
digitalWrite(in2,LOW);
delay(1500);
digitalWrite(in1,LOW);
digitalWrite(in2,LOW); }
if(temp<80)
{
digitalWrite(in1,HIGH);
digitalWrite(in2,LOW);
delay(1000);
digitalWrite(in1,LOW);
digitalWrite(in2,LOW);
}
else;
{
digitalWrite(in1,HIGH);
digitalWrite(in2,LOW);
delay(1500);
digitalWrite(in1,LOW);
digitalWrite(in2,LOW); } }

Reuse Contest

Participated in the
Reuse Contest

Home Automation

Participated in the
Home Automation