Author Topic: Temperature Logging - What are some good entry points?  (Read 6656 times)

0 Members and 1 Guest are viewing this topic.

Offline TriplePointDesign

  • Newbie
  • Posts: 7
  • Country: us
Re: Temperature Logging - What are some good entry points?
« Reply #25 on: March 14, 2018, 04:14:00 pm »
I've been achieving high resolution temperature measurements by oversampling the ADC reading cheap NTC thermistors on a 328p microprocessor (Promini Arduino) easily getting you into the 0.001C territory.

https://thecavepearlproject.org/2017/02/27/enhancing-arduinos-adc-resolution-by-dithering-oversampling/

https://thecavepearlproject.org/2017/04/26/calibrating-oversampled-thermistors-with-an-arduino/

Turns out you can make decent dithering noise for the oversampling simply by pulsing an output pin with a resistor on it, though I suspect the method might not work as well on other microprocessors that have better rail stabilization.  Also my calibration method is pretty cheeky  - basically I roll all the various errors in the system into the S & H constants - so each calibration is only good for that particular unit/build.   And of course, the cal is only as good as your reference sensor...
 
The following users thanked this post: cellularmitosis, mycroft

Offline MisterDiodes

  • Frequent Contributor
  • **
  • Posts: 457
  • Country: us
Re: Temperature Logging - What are some good entry points?
« Reply #26 on: March 14, 2018, 04:57:49 pm »

As a first comment, I would like to point out that while I like the idea of using the very well behaved K2000 (at least to everything else that measures low-frequencies in my lab), and it has the added advantage of me already understanding how to get data from it onto my computer, it only shifts the problem - I go from having to design and build a temperature sensing rig, to having to build a switch matrix rig. After all, I would still want to use the K2000 to do whatever other measurements I want to do.


At some point on your journey you'll realize you'd like a switch matrix in front of your meter - because you'll want a way to simultaneously measure multiple test points. multiple Vrefs, perhaps multiple analog temperature sensors, etc. anyway.  So I'd consider that as a tool you'd like to have in the future.  Sometimes you can score a good, used working switch on eBay for cheap, and that's not wasted effort for a metrology hobby.

As other's have pointed out there are lots of ways to measure temperature and the general rule of engineering a metrology application your strategy choices usually come down to something like: "cheap", "accurate", "lowest possible noise", "lowest long term drift" or "fast".  Focus on the one category that is most important to you, and what works best for your particular setup & budget...Then that becomes the "best way" for you.
« Last Edit: March 14, 2018, 05:01:59 pm by MisterDiodes »
 

Offline cellularmitosis

  • Supporter
  • ****
  • Posts: 1111
  • Country: us
Re: Temperature Logging - What are some good entry points?
« Reply #27 on: March 14, 2018, 10:35:54 pm »
I've been achieving high resolution temperature measurements by oversampling the ADC reading cheap NTC thermistors on a 328p microprocessor (Promini Arduino) easily getting you into the 0.001C territory.

https://thecavepearlproject.org/2017/02/27/enhancing-arduinos-adc-resolution-by-dithering-oversampling/

https://thecavepearlproject.org/2017/04/26/calibrating-oversampled-thermistors-with-an-arduino/

Turns out you can make decent dithering noise for the oversampling simply by pulsing an output pin with a resistor on it, though I suspect the method might not work as well on other microprocessors that have better rail stabilization.  Also my calibration method is pretty cheeky  - basically I roll all the various errors in the system into the S & H constants - so each calibration is only good for that particular unit/build.   And of course, the cal is only as good as your reference sensor...

Great articles!  I'll read these in depth this evening.

I've seen similar issues with needing to introduce noise for ADC oversampling.

Here's an oversampling routine which grabs batches of 256 samples until it runs out of time for that sampling period, then averages the results: https://github.com/cellularmitosis/logs/blob/master/20180309-r-tempcos/Arduino/tec-controller/tec-controller.ino#L272-L281  Increasing the oversampling is as simple as changing the loop period.  The software divide turned out to be not as expensive as I had feared (the bit-shift trick is a nice one though!).

« Last Edit: March 14, 2018, 10:38:00 pm by cellularmitosis »
LTZs: KX FX MX CX PX Frank A9 QX
 

Offline cellularmitosis

  • Supporter
  • ****
  • Posts: 1111
  • Country: us
Re: Temperature Logging - What are some good entry points?
« Reply #28 on: March 17, 2018, 06:52:22 pm »
Ran across this while scouring for old DMM manuals.  Talks about ways in which platinum RTD's can degrade drift over time.

from http://assets.fluke.com/manuals/8520A___adeng0000.pdf

LTZs: KX FX MX CX PX Frank A9 QX
 

Offline Edwin G. Pettis

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: us
  • The plural of anecdote is not data.
Re: Temperature Logging - What are some good entry points?
« Reply #29 on: March 17, 2018, 07:11:00 pm »
This is nothing new, exposure to high operating temperatures affects all resistors (which RTDs are).  Prolonged exposure to temperatures over ~100°C-105°C will cause a higher drift rate compared to lower temperatures.  This is more of an accelerated drift rate which, depending on the type of resistor element, may eventually flatten out and settle back to a low value again.  When specifically using a resistor for a reference application, this precludes exposure to high temperatures if best stability and drift is preferred.  Even thermocouples which can operate at very high temperature will exhibit changes when exposed for long periods to such high temperature.  That is the reason for calibration, to track changes and when necessary change the component.
 
The following users thanked this post: cellularmitosis

Offline TriplePointDesign

  • Newbie
  • Posts: 7
  • Country: us
Re: Temperature Logging - What are some good entry points?
« Reply #30 on: March 19, 2018, 04:34:32 pm »
@ cellularmitosis:

I'm a little bit skeptical of your graphs there... they look too stair-steppy, and it's really easy to think that your oversampling is working when it's simply an artifact of averaging the signal itself changing over the sampling period.  When your dither noise is working, the part of the curve to look at is the place where things are not changing very quickly (the flat sections of your curves). If you are still resolving very small changes (far better than your raw ADC could deliver) in the "quiet" parts of your sensor input, then you know the dithering noise is doing its job.  Those flat sections should look beautifully smooth - not gritty..
 
The following users thanked this post: cellularmitosis

Offline cellularmitosis

  • Supporter
  • ****
  • Posts: 1111
  • Country: us
Re: Temperature Logging - What are some good entry points?
« Reply #31 on: March 19, 2018, 05:05:34 pm »
@ cellularmitosis:

I'm a little bit skeptical of your graphs there... they look too stair-steppy, and it's really easy to think that your oversampling is working when it's simply an artifact of averaging the signal itself changing over the sampling period.  When your dither noise is working, the part of the curve to look at is the place where things are not changing very quickly (the flat sections of your curves). If you are still resolving very small changes (far better than your raw ADC could deliver) in the "quiet" parts of your sensor input, then you know the dithering noise is doing its job.  Those flat sections should look beautifully smooth - not gritty..

Hmm, I'm not sure I understand.  Let me make sure we are on the same page.

The blue lines are the set-point values, and the red lines are the 64x oversampled ADC readings (of a 10k thermistor in series with a 10k resistor).

The first graph (which has the stair-steppy fall-off) is using a low-noise reference signal, and the second graph (which has the smoother fall-off) is using the noisier reference signal.

The flat sections are spikey because the heater output is constantly being changed (see the attached chart of what the PWM output looks like -- the control signal gets really noisy during the flat parts).  So, thermally, the flat parts are very "noisy" (the heater is bobbling around, trying to nail the last few millikelvin, but never succeeding).  It is the fall-off part of the graph (where the heater circuit is silent) where the temperature change is the smoothest and most predictable -- that's the part of the graph which should look like a perfectly smooth curve.

Does that make sense?

(csv ouput, in case you are really curious: https://github.com/cellularmitosis/logs/tree/master/20180114-pid-oven-tuning )
LTZs: KX FX MX CX PX Frank A9 QX
 

Offline TriplePointDesign

  • Newbie
  • Posts: 7
  • Country: us
Re: Temperature Logging - What are some good entry points?
« Reply #32 on: March 25, 2018, 10:42:49 pm »
My apologies. I missed the bit about your system being driven by a heater. All my Thermistor over-sampling gets done on natural systems and they come out smooth as silk after the raw reads are aggregated because the natural jitter of the thermistors just gets smoothed into the dithering.  But your heater cycling is much larger, so shows up as that grit on the flat parts of the curve.

Cheers.
 
The following users thanked this post: cellularmitosis


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf