NO floating point

Revolvr

New Member
Thinking outside the box, er rocket, you could just use a simple thermistor with low thermal inertia and output the voltage measured to the EEPROM directly without conversion. Then after flight, load it into Excel and use more sophisticated processing, like Steinhart-Hart equations calibrated to the device, to derive the temperatures.
 

hmjswt

New Member
Thinking outside the box, er rocket, you could just use a simple thermistor with low thermal inertia and output the voltage measured to the EEPROM directly without conversion. Then after flight, load it into Excel and use more sophisticated processing, like Steinhart-Hart equations calibrated to the device, to derive the temperatures.
Hallo Revolvr,

Bullseye.
I like this.
I am going to buy me a couple of this things and test them.
A little math will not harm this old brain.
Do you have any experiences with thermistors?
What types to buy etc?
Thanks for the tip.

Henk Siewert
 

Dippy

Moderator
Revolvr's suggestion is really good; collect raw data as fast as possible and process at leisure.

I haven't delved into the whole thread but one thing that many peole forget is to define the parameters/numbers of the problem BEFORE choosing a method.
Qus:
1. What is the likely maximum temperature? (Can a LM35/thermistor survive?)
2. What are you trying to achieve/find out?
3. Does the lump you are measuring have a thermal 'behaviour' that can justify 100mS sampling? (a kg lump of steel won't chjange rapidly if heated by a candle).

The general rule for measuring is that the method shouldn't affect the system but you can't defeat the laws of Physics.

What thermistor?
1. Smallest heat capacity.
2. One that can easily survive your temperature.
3. And has a proper data sheet that provides the parameters to put in to Steinhart-hart equation.(Without those you'll waste your time).
 

Armp

Senior Member
What thermistor?
1. Smallest heat capacity.
2. One that can easily survive your temperature.
3. And has a proper data sheet that provides the parameters to put in to Steinhart-hart equation.(Without those you'll waste your time).
There are good examples at http://www.instructables.com/id/PICAXE-Pitcher-Perfect-Thermometer/, http://www.phanderson.com/picaxe/picaxe_thermistor.html
and http://www.phanderson.com/picaxe/lin_thermistor.html

I use the Vishay NTCLE100E series. Comprehensive data and equations contained in http://www.vishay.com/docs/29049/ntcle100.pdf.

I stuffed the relevant parts into Excel to do a best fit for whatever range I need.

For the device I use for 32F-99F the equation becomes T = 159.77 - 0.16227 * ADC10
which twizzles to fixed point as below

Code:
ReadADC10 ADCpin,L1

L1=L1*43/2*3                 ' Calc: T = 159.77 - 0.16227 * ADC10
NewTemp=63928-L1/40     ' 4 * 15977 - S_w1 + 20

If NewTemp > 999 OR NewTemp < 320 Then : Sertxd(" *Out of Range* ")
If anyone's interested I can dig out the details...
 

Puuhaaja

Senior Member
The DS18B20 is not particularly fast at returning a result, up to 750mS,
About year ago i made a test program, where Picaxe measured ds18b20 temperature about 1000 times and after that there was text on the lcd screen that job is done. I measured the process time and divided it by 1000. So I got information that readtemp command takes time about 5-6ms....but I can remember wrong.

I have also used "floating point math" using similar method as Geoff explained on page 2
 

BeanieBots

Moderator
...So I got information that readtemp command takes time about 5-6ms....
Some very early versions of the firmware did not wait for the DS18B20 to complete the conversion so it is possible to have a very old PICAXE that could do that.
The value returned would be the value of the previous reading.
How long it takes depends on both the resolution set in the DS18B20 (9-12 bit) and what the actual temperature is. 750mS is the maximum it will ever take.
 
Top