Maker Pro
Maker Pro

thermistor

glewis721

Apr 30, 2013
49
Joined
Apr 30, 2013
Messages
49
hi i am trying to make a thing that turms on a fan when the temp is high enough. i have got the fan working, and can turn on and off the fan from the arduino which i am using for the project. the arduino can also read the thermistor's resistance, but it's not very consistante:

Analog reading 241.00
Thermistor resistance 3081.84
Analog reading 206.00
Thermistor resistance 2521.42
Analog reading 233.00
Thermistor resistance 2949.37
Analog reading 984.00
Thermistor resistance 252307.93 squeez thermistor
Analog reading 0.00
Thermistor resistance 0.00
Analog reading 0.00
Thermistor resistance 0.00
Analog reading 240.00
Thermistor resistance 3065.13 stop squeezing thermistor
Analog reading 1023.00
Thermistor resistance inf
Analog reading 1023.00
Thermistor resistance inf
Analog reading 685.00
Thermistor resistance 20266.27
Analog reading 0.00
Thermistor resistance 0.00
Analog reading 0.00
Thermistor resistance 0.00
Analog reading 181.00
Thermistor resistance 2149.64
Analog reading 1023.00
Thermistor resistance inf
Analog reading 1023.00
Thermistor resistance inf
Analog reading 689.00
Thermistor resistance 20628.74

i got these patterns throughout the test, and i was wondering if i could make it more consitant, as i don't want the fan to keep turning on and off all of the time.

also could somebody tell me how to convert the restance to degrees fahrenheit

Thanks =)
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Show us the circuit you're using.

Oh, and do you have any specs on the thermistor?
 

donkey

Feb 26, 2011
1,301
Joined
Feb 26, 2011
Messages
1,301
also the coding.
I find giving yourself a couple degree between on and off a good idea. say for example make it turn the fan on at 40 and off at 30 even lower if you wanted. also you can have the fan going constantly just pwm it as the temp increase.
 

glewis721

Apr 30, 2013
49
Joined
Apr 30, 2013
Messages
49
Show us the circuit you're using.

Oh, and do you have any specs on the thermistor?

yes the thermistor is a 10K ohm NTC thermistor, part no. 207037 from Jameco.
i will get a schematic up here asap
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
you have to upload the image

you cannot link to a file/folder somewhere on your hard drive

Dave
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
1) ... click on Go Advanced button below your text box
it opens up another section below the text box with a button called Manage Attachments

2) ... click on Manage Attachments button and a small window will open up so you can upload a file from your computer ...
4) ... click on Browse button and go to the location on your puter where the file is
5) ... select that file
6) ... once its selected it will appear in the box to the left of the Browse button
7) ... click the Upload button and the file name will appear under a heading of current attachments ( in that small window)

Dave
 

glewis721

Apr 30, 2013
49
Joined
Apr 30, 2013
Messages
49
i dont think that worked. i'll try again
 

Attachments

  • schematic1.png
    schematic1.png
    52.4 KB · Views: 102

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
OK, what you have done appears (almost -- see last paragraph) correct. The thermistor is arranged as a voltage divider with another resistor and you are sensing the analog voltage returning some value.

The way you've drawn the circuit, that value will go up as the temperature falls, and fall as the temperature rises. (you can reverse that by swapping the position of the fixed resistor and the thermistor)

What you need to do now is to determine the reading you get at the temperature that you want the fan to turn on. Let's say that's 6000.

A simple circuit would turn the fan on at <= 6000 and of at > 6000. However, this would mean the fan was constantly turning on and off at temperatures around the point where the thermistor reads 6000.

A better scheme is to turn it on when the reading gets down to <= 6000, and then leave it on until the reading rises to say, 6500.

In order to do that, you need to know, not only the reading, but the current state of the fan (on or off).

As donkey advised, you could also do PWM to control the speed of the fan, but not if you're driving it with a relay. So I'm not going to expand on that.

Also, you have omitted a diode across the relay coil. Without that, your transistor will not have a very long or happy life. The diode should go directly across the coil of the relay and be oriented so that the diode does not conduct when the relay is powered. The band on the end of the diode should be at the end of the relay coil connected to +ve
 

glewis721

Apr 30, 2013
49
Joined
Apr 30, 2013
Messages
49
Could you show me an example of the diode-thing? I'm not sure that I get it.
 

glewis721

Apr 30, 2013
49
Joined
Apr 30, 2013
Messages
49
Can somebody please show me the coding to convert the restance to degrees farenhight (If I flip the resistors like *steve* said)?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Could you show me an example of the diode-thing? I'm not sure that I get it.

See here, Scroll down to "protection diodes for relays"

Can somebody please show me the coding to convert the restance to degrees farenhight (If I flip the resistors like *steve* said)?

There is no simple way and you rarely require it unless you're trying to report an actual temperature.

Normally you look at the datasheet and use that to determine the resistance at a couple of key temperatures. From there you can calculate the voltage the voltage divider will produce, and from that what the arduino will read from the analog pin.

An easier, more straightforward, and often more acccurate method (which eliminates all the math) is to simply subject the thermistor to the temperature you're interested in and see what the arduino reads.
 
Last edited:

glewis721

Apr 30, 2013
49
Joined
Apr 30, 2013
Messages
49
Ummm... The link does not work for me. It is all white with Page not found in the corner.
 

glewis721

Apr 30, 2013
49
Joined
Apr 30, 2013
Messages
49
The thermistor didn't come with a datasheet. Where could I find one? It is part no. 207037 from Jameco.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
This should work better.

Sorry about that...
 
Top