Temperature Measurement - Page 1
Forum section: electronics / general

author: apex
author_rank: Regular Contributor
timestamp: July 01, 2010, 04:56:28 pm
content: Hi,I really would like a blog on how to measure temperatures.There are so many types of temperature sensors, like NTCs, external chips, KTY81, PT1000, on-chip,...I've even read that its possible to measure temperature with the on-chip rc-oscillator of a microcontroller.Apex

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 02, 2010, 07:26:40 am
content: the MSP430 line of chip from TI, has temp sensor built in, get the $4.30 module right now!

author: EEVblog
author_rank: Unknown
timestamp: July 02, 2010, 11:11:30 am
content: A junk box 1N914 diode makes a decent linear temp sensor. Better with a constant current, but resistor will usually be good enough.Dave.

author: Zero999
author_rank: Super Contributor
timestamp: July 02, 2010, 11:26:02 am
content: http://www.micro-examples.com/public/microex-navig/doc/098-temperature-sensor.html

author: Unknown
author_rank: Unknown
timestamp: July 02, 2010, 11:45:40 am
content: Lots of things can be used as temperature sensors if you characterize them, eg. resistors, BE junctions of transistors or ESD protection diodes. Almost anything has a temperature coefficient. Issues are sensitivity, stability and easy of use.

author: Rhythmtech
author_rank: Regular Contributor
timestamp: July 16, 2010, 04:12:43 pm
content: Linear Technologies on building a thermocouple meter

author: johnboxall
author_rank: Unknown
timestamp: August 07, 2010, 04:55:51 pm
content: The Analog Devices TMP36 has been good to me,http://www.analog.com/en/sensors/digital-temperature-sensors/tmp36/products/product.htmlWorks very easily with Arduino as well:http://tronixstuff.wordpress.com/2010/04/15/getting-started-with-arduino-chapter-two/

author: migsantiago
author_rank: Frequent Contributor
timestamp: August 07, 2010, 05:52:02 pm
content: Quote from: EEVblog on July 02, 2010, 11:11:30 amHello. Could you please give more details about this method? Thanks!

author: DJPhil
author_rank: Frequent Contributor
timestamp: August 07, 2010, 06:57:40 pm
content: Quote from: migsantiago on August 07, 2010, 05:52:02 pmBasically all you have to do is run a small constant current (~1mA) through the diode and measure the change in voltage over temperature. All silicon bandgaps do this, so you can use the BE junction of a transistor as well (just tie the collector to the base). The tempco should be around -2.1mV/°C, so you may need an opamp for decent resolution. Once you calibrate your circuit for a particular diode it should easily be accurate to 2°C, and you can probably do better.Hope that helps.

author: migsantiago
author_rank: Frequent Contributor
timestamp: August 07, 2010, 07:12:25 pm
content: Yeap, it helps.Let's say that I apply this 1mA current to one diode and get the V/°C curve. This curve is almost linear and it will have an equation that describes it. If I change the diode (another 1N914 from another company or production batch), will this curve be very different from the first one or it will be similar?

author: DJPhil
author_rank: Frequent Contributor
timestamp: August 07, 2010, 08:21:15 pm
content: Quote from: migsantiago on August 07, 2010, 07:12:25 pmI'm not 100% sure, but I have a good guess. I think the curve itself should be almost (if not) identical across different diodes, but you may see a shift in absolute voltage due to the manufacturing spread of VI curves. The performance of any odd diode is likely to be low in the usual context, but is surprisingly good for as cheap as it is to implement (diode and a resistor).There are easier ways to exploit the linear silicon bandgap tempco. TheLM334is a three terminal adjustable current source that can be made to work in much the same way (see figure 5) and is a bit easier to implement (10mV/°K).

author: migsantiago
author_rank: Frequent Contributor
timestamp: August 07, 2010, 09:26:35 pm
content: Excellent. I will try to get one of those and test it. Thanks.

author: Simon
author_rank: Unknown
timestamp: August 07, 2010, 09:58:05 pm
content: There are chips that will pretty much give you a direct readout in volts for temperature, something like 10mV/C they are used like zenners (with a limiting resitor) and are very good say for direct connection to a MCU, unfortunately not the cheapest parts though

author: migsantiago
author_rank: Frequent Contributor
timestamp: August 07, 2010, 11:03:28 pm
content: Quote from: Simon on August 07, 2010, 09:58:05 pmThat's why I'm interested in this diode technique. I want to implement a temp sensor which has a thruhole soldering and a good price. LM35 is kinda old and expensive compared to the diode.

author: Simon
author_rank: Unknown
timestamp: August 08, 2010, 06:11:27 am
content: well it depends on the precision you want I suppose, with the diodde I think your stuck with amplying the signal an with 2mV/C you looking at lots of trouble with offset voltage so by tyhe time you have bought a precision opamp you may as well have bought a dedicated chip that is more compact

author: jahonen
author_rank: Super Contributor
timestamp: August 08, 2010, 07:00:39 am
content: The diode is cheap but there is a considerable Vf variations between each diode. Calibration is the price you pay for cheapness of the diode itself. Accuracy would be pretty ridiculous without some sort of calibration (at least at one temperature). You can get the idea of the differences by measuring a Vf of each diode with a DMM, and then comparing the differences by that tempco of about -2 mV/°C. BJT transistor junctions can be also used as a diode for this purpose. Transistors might be even preferable due to that leads come off only on one end.Solving thediode equationshows that the voltage is in theory linear as a function of absolute temperature, if the current through the diode is constant, Vf=ln(I/Is+1)*nkT/q.Regards,Janne

author: Unknown
author_rank: Unknown
timestamp: August 08, 2010, 08:56:45 am
content: Quote from: jahonen on August 08, 2010, 07:00:39 amAny idea how much the real world differs from the theory? If it was very linear, one calibration point might be enough (produce at constant temperature and measure Vf). Wikipedia claims that the temperature coefficient depends on doping concentration and temperature (yikes), which would destroy the linearity, but doesn't state the magnitude of this error.Quote from: migsantiago on August 07, 2010, 11:03:28 pmThe cost advantage may disappear if you have through an elaborate calibration procedure for each product, semiconductor manufacturers should be able to do this much more chaeply. And how old do you think the 1N914 is?TEKscope magazine January 1971, page 5 (~2M pdf)describes a neat technique of using the Vbeof a transistor, but not at a constant collector current, but by measuring Vbeat both a low and a high collector current, and differentiating the difference (d(Vbe1-Vbe2)/dT). They claim improved linearity and sample variation.

author: jahonen
author_rank: Super Contributor
timestamp: August 08, 2010, 11:19:46 am
content: On a second thought, the result seems counter-intuitive since obviously the Vd must drop when the temperature increases, assuming constant current. Can't immediately figure out what is wrong with the math or the reasoning. Algebra seems to be correct but there is something that doesn't make sense.Regards,Janne

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 08, 2010, 06:20:41 pm
content: Diodes are routinely used as on-chip temperature sensors. However, the process used to make VLSI chips is much more sophisticated and controlled than that used to make discrete diodes.

author: Simon
author_rank: Unknown
timestamp: August 08, 2010, 06:39:17 pm
content: I'm starting to get an idea for my project with this, I building a power control circuit that must stop power going over a certain voltage and current. As it is a car in the winter allowing more amperage through might be a good idea (don't question it just nod your heads it's not the main point in debate), so if I put a diode in the series with the the output resistor from the current sensor it will bias the result ? so that in the summer (hot) it will show a higher reading for the same current and in the winter it will show lower allowing a bit more current. Am i nuts ?

author: Simon
author_rank: Unknown
timestamp: August 08, 2010, 09:05:51 pm
content: oh dear, looks like the diode has a negative temp coefficient ? it goes down a few mV when i put my finger on it (with 370 uA going through)I've tried looking up PTC resistors on farnell but there is precious little to no information about how the resistance varies with temperature

author: Zero999
author_rank: Super Contributor
timestamp: August 08, 2010, 09:18:10 pm
content: Probably because you should've searched for thermistors.http://uk.farnell.com/jsp/search/browse.jsp?N=1004634+365227&No=0&getResults=true&appliedparametrics=true&locale=en_UK&catalogId=&prevNValues=1004634&filtersHidden=false&appliedHidden=false&originalQueryURL=%2Fjsp%2Fsearch%2Fbrowse.jsp%3FN%3D1004634%26No%3D0%26getResults%3Dtrue%26appliedparametrics%3Dtrue%26locale%3Den_UK%26catalogId%3D%26prevNValues%3D1004634Searching for PTC resistors invariably lists the sort which are used as fuses and are normally not well specified in terms of temperature vs resistance.

author: migsantiago
author_rank: Frequent Contributor
timestamp: August 10, 2010, 01:37:36 am
content: Here's a Microchip app note where you can use the WDT of a PIC16 to measure temperature with a precision of +/-2°C and without using an external sensor.http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011990Very creative.

author: Simon
author_rank: Unknown
timestamp: August 10, 2010, 07:00:22 am
content: ah but can you do anything else with the micro in the mean time ? i have a sort of time sensitive application and can't turn a whole MCU over to temp measurement. I'll look at the app note later

author: PetrosA
author_rank: Frequent Contributor
timestamp: August 10, 2010, 01:21:27 pm
content: I've installed a lot of floor heat thermostats which all use thermistor sensors. Here's a link to Honeywell's temp sensor page which might give you a few ideas:http://sensing.honeywell.com/index.cfm?Ne=2308&ci_id=154358&N=3185&la_id=1

author: Simon
author_rank: Unknown
timestamp: August 10, 2010, 05:42:45 pm
content: hm I'm looking for something cheap and easily available

author: migsantiago
author_rank: Frequent Contributor
timestamp: August 14, 2010, 04:08:45 pm
content: Another great recommendation a friend gave me... MCP9700 from Microchip. It's a TO92 chip with a +/-2°C precision and it costs half the price an LM35.http://ww1.microchip.com/downloads/en/DeviceDoc/21942e.pdf

author: Simon
author_rank: Unknown
timestamp: August 14, 2010, 04:26:01 pm
content: yea I spotted that today on Farnell looks interesting at 30 pence

author: allanw
author_rank: Frequent Contributor
timestamp: August 16, 2010, 04:43:23 am
content: Quote from: jahonen on August 08, 2010, 07:00:39 amYes, but I_s itself is dependent on temperature.