# Temperature controlled fan with opamp and Lm35

Discussion in 'General Electronics Chat' started by joerack, Jun 2, 2016.

1. ### joerack Thread Starter Member

Jun 2, 2016
30
1
As the topic says, I'm trying to build a little circuit but I don't know how to short circuit the resistance and calibrate the lm35 temperature to desired value .

2. ### #12 Expert

Nov 30, 2010
18,093
9,683
1) you can't calibrate an LM35. They output 10 mv/degree. Period.
2) without a drawing of your circuit we can't even guess what you're trying to short out.
Post a drawing.

cmartinez likes this.
3. ### shteii01 AAC Fanatic!

Feb 19, 2010
4,452
707
Theoretically you could do LM35+opamp+fan. But. You need fan with the controller circuit built in for this simple setup to work. Automotive fans for example, the kind in front of the engine. The one I used before had 0-10VDC speed scheme. So you would take X mV from LM35, run it to the opamp, opamp amplifies it to whatever Y volts you need and feeds it to the fan, fan got speed control circuit, it sees Y volts and goes to whatever rpm that Y volts correspond to.

Hashtag One Two (☺7) is right about LM35. Here is handy website on LM35:
The LM35 does not require any external calibration or trimming and maintains an accuracy of +/-0.4 oC at room temperature and +/- 0.8 oC over a range of 0 oC to +100 oC.
http://www.facstaff.bucknell.edu/mastascu/elessonshtml/sensors/templm35.html

Once you have the fan with control circuit selected, then the opamp can be figured out.

Or you can do Arduino thing: https://learn.adafruit.com/tmp36-temperature-sensor
With the Arduino board you can use PMW to control the fan speed so you can use dumb fan. You will need a transistor to control the fan because Arduino boards don't have the current needed to run the fan.

4. ### joerack Thread Starter Member

Jun 2, 2016
30
1
Ok this is my circuit

5. ### Dodgydave AAC Fanatic!

Jun 22, 2012
7,652
1,271
Your circuit is over complicated, this can be done with one op amp comparator with hysteresis.

6. ### joerack Thread Starter Member

Jun 2, 2016
30
1
could you please show me how?

and one more thing: I tried creating a simpler version with a voltage divider using ntc resistor, but the only way to heat it enough was to use a cigarette lighter, obviously I ended up burning the ntc. Is there another resistor that is more heat sensitive?

7. ### Dodgydave AAC Fanatic!

Jun 22, 2012
7,652
1,271
Last edited: Jun 3, 2016

Jun 2, 2016
30
1
9. ### Dodgydave AAC Fanatic!

Jun 22, 2012
7,652
1,271
Yes thats ok, but you need hysteresis on it from the output to the + input pin3, i would swap the inputs round and use a npn transistor.

10. ### eetech00 Senior Member

Jun 8, 2013
1,254
253
Hi

Or you can do it this way.
Use P1 to adjust the fan drive current vs temp C.

• ###### FanDrvr.png
File size:
51.5 KB
Views:
36
joerack likes this.
11. ### wayneh Expert

Sep 9, 2010
15,214
5,560
Do you have the fan yet? Different fans require different control schemes.

The easiest control is on/off, which you can do with any fan, and this works fine for controlling temperature within a narrow range.

I think most answers so far assume you want proportional speed control, although you haven't stated this. What are we trying to do?

12. ### joerack Thread Starter Member

Jun 2, 2016
30
1
I'm building a smart house model with arduino for my school graduation. Arduino would control 3 leds plus 2 servo motors with bluetooth

Inside the house I would also like to emulate an air conditioning system. It would simply turn on a fan when the temperature rises.
A hot ntc would have a low resistance, while a cold ntc would have a higher resistance, thus increasing/decreasing the voltage, and activating/deactivating the fan. (obviously you know this)
Unfortunately in 2 years time we've never had access to the lab (my italian school is poor) so I have little familiarity on the practical side, that's why I'm trying to dumb down the project. I'm still trying to grasp this idea of the hysteresis, but I understand that without hysteresis the fan would turn on and immediately turn off)

13. ### wayneh Expert

Sep 9, 2010
15,214
5,560
That's great! A thermostatic control (on/off instead of proportional) is much easier to implement. I would use a LM35 and a comparator such as LM393. You can use your op-amp as a comparator if you want, but a comparator is purpose-built for such an application. Actually I think your Arduino might also be able to act as a comparator?

Then you just need a single transistor configured as a switch to control power to the fan. I would use an N-channel MOSFET, and just about any you can find will easily handle the current of a small fan.

Jun 2, 2016
30
1
15. ### ian field AAC Fanatic!

Oct 27, 2012
6,306
1,147
In the early days of cool'n'quiet ATX PSUs; the fan control circuit was on a small bit of PCB fixed to one of the heatsinks, it was just a couple of transistors and a few resistors. It was pretty easy to hand trace the circuit.

Then the manufacturers got their act together and included the fan control circuit on the main PCB with everything else - hand tracing got a lot more difficult.

16. ### joerack Thread Starter Member

Jun 2, 2016
30
1
I have tried to make this circuit according to the scheme. Would you please check if it's ok?
I have no lab experience whatsoever

File size:
15.5 KB
Views:
21
• ###### sketch circuit.jpg
File size:
215.1 KB
Views:
20
Last edited: Jun 7, 2016
17. ### Techno Tronix Member

Jan 10, 2015
139
10
Last edited: Jun 7, 2016
18. ### joerack Thread Starter Member

Jun 2, 2016
30
1
I have used a lm35
Are you talking about mine or the pic you posted

Jan 10, 2015
139
10