PDA

View Full Version : Rctime and ntc



larosacristian
- 21st October 2013, 18:30
Hi, I'm Cristian, I tried to use BASIC pic to read the value of a NTC with RCTIME command but do not know how to convert that value in degrees. Could you help me? I used a ntc 10k and a capacitor 100nf, I tried to do a reading at 27 degrees and 128 with me RCTIME command.
How can I convert that value.
Thanks in advance
Greetings

Archangel
- 22nd October 2013, 02:02
Wow, having never used RCTIME I am flying by the seat of my pants here (as Usual), but you are able to approximate the resistance (you do the math) of your NTC and from there I would make a lookup table to output the value, based upon the specs of the thermistor (published table?) and your own recorded values. For instance if your RCTIME results are 1200 and your NTC is 200 F and it if it is 600 @ 32F then you can start that table. Again compare how your results track the published specs.

I tried to do a reading at 27 degrees and 128 with me RCTIME command.
How can I convert that value.
compare your readings & subtract, multiply or divide the difference by 101/100

larosacristian
- 22nd October 2013, 11:49
Ok thanks for your response. I made a table and I got 367, 6 ° C and 67 ° C with 80 now you suggest I split the valiri for 101 or 100? I did not understand. sorry but I write with a translator because I'm Italian. hello

Archangel
- 22nd October 2013, 12:10
the 100 & 101 are percent based upon your sample spread what you need is the ratio of reading per degree, you can divide it or use a lookup table. The lookup table is more tedious but can be adjusted to calibrate results. The numbers I got were 287 & 4.377, 4.377 per degree. Round it up to 4.38
multiply everything by 100 and divide. Check div32 function.

larosacristian
- 22nd October 2013, 14:32
since I am a beginner can you please explain step by step how you did to get that value. hello thanks

Archangel
- 22nd October 2013, 20:53
Sure, 67 - 6 = 61 hi temp - lo temp
367 - 80 = 287 hi reading - low reading
287 / 61 = 4.7049180327868852459016393442623
so round off to 4.70 ratio per degree
appears my 4:00 am math was a little skewed

larosacristian
- 22nd October 2013, 21:44
so I have to grades I should take the value derived from RCTIME, for example 367, and divide it by 4.7 and then obtain the degree? because if it does not come out a correct value. I'm sorry the disorder

Archangel
- 23rd October 2013, 04:19
so I have to grades I should take the value derived from RCTIME, for example 367, and divide it by 4.7 and then obtain the degree? because if it does not come out a correct value. I'm sorry the disorder PBP's aversion to decimal math, you need to convert to integer math, in this case, multiply everything by 100 and violla integer math.

larosacristian
- 23rd October 2013, 09:26
thanks again, that you say, 367x100 = 36700/4.7 = 7808/100 = 78 but I have to get 6 ° C not 78 what is wrong?

Archangel
- 23rd October 2013, 10:11
You know what? It's not going to be linear anyway, so don't lose too much sleep over it.
“Steinhart-Hart” is something to google, it looks like thermistors make a big "S" curve on a graph.
Here is a link to thermocouple chart for the common K type thermocouple, see if you can find something similar for your particular thermistor
so you do not have to make your own.
BTW what are you making here anyway, and how critical are the readings ?

Check these 2 threads:
http://www.picbasic.co.uk/forum/showthread.php?t=14216
http://www.picbasic.co.uk/forum/showthread.php?t=14008

aratti
- 23rd October 2013, 15:02
NTC are negative termoresistor. Which means that while temperature increases resistance of the termistor decrease, so they are inversely proportional.

Al.

Archangel
- 23rd October 2013, 19:18
RE: Yes it does but it does not mean they are linear, which is why I do not think simple division will have accuracy.

larosacristian
- 23rd October 2013, 20:09
thanks for the answers, I do not need to be precise I just have to control the switching on and off at a given temperature a fan then, that there is an error of a degree I do not care.

AvionicsMaster1
- 24th October 2013, 14:04
Of the one specific thermistor I looked I downloaded the excel file and from 0 degree to 100 degree the curve is indeed exponential. I tried to import the data into excel but I've forgotten how to get it to give you a formula to fit the data entered. I browsed a few others and they all look about the same but you can find the math for a precise formula at http://www.epcos.com/web/generator/Web/Sections/ProductCatalog/Sensors/TemperatureMeasurement/PDF/PDF__StandardizedRT,property=Data__en.pdf;/PDF_StandardizedRT.pdf. Putting that into PBP will be a challenge to say the least.

This site though has a much easier formula if you know a little of your thermistors' data:http://www.mstarlabs.com/sensors/thermistor-calibration.html

Though I thought this site gave you a better idea of how to find the right formula:http://www.cantherm.com/products/thermistors/choosing_ntc.html

larosacristian
- 24th October 2013, 16:27
thank you very much I will try to set formulas in pbp and let you know. thank you very much. if someone already has some sample code that can assist me I would be most grateful if you would provide me. greetings