The assignment below automatically feels the enveloping temperature and automatically adjusts the cooling fan speed in order to maintain a given heatsink's temperature within the stipulated safe limits. This automatic handling is completed with an Arduino and a temperature sensor IC LM35.
OUR TARGET:
1). The moment temperature of the heatsink grows above 50 degree Celsius (it is possible to modify this value in program based on your individual need, described in working segment) fan motor begins operating.
2). And with every degree of increase in temperature, acceleration of fan motor additionally improves.
3). Fan runs at its prime speed the moment temperature goes up to 70 degree Celsius ( this value could be altered in program).
TEMPERATURE SENSOR LM35:
To accomplish the project stated earlier, we intend to make use of temp. Sensor LM35 as it is employed broadly and is quickly accessible.
LM35 includes 3 pins as anyone can easily see in figure.
1. Vin-- this particular pin is linked to dc power supply around 4 to 20 v.
2. Vout-- this specific pin offers output as voltage.
3. GND-- this pin is attached to gnd terminal of circuit.
LM35, when associated with power supply senses the temperature of environment and transmits comparable voltage according to per degree climb in temperature by means of its output pin.
LM35 may sense virtually any temp. somewhere between -50 degree to +150 degree Celsius and boosts output by 10 millivolts with 1 degree surge in temperature. Therefore highest voltage it could present as output is actually 1.5 volts.
THE REASON WHY ARDUINO IN THIS TEMPERATURE CONTROLLER PROJECT?
Arduino is needed to alter the analog level acquired from output pin of LM35 to a digital value and delivers the matching digital output (PWM) towards the gate of the concerned mosfet.
We are going to likewise use arduino instructions to print temperature, communicating analog value and digital output towards mosfet on serial monitor of ARDUINO IDE.
EXACTLY WHAT MAY BE THE FUNCTION OF POWER MOSFET?
This circuit is going to be useless if this could not operate a powerful fan motor. Consequently to run such motor power mosfet is employed.
PARTS LIST FOR THE HEASTSINK COOLER FAN PROJECT:
1. LM35
2. ARDUINO
3. POWER MOSFET ( IRF1010E)
4. DIODE (1N4007)
5. FAN (motor)
6. FAN POWER SUPPLY
Circuit Diagram for the heatsink fan controller circuit
CODE:
float x;// initialise variables
int y;
int z;
void setup()
{
pinMode(A0,INPUT); // initialize analog pin A0 as input pin
Serial.begin(9600); // begin serial communication
pinMode(10,OUTPUT); // initialize digital pin 10 as output pin
}
void loop()
{
x=analogRead(A0) ; // read analog value from sensor's output pin connected to A0 pin
y=(500*x)/1023;// conversion of analog value received from sensor to corresponding degree Celsius (*formula explained in working section)
z=map(x,0,1023,0,255) ; // conversion of analog value to digital value
Serial.print("analog value ");
Serial.print( x) ; // print analog value from sensor's output pin connected to A0 pin on serial monitor( called "analog value")
Serial.print(" temperature ");
Serial.print( y) ; // print the temprature on serial monitor( called "temprature")
Serial.print(" mapped value ");
Serial.print( z*10) ; // multiply mapped value by 10 and print it ( called " mapped value " )
Serial.println();
delay(1000) ; // 1 sec delay between each print.
if(y>25)
{analogWrite(10,z*10) ; // when temp. rises above 25 deg, multiply digital value by 10 and write it on PWM pin 10 ( ** explained in working section)
}
else
{analogWrite(10,0) ; // in any other case PWM on pin 10 must be 0
}
}