Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Manish Kumar Yadav
Published

Automatic fan control system using LM35 temperature sensor

In this project I have made a automatic fan control system which switch on and off the fan according to the temperature inside the room.

IntermediateProtip1 hour14,083
Automatic fan control system using LM35 temperature sensor

Things used in this project

Story

Read more

Schematics

Automatic fan control system using LM35 temperature sensor

Code

Automatic fan control system using LM35 temperature sensor

Arduino
//this project is made by Manish Kumar Yadav
int motorpin=9;
int sensorpin= A0;  
int sensorval;
int ledpin1=13;
int ledpin2=12;
void setup() {
  pinMode(motorpin,OUTPUT);
  pinMode(sensorpin,INPUT); 
  pinMode(ledpin1,OUTPUT);
  pinMode(ledpin2,OUTPUT);
  // put your setup code here, to run once:

}

void loop() {
  sensorval=analogRead(sensorpin);
  sensorval=sensorval/2.0741;
  if(sensorval>30)
  {
    digitalWrite(motorpin,HIGH);
    digitalWrite(ledpin1,HIGH);
    digitalWrite(ledpin2,LOW);
    delay(500);
  }
  else
  {
    digitalWrite(motorpin,LOW);
    digitalWrite(ledpin1,LOW);
    digitalWrite(ledpin2,HIGH);
    delay(500);
  }
}

Credits

Manish Kumar Yadav
11 projects • 17 followers
Highly skilled Electronics and Communication Engineer, adept Programmer, and creative PCB Designer.
Contact

Comments

Please log in or sign up to comment.