Thermistor Help
#1
Posted 01 June 2011 - 08:48 PM
The specs:
TTC Series
R25 = 10000 ohms
B25/50 = 4050
Disipation = 4.5mW/degC
Tolerance of R25 = 5-10-15
Can someone show me how to get the A/B/C constants needed for the Steinhart-Hart Thermistor formula from the data sheet?
Or is there a better method using the thermistor?
#2
Posted 02 June 2011 - 01:23 PM
I have some experience with thermistors, and know there is a way determine the coefficients, but am unsure of the way as I have not needed to.
This is a series from BC Components that is similar. They publish coefficients and therefore may be an alternative to speed up the process. This is what I have always used, and they work great.
Here is the datasheet
The coefficients for these would be:
A
0.003354016
B
0.0002519107
C
0.000003510939
D
0.0000001105179
I have applied this in the C language, so let me know if you have any other questions.
#3
Posted 03 June 2011 - 11:34 AM
#4
Posted 04 June 2011 - 07:14 PM
//ADC_Value Accepted, Farenheit Returned double GetFarenheit(int ADC_Value) { //Define reference voltage double Vref = 5; //Define thremistor value double ThermRefResistance = 10000; //Convert ADC reading to a voltage double Vin = (Vref * ADC_Value) / 1024; //Convert Voltage to resistance double ThermResistance = ThermRefResistance/((Vref/Vin)-1); // Steinhart constants for thermistor (Vishay NTCLE203E3103FB0) double a = 3.354016 * pow(10, -3); double b = 2.56985 * pow(10, -4); double c = 2.620131 * pow(10, -6); double d = 6.383091 * pow(10, -8); //Convert resistance to temperature in degrees C (Steinhart equation) double Celcius = 1/(a + b * log(ThermResistance/ThermRefResistance) + c * pow(log(ThermResistance/ThermRefResistance), 2) + d * pow(log(ThermResistance/ThermRefResistance), 3)) - 272.15; //Convert celcius to farenheit return Farenheit = 18 * Celcius + 320; }
#5
Posted 08 June 2011 - 07:31 PM
Below is how I applied it in C. If you have any questions, let me know!
//ADC_Value Accepted, Farenheit Returned double GetFarenheit(int ADC_Value) { //Define reference voltage double Vref = 5; //Define thremistor value double ThermRefResistance = 10000; //Convert ADC reading to a voltage double Vin = (Vref * ADC_Value) / 1024; //Convert Voltage to resistance double ThermResistance = ThermRefResistance/((Vref/Vin)-1); // Steinhart constants for thermistor (Vishay NTCLE203E3103FB0) double a = 3.354016 * pow(10, -3); double b = 2.56985 * pow(10, -4); double c = 2.620131 * pow(10, -6); double d = 6.383091 * pow(10, -8); //Convert resistance to temperature in degrees C (Steinhart equation) double Celcius = 1/(a + b * log(ThermResistance/ThermRefResistance) + c * pow(log(ThermResistance/ThermRefResistance), 2) + d * pow(log(ThermResistance/ThermRefResistance), 3)) - 272.15; //Convert celcius to farenheit return Farenheit = 18 * Celcius + 320; }
Is it possible to use this code with the Netduino? When I try and use this, I'm told that the pow() and log() functions do not exist. Is there a package that I need to add to my environment?
#6
Posted 08 June 2011 - 10:17 PM
Is it possible to use this code with the Netduino? When I try and use this, I'm told that the pow() and log() functions do not exist. Is there a package that I need to add to my environment?
Those are available in the Math library. Math.Pow(), Math.Log()
-dan
#7
Posted 09 June 2011 - 07:35 PM
Those are available in the Math library. Math.Pow(), Math.Log()
-dan
Thanks for your response. I tried this, and the Pow() function now works, but the Log() function is not working (e.g., System.Math.Log(ThermResistance / ThermRefResistance) reports that System.Math does not contain a definition for 'Log'). Do I need to somehow get a different Math library or version of something?
Thanks in advance for any help that you can provide.
Mike
#8
Posted 16 June 2011 - 03:56 AM
...reports that System.Math does not contain a definition for 'Log'). Do I need to somehow get a different Math library or version of something?
Yeah, there are lots of little things missing and this is one of them. But, actually, there was some discussion about a Math.Log function previously. Link below. Just make sure you read to the end of the thread because the code does not work, but the fix is described. Sorry, I always meant to go back and post a corrected version of the log function...
http://forums.netdui...ndpost__p__6949
-Valkyrie-MT
#9
Posted 20 October 2011 - 04:43 AM
they all seem to have been taken off the site.
Any ideas what happened? I was asking a question to Mike Pearson about the use of the particular Thermistor in the code below....
Below is how I applied it in C. If you have any questions, let me know!
//ADC_Value Accepted, Farenheit Returned double GetFarenheit(int ADC_Value) { //Define reference voltage double Vref = 5; //Define thremistor value double ThermRefResistance = 10000; //Convert ADC reading to a voltage double Vin = (Vref * ADC_Value) / 1024; //Convert Voltage to resistance double ThermResistance = ThermRefResistance/((Vref/Vin)-1); // Steinhart constants for thermistor (Vishay NTCLE203E3103FB0) double a = 3.354016 * pow(10, -3); double b = 2.56985 * pow(10, -4); double c = 2.620131 * pow(10, -6); double d = 6.383091 * pow(10, -8); //Convert resistance to temperature in degrees C (Steinhart equation) double Celcius = 1/(a + b * log(ThermResistance/ThermRefResistance) + c * pow(log(ThermResistance/ThermRefResistance), 2) + d * pow(log(ThermResistance/ThermRefResistance), 3)) - 272.15; //Convert celcius to farenheit return Farenheit = 18 * Celcius + 320; }
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users