Professional Documents
Culture Documents
Submitted To
2
‘Temperature Controlled Fan using Arduino’
Introduction: -
Major Features of Arduino Based Temperature Controlled Fan is to
Components: -
Arduino Uno
LM35 Sensor
16×2 LCD Display
DC Fan/motor
9V Battery
10KΩ Potentiometer
220Ω Resistor
Breadboard
opto-isolator 4N35
IGBT FGA25N120
3
Circuit Diagram: -
HARDWARE DIAGRAM: -
4
Working: -
Temperature sensors detect the temperature and generate voltage according to
temperature it senses. Arduino nano compare output voltage of temperature sensor
and operate the fan. As we are using PWM pin, the speed of fan is variable
according to temperature. According to the software code fan start to rotate at 30 0C
and at 600C speed of fan become 100%. LCD shows the value of temperature and
fan speed. LED1 indicate the temperature status i.e. glowing LED indicate
temperature is maximum.
5 LCD is connected to Arduino in higher order data mode i.e. only higher order data
pin D4 to D7 of LCD is connected to Arduino nano for data displaying. Enable and
Set/Reset pin is connected to Arduino as shown in circuit diagram. Pin 1, Pin 5 and
pin 16 of Arduino is connected to ground where Pin 2 is connected to power
supply. Pin 15 of LCD (LED+) is connected to +5V through a current limiting
resistor. At Pin 3 of LCD we have to supply voltage between Vcc and Vss, so a
variable resistor is connected as shown in circuit diagram.
Switching Circuit: -
Arduino alone cannot drive the IGBT because it requires more voltage then the
Arduino output voltage. So, in order drive the IGBT an opto-coupler 4N35 is used.
This opto-isolator also isolate control circuit and load circuit. PWM output of
Arduino drive opto-isolator 4N35 which further drive IGBT.
Code /Program: -
LiquidCrystal lcd(7,6,5,4,3,2);
int tempPin = A1; // the output pin of LM35
int fan = 11; // the pin where fan is
int led = 8; // led pin
int vout,temp;
int tempMin = 25; // the temperature to start the fan 0%
int tempMax = 60; // the maximum temperature when fan is at 100%
int fanSpeed;
int fanLCD;
void setup() {
pinMode(fan, OUTPUT);
6
6 pinMode(led, OUTPUT);
pinMode(tempPin, INPUT);
lcd.begin(16,2);
Serial.begin(9600);
}
void loop()
{
vout = analogRead(tempPin);
temp = vout * 0.48828125;
Serial.print( temp );
if(temp < tempMin) // if temp is lower than minimum temp
{
fanSpeed = 0; // fan is not spinning
analogWrite(fan, fanSpeed);
fanLCD=0;
digitalWrite(fan, LOW);
}
if((temp >= tempMin) && (temp <= tempMax)) // if temperature is higher than
minimum temp
{
fanSpeed =map(temp, tempMin, tempMax, 32, 255);
fanLCD = map(temp, tempMin, tempMax, 0, 100); // speed of fan to display
on LCD100
analogWrite(fan, fanSpeed); // spin the fan at the fanSpeed speed
}
if(temp > tempMax) // if temp is higher than tempMax
{
digitalWrite(led, HIGH); // turn on led
}
else // else turn of led
{
digitalWrite(led, LOW);
}
lcd.print("TEMP: ");
lcd.print(temp); // display the temperature
lcd.print("C ");
lcd.setCursor(0,1); // move cursor to next line
7
7 lcd.print("FANS: ");
lcd.print(fanLCD); // display the fan speed
lcd.print("%");
delay(1000);
lcd.clear();
}
Simulation Diagram: -
8
Advantage: -
9
2. This project can be used in Industry.
5. Prevents waste of energy when it’s not hot enough for a fan to be needed.
6. To assist people who are disabled to adjust the fan speed automatically.
Disadvantage: -
1. It can only be maintained by technical person. Thus, it becomes difficult to be
maintained.