Project showcase
Simple Auto Fan

Simple Auto Fan

Basic instructions on building a simple auto fan.

  • 10,640 views
  • 0 comments
  • 6 respects

Components and supplies

relay
×1
fan
computer fan
×1
Tens70
9V battery (generic)
×1
A000066 iso both
Arduino UNO & Genuino UNO
×1
lm35
×1

About this project

There is one point to which I want to draw attention. When setting up the circuit I connect the common GND pins. Some fans cannot measure the extent of trying correctly. If you encounter such a thing, you can connect GND separately. When I hooked them up separately, it was solved.

I must say also that with the relay NO, it is necessary to pay attention to NC pins. NO means "normally open" and NC means "normally closed". So, if you connect the NO pin, it stops when it reaches 0. If you connect the NC pin, it stops when it reaches 0 1 runs.

First, let me mention that it produces a value between 0 and 1 volt with LM35 value as a margin of error; but the way you work with 5V, there are values ​​that can be high.

That's why we need to inform the Arduino to produce values ​​between 0 and 1.1 volts. Here you analogReference (INTERNAL) are doing with the command.

When we talk about self-assessing the degree 10mV from each LM35 that 1 ° C corresponds to, we were told to use the Arduino reference to 1,1V. In this way, it is going to have to look at each analog input value ​, like 1.0742 mV. i.e., 10 mV, since it corresponds to 1 ° C; 10 / 1.0742 gives us the value of approximately 9.31.

Code

CodeC/C++
// LM35 and relay pins defined
int role=7;       
int lm35=A0;

void setup() {

  Serial.begin(9600);    //Serial comminication started
  analogReference(INTERNAL);    //arduino 1,1V reference set
  pinMode(role,OUTPUT);       //Relay is defined as output

}

void loop() {
  int okunanDeger = analogRead(A0);          //Read analog value 
  float derece = okunanDeger / 9.31;         //centigrade calculated
  Serial.println(derece);                    //centigrade print on screen
  delay(1000);                               // wait 1 sec

  if(derece >25)
    digitalWrite(role,HIGH);                 //relay power on
    else
    digitalWrite(role,LOW);                  //relay power off
  
 
}

Schematics

circuit
Fan kontrolu xiwwbbl3df

Comments

Similar projects you might like

TV remote controlled Light and Fan

Project tutorial by Rishabh

  • 19,772 views
  • 13 comments
  • 64 respects

DIY Auto Voice Record and Playback

Project tutorial by Team gadgetprogrammers

  • 9,908 views
  • 5 comments
  • 14 respects

Auto Battery Charger Switch

Project showcase by John Wood

  • 7,176 views
  • 6 comments
  • 22 respects

BarkBox! Simple Noise & Intrusion Detection Device

Project showcase by vapor83

  • 5,366 views
  • 0 comments
  • 10 respects

Control a Fan with Your Mobile Phone

Project showcase by Khloud Mohamed

  • 2,620 views
  • 0 comments
  • 6 respects
Add projectSign up / Login