Project showcase

# Simple Auto Fan

Basic instructions on building a simple auto fan.

• 26,139 views
• 10 respects

## Components and supplies

 relay
×1
 fan computer fan
×1
 9V battery (generic)
×1
 Arduino UNO
×1
 lm35
×1

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() {
float derece = okunanDeger / 9.31;         //centigrade calculated
delay(1000);                               // wait 1 sec

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

}
```

## Schematics

• 3 projects
• 14 followers

July 6, 2017

#### Members who respect this project

and 6 others

See similar projects
you might like

• 30,965 views
• 27 respects

#### TV remote controlled Light and Fan

Project tutorial by Rishabh

• 24,904 views
• 68 respects

• 14,770 views
• 43 respects

#### Auto Battery Charger Switch

Project showcase by John Wood

• 10,647 views
• 28 respects

#### BarkBox! Simple Noise & Intrusion Detection Device

Project showcase by vapor83

• 6,931 views