Temperature Logging - What are some good entry points? - Page 1
Forum section: electronics / general

author: TheUnnamedNewbie
author_rank: Super Contributor
timestamp: March 13, 2018, 08:37:19 am
content: So, I am a young and broke student (broke being relative of course, I can't complain compared to fellow students, but metrology isn't exactly the cheapest of hobbies...).I am currently in the process of designing my own voltage source. For me this was a good project since when repairing multimeters that need calibration, I often require something like a 1 mV voltage, and generating that with a bench supply is tedious at best.It has also been a learning experience for me to discover computer controlled instrumentation. My core meter is a Keithley 2000. I have no real references to compare this too, so for now it will have to do.One of the things I want to try is measure the temperature coefficient of my board. I can see that if I make it very warm, it goes up by about 1/2 LSB (meter measuring it is not being heated up). However, I don't have any way to measure how warm I am making the system, so the next thing I need to get a real idea of the temperature coefficient is a way to measure said temperature.This brings me to my question: What are some good entry points to do reasonably accurate temperature measurements? I don't need crazy precision or accuracy, as it will mainly be relative measurements, and I can't control the temperature that precisely anyways (the way I currently do the heating is by just having two big power resistors in the same box as the DUT, and then pumping 5/10 W into those). My requirement is that I can easily log this with my matlab code. USB would be nice, but I am willing to spend the extra few bucks on another USB-to-Serial converter. I don't have GPIB yet, though I am looking at it in the long run. Most of the logging devices I find on ebay etc are for use with cards, and ofcourse don't come with the cards (so the cost of entry is quite high).

author: capt bullshot
author_rank: Super Contributor
timestamp: March 13, 2018, 10:02:31 am
content: You can achieve temperature measurent using a readily and cheap available thermocouple sensor. You K2000 is able to convert the thermocouple voltage to a direct temperature reading. Excpect an achievable accuracy around 2 ... 3 °C.Next stop would be a simple but precision NTC temperature sensor, you can get them at about 1 ... 2 EUR, at your favourite source like Reichelt or whatever, measure the resistance with any half decent Multimeter and do the conversion by yourself (or some simple scripting)Next one: use that said NTC sensor and some arduino like board, you'd just have to connect a resistor to Analog Ref voltage and do the simple calculation in Arduino code. IMO the cheapest thermometer with logging capability you can build - An Arduino or similar, a NTC sensor, a resistor (of the same value as the 25°C value of the NTC), a 10nF cap for decoupling the analog input - and all the rest costs your labour but no money. A typical "precision" NTC temperatur sensor does not need any calibration to achieve +/- 1...2°C accuracy with this setup (done that many times before).

author: hwj-d
author_rank: Frequent Contributor
timestamp: March 13, 2018, 10:30:15 am
content: Maybe the simplest way is to use a LM35.Give it 4V to 20V and it delivers an output voltage linearly proportional to centigrade temperature10 mV/°C (2 °C to 150 °C) with an accuracy of ±0.5°C (at 25°C).(VOUT= 10 mv/°C × T).http://www.ti.com/lit/ds/symlink/lm35.pdf

author: TheUnnamedNewbie
author_rank: Super Contributor
timestamp: March 13, 2018, 10:36:53 am
content: Quote from: capt bullshot on March 13, 2018, 10:02:31 amAm I right in assuming that the error would be due to no cold-junction compensation?I like the idea of the arduino. It seems so simple and obvious - I have all these arduinos laying round, I might as well use them. Perhaps I could build on top of this and look at getting a temperature sensor module I can read.Since I have only 1 K2000, I'll have to put together a switching board. But I have a bunch of old Coto reed relays I might use, so I could do that as a next project.Quote from: hwj-d on March 13, 2018, 10:30:15 am

author: capt bullshot
author_rank: Super Contributor
timestamp: March 13, 2018, 11:28:26 am
content: Quote from: TheUnnamedNewbie on March 13, 2018, 10:36:53 amYes, that's an error source, and you'd have to take the limited accuracy of the TC itself into account, so my guess is quite a rough guess. Both errors will add up, the offset caused by the Cold Junction, and the linearity and whatsoever error from the TC itself.

author: capt bullshot
author_rank: Super Contributor
timestamp: March 13, 2018, 11:36:12 am
content: Quote from: TheUnnamedNewbie on March 13, 2018, 10:36:53 amWhat kind of sensor you use, depends on your SW skills ...I don't like these LM35 (and similar others, there are sensors with I2C so you don't have to mess with analog) not too much, because they need at least 3 wires (more HW). A precision NTC uses 2 wires and doesn't care about polarity, but requires a bit more effort in SW - for calculating the resistance and then doing some lookup / interpolation to convert the resistance to temperature. Usually I trade less HW effort to a bit more SW for this kind of application. Results are quite similar.Another advantage of the NTC over the LM35 is the ratiometric measurement, you don't need an accurate reference voltage (but stable). To achieve the accuracy using a LM35 type sensor, you'll need an accurate and stable reference voltage.

author: hwj-d
author_rank: Frequent Contributor
timestamp: March 13, 2018, 11:43:29 am
content: Quotewhich mess?Quotenope

author: cellularmitosis
author_rank: Unknown
timestamp: March 13, 2018, 02:25:22 pm
content: Hello,I've made two such temperature-controlled boxes so far, and have been logging temperature a lot lately.https://www.eevblog.com/forum/projects/mini-tempco-characterization-rig/https://www.eevblog.com/forum/metrology/temperature-stabilised-enclosures-heating-and-or-cooling/msg1410031/#msg1410031Some of my go-to temperature sensing solutions:Analog:NTC 10K, plus a 10K resistor to linearize it. Cheap, 2 wires, hard to beat. The glass-encapsulated thermistors are supposedly very stable over time.https://www.digikey.com/products/en/sensors-transducers/temperature-sensors-ntc-thermistors/508?FV=1140050%2Cd880007%2Cffe001fc%2C402b81&quantity=&ColumnSort=1000011&page=1&stock=1&k=ntc&pageSize=25&pkeyword=ntcMCP9700A / MCP9701A: a cheaper competitor to the LM35. 19.5mV/C in the MCP9701A, so a bit more sensitive.https://www.digikey.com/product-detail/en/microchip-technology/MCP9701A-E-TO/MCP9701A-E-TO-ND/1212511For the Analog solutions, if you are interested in only a narrow temperature range, you'll want an op-amp circuit to do some gain + offset to "zoom in" on the signal. EEVblog forum user T3sl4co1l showed me a trick where you can do this with 1 opamp and 3 resistors, rather than a full instrumentation amp.second screenshot here shows how to model this for the MCP9701A in LTSpice:https://www.eevblog.com/forum/beginners/using-diodes-for-subtraction/msg456677/#msg456677first screenshot here shows how to do this for an NTC 10k (the .asc file is also attached there if you want to play with the resistor values in LTSpice):https://www.eevblog.com/forum/metrology/temperature-stabilised-enclosures-heating-and-or-cooling/msg1412203/#msg1412203Digital:The Si7021 seems to be the good solution here: easy-to-use (I2C) assembled boards are cheap on ebay, and this guy did a pretty deep analysis which showed that they are pretty good:http://www.kandrsmith.org/RJS/Misc/Hygrometers/calib_many.htmlhttps://www.ebay.com/sch/i.html?_nkw=si7021I should note also that my temperature control methods are typically digital / PID, but there are also purely analog ways of doing this, some of them being pretty simple!https://www.eevblog.com/forum/metrology/temperature-stabilised-enclosures-heating-and-or-cooling/msg1408952/#msg1408952https://www.eevblog.com/forum/metrology/poor-man's-reference/msg1224071/#msg1224071More links:https://www.eevblog.com/forum/metrology/usa-calibration-club/msg1231174/#msg1231174Here's the simplest Arduino sketch I have which uses the Si7021. It uses software I2C, so you can use any two pins (and use more than one Si7021):https://github.com/cellularmitosis/logs/tree/master/20180304-1590b-isothermal/Arduino/regulatedI've spent a lot of time fooling with PID constants:https://github.com/cellularmitosis/logs/tree/master/20180114-pid-oven-tuninghttps://github.com/cellularmitosis/logs/tree/master/20180205-pid-oven-tuningFeel free to have a look around in here, I keep all of my logging results and scripts / Arduino sketches in this repo:https://github.com/cellularmitosis/logs

author: hwj-d
author_rank: Frequent Contributor
timestamp: March 13, 2018, 03:57:32 pm
content: The use of a LM35 lies precisely in the simplicity of its application. It has a linear coefficient of x10, and delivers directly a measurement in °C at a k2000 with it's math-function MX+B (x10), regardless of its supply voltage.So it depends on what and how you want to measure.

author: cellularmitosis
author_rank: Unknown
timestamp: March 13, 2018, 03:59:43 pm
content: The MCP9700 has a 10mV/C step as well.Edit: note: the 19.5mV/C of the MCP9701 makes 1 LSB per C for an 8-bit ADC.

author: hwj-d
author_rank: Frequent Contributor
timestamp: March 13, 2018, 04:14:38 pm
content: Quote from: cellularmitosis on March 13, 2018, 03:59:43 pmAh, ok. Good to know.

author: MisterDiodes
author_rank: Frequent Contributor
timestamp: March 13, 2018, 05:17:40 pm
content: I have to agree - if you have a meter already (and if you're temperature is within range), I would suggest the LM35/LM34 is a simple & quick solution because: they are relatively accurate (get the better grade for better accuracy, but the cheaper units might be enough for you), they require no calibration, require virtually no software and they're very forgiving of power supply. THE industry de-facto standard if you've got a meter on hand already. You're ready to go in the time it takes to hook up a few wires to your power source and meter...and then you get on with your testing.

author: cellularmitosis
author_rank: Unknown
timestamp: March 13, 2018, 05:21:28 pm
content: Quote from: MisterDiodes on March 13, 2018, 05:17:40 pmI should mention that I've had problems with the MCP97xx's when using leads which are several feet long with no capacitor (it oscillated if I recall). If you are using them on leads which are several feet long, you'll need to solder a cap across the power supply leads. A 0.1uF ceramic does the job.

author: wictor
author_rank: Regular Contributor
timestamp: March 13, 2018, 06:32:07 pm
content: Hi,I have been using USB ttl converter and DS18b20. They are cheap and very accurate for that price. And you can put multiple sensors to one converter. There is good support for interfacing with PC e.g. digitemp.USB ttl converter with CP2102 works well, something like these:https://www.ebay.com/itm/6Pin-USB-2-0-to-TTL-UART-Module-Converter-CP2102-STC-Replace-FT232-New/273107801014?epid=1438383738&hash=item3f967e53b6:g:zUUAAOSwvRpap25uAnd for sensors something robust like these:https://www.ebay.com/itm/Waterproof-Digital-Thermal-Probe-or-Sensor-DS18B20-Length-1M/201544352532?epid=1158405043&hash=item2eecfac314:g:Q88AAOSwXeJXehjSWired like in this example:http://kernelreloaded.com/reading-temperature-with-wr703n-and-ds18b20-on-openwrt/Wictor

author: Ian.M
author_rank: Super Contributor
timestamp: March 13, 2018, 06:47:44 pm
content: Precision Thermometry on a budget is *DIFFICULT*Ordinary Thermometry, down to approx +/-0.5°C is pretty easy using a silicon temperature sensors e.g. the Dallas DS18B20 1-wire sensor quotes that accuracy from -10°C to +85°C, and logging multiple sensors on a 1-wire bus is easy, so its good when you want to monitor temperature gradients and don't need a very small low thermal mass probe. Other silicon sensors are available in smaller packages - an advantage when building low thermal mass probes.However without the capability to check your temperature sensors calibration and long term drift, its all pretty futile. Just about the only standards within the reach of a competent amateur on a tight budget would be DIY triple point of water and Gallium melting point cells, which would at least give you a two point calibration near room temperature.

author: IanJ
author_rank: Unknown
timestamp: March 13, 2018, 06:48:46 pm
content: Hi,Here's what I use:-http://www.dogratian.com/products/index.php/menu-sensors/menu-usb-tnh-sht10Available from here:-https://www.ebay.com/sch/dogratian/m.html?_nkw=&_armrs=1&_ipg=&_from=The Ebay seller is the developer and has written a wee VB app that reads the sensor and displays on a graph. The source code is available of you want to extend it's functionality.Specifications:Operating Temperature (CPU): -20°C ~ +70°CConnection to PC: USB (CDC Virtual COM port)Power: USB PoweredTemperature Accuracy: +/-0.5°C at 25°C (max +/-3°C at 120°C)Temperature Resolution: 14bitsTemperature Range: -40°C to 120°CHumidity Accuracy: +/-4.5 %RHHumidity Resolution: 12bitsHumidity Range: 5 %RH - 95 %RHIan.

author: Ian.M
author_rank: Super Contributor
timestamp: March 13, 2018, 07:58:17 pm
content: A boiling point bath is fairly imprecise - depending on the number of nucleation sites on immersed surfaces a significant degree of superheat can occur. The melting point of Gallium at 29.76 °C would be a better choice, but all exposed metal must be carefully lacquered as Gallium will form an amalgam with many metals, and any dissolved metals will compromise the purity of the bath, risking shifting the melting point. 99.99% Gallium is readily available and fairly affordable in small quantities.

author: cellularmitosis
author_rank: Unknown
timestamp: March 13, 2018, 09:06:41 pm
content: Quote from: Ian.M on March 13, 2018, 07:58:17 pmThanks Ian, I've been hunting for a material to use for a point between 0C and 100C. The best option I had found so far was boiling acetone, but that's pretty dangerous, and I have no way of knowing how pure the acetone from the hardware store is, nor am I interested in distilling it myself.If anyone else has any other boiling / melting point suggestions between 0C and 100C, please chime in!This also brings up the issue of linearity between 0C and 100C. Everything I've come across online suggests calibrating at 0C and 100C for the device in question, but the linearity between those points seems to just be assumed. On that topic, what sort of device would be our best source of linearity? A PT100 perhaps?

author: texaspyro
author_rank: Super Contributor
timestamp: March 14, 2018, 12:37:32 am
content: With LM35 type devices (in the TO93 package) the dominate temperature input to the chip is via the leads. Leave them long...I have added hooks to Lady Heather to support an environmental sensor. I want one that does humidity and pressure and (at least) two temperature channels. The temp sensors should be remotely mountable (on leads). It should speak over RS-232 or a standard serial-looking USB device (i.e no proprietary drivers. Output rate of 1 Hz is adequate. Resolution is probably more important than absolute accuracy. I prefer RS-232 interfaces since you can almost always find a serial-RS232 dongle that will work with your system, but can have issues with getting a specific USB interface to work.I'm leaning towards an BME280 for humidity and pressure (and maybe a temperature channel). I haven't decided on what to use for the remote temp sensors. I've thought about PT1000's, but interface chips tend to be a bit pricey. Thermocouples are probably out... not all that accurate, etc. Thermistors are still in the running... maybe using those 18 bit Microchip A/D's. I'd like the sensors to be small and fairly low thermal mass to get fast response times.If I have to build one, it will probably be based on a ATMEGA-328.

author: ManateeMafia
author_rank: Frequent Contributor
timestamp: March 14, 2018, 01:55:45 am
content: texaxpyro,You have the option of using the MAX31855 or MAX31865 and there are breakout boards available for a quick solution. The TC version isn't that accurate (~6C) and the RTD version is ~0.5C.

author: cellularmitosis
author_rank: Unknown
timestamp: March 14, 2018, 03:10:29 am
content: Quote from: DiligentMinds.com on March 14, 2018, 01:39:14 amHmmmmmm....Edit:http://www.daliborfarny.com/2012/06/13/sealed-argon-tube/edit2:https://youtu.be/GAMRHcbE3g0?t=14m4s

author: thermistor-guy
author_rank: Frequent Contributor
timestamp: March 14, 2018, 03:50:01 am
content: Quote from: DiligentMinds.com on March 14, 2018, 01:39:14 amSome years ago I needed something (some substance) that could provide reference temperatures - phase transitions, like a melting point - in the range 50-100 deg. C, with a resolution of 0.1 deg. C. The complication was that I had to detect the temperatures optically, from outside a heated chamber.Highly purified synthetic waxes didn't work. The optical response curves were way too sloppy.I ended up using temperature-sensitive liquid crystals, at 55, 75, and 90 deg. C, custom-made by Hallcrest UK (www.lcrhallcrest.com). The transitions were sharp enough to resolve 10 mK temperature differences, well within spec. The resolution was limited by the temperature control in the application, not by the liquid crystals themselves. For various reasons, I used the raw liquid crystal, not the microencapsulated form. I've always wanted to find out just how sharp those transitions really were. Could they resolve 1 mK? Maybe.The US patent that resulted (https://patents.google.com/patent/US8345215B2/en) doesn't show my best data (which came later).Getting back to the OP's application, I suggest an interchangeable thermistor, good for +/- 0.2 C or better, e.g.:http://www.ussensor.com/products/thermistors/leaded-thermistors/interchangeable-thermistorshttps://www.ametherm.com/thermistor/precision-interchangeable-thermistorFor linearity, maybe a PT1000, e.g. Honeywell HEL-776 or -777 (Digi-Key, Mouser), measured ratiometrically. Hard to beat the performance/price of a good thermistor, though.

author: texaspyro
author_rank: Super Contributor
timestamp: March 14, 2018, 04:00:46 am
content: Quote from: ManateeMafia on March 14, 2018, 01:55:45 amYes, I've been leaning towards the MAX31865. What would work better... PT100 or PT1000? My gut says PT1000, but that comes from when I was thinking of a discrete solution.

author: Ian.M
author_rank: Super Contributor
timestamp: March 14, 2018, 04:03:55 am
content: Some useful links:https://www.scientificamerican.com/article/tackling-the-triple-point/- Water 0.01 °Chttp://www.isotechna.com/v/vspfiles/pdf_articles/Fixed%20Points%20of%20the%20ITS-90%20and%20Confidence%20in%20the%20Metal%20Freezing%20Points%20of%20ITS-90.pdf- various fixed point cells including Galliumhttp://makerstutorial.blogspot.co.uk/2008/07/by-shawn-carlson-last-month-i-described.html- a DIY precision platinum RTD thermometer using an off-the-shelf platinum film sensor.https://thecavepearlproject.org/2015/03/30/using-ds18b20-one-wire-sensors-to-make-a-diy-thermistor-string-pt-2-calibration/- Serious effort put into DIY calibration of silicon sensors

author: TheUnnamedNewbie
author_rank: Super Contributor
timestamp: March 14, 2018, 08:47:00 am
content: Thanks for all the replies here. I'll post responses and follow-up questions throughout the day as I read up on some of the suggestions made here during my breaks.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.I will start by looking at the different sensors and complexity involved. I'll start by looking at user cellularmitosis' two links and take it from there!

author: TriplePointDesign
author_rank: Newbie
timestamp: March 14, 2018, 04:14:00 pm
content: 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...

author: MisterDiodes
author_rank: Frequent Contributor
timestamp: March 14, 2018, 04:57:49 pm
content: Quote from: TheUnnamedNewbie on March 14, 2018, 08:47:00 amAt 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.

author: cellularmitosis
author_rank: Unknown
timestamp: March 14, 2018, 10:35:54 pm
content: Quote from: TriplePointDesign on March 14, 2018, 04:14:00 pmGreat 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-L281Increasing 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!).

author: cellularmitosis
author_rank: Unknown
timestamp: March 17, 2018, 06:52:22 pm
content: Ran across this while scouring for old DMM manuals. Talks about ways in which platinum RTD's candegradedrift over time.fromhttp://assets.fluke.com/manuals/8520A___adeng0000.pdf

author: Edwin G. Pettis
author_rank: Frequent Contributor
timestamp: March 17, 2018, 07:11:00 pm
content: 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.

author: TriplePointDesign
author_rank: Newbie
timestamp: March 19, 2018, 04:34:32 pm
content: @ 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..

author: cellularmitosis
author_rank: Unknown
timestamp: March 19, 2018, 05:05:34 pm
content: Quote from: TriplePointDesign on March 19, 2018, 04:34:32 pmHmm, 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)

author: TriplePointDesign
author_rank: Newbie
timestamp: March 25, 2018, 10:42:49 pm
content: 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.