Embedded Systems Conference
Breaking News
Newest First | Oldest First | Threaded View
David Ashton
User Rank
Converting temperature readings
David Ashton   12/20/2013 5:17:38 AM
Just a note - in page 1 just above the picture, I said

"I got the FFFF part to display 0.X degrees by dividing it by 25"

I should have added that I had first multiplied it by 16 which gave me a value between 0 and 240 decimal, in steps of 16.  Dividing this by 25 (and ignoring any remainders) gives a value between 0 and 9 which can be used for the digit to the right of the decimal point.   Some values will be one decimal point out compared to the values if you were to round off properly, but with a sensor accuracy of only 0.5 degrees this is not a big deal.

David Ashton
User Rank
Re: Measuring temperature
David Ashton   12/19/2013 10:30:48 PM
Thanks, Aubrey.  Good points about accuracy and calibration.  I would imagine the DS18B20 is similar to the older DS1820 and certainly ANY heated tracks which can conduct heat to any of the leads will affect the reading somehow.   In my case, the device has an accuracy of +/- 0.5 degree C, which for any purpose I want to use them for is adequate.  This also makes the resolution of 0.0625 degree a bit of overkill in some ways.   That's why I didn't worry too much about rounding errors in my conversion of the fractional part of the temperature to a 0.1 degree resolution for my display.

Compared to Max's thermostat errors (which were in the region of 5 degrees (though that's Fahrenheit, it's about 3 degrees C) the DS18B20 is a very accurate device.  I know what I would use if I were to design an Airconditioning thermostat!

I don't possess any super-accurate temperature calibration devices but obviously when you are using these it's important to have good thermal coupling between the calibration sensor and the DUT.  And you could not do things like put a DS18B20 into an ice bath without insulating it properly, which would probably add some thermal insulation as well.   Fortunately as I said, the basic 0.5 degree accuracy of the DS18B20 is fine for me!



User Rank
Measuring temperature
antedeluvian   12/19/2013 8:40:11 PM
Hi David

Good article, as usual. Something to consider when using this (or any device) is what is actually being measured. Apparently the DS1820 (an obsolete version) measured the temprature of the GND pin- that was how the heat was conducted to the temprature sensor. A TI FAE recently said that this was quite common for solid state temperature sensors.

This came as a rude shock to one of our engineers. He had used the TO92 package up in the breeze to measure the temperature of air floating by. However there were some resistors heating the PCB nearby and it contributed to a measurment error.

Of course that brings us to an issue when it comes to calibrating a temperature sensor- how do you know what is the right temperature, and what exactly is your sensor measuring. Max once did a blog when he faced this problem with his home thermostat: I'm becoming hot and bothered

Top Comments of the Week
Like Us on Facebook

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
EE Life
Frankenstein's Fix, Teardowns, Sideshows, Design Contests, Reader Content & More
Max Maxfield

My Mom the Radio Star
Max Maxfield
Post a comment
I've said it before and I'll say it again -- it's a funny old world when you come to think about it. Last Friday lunchtime, for example, I received an email from Tim Levell, the editor for ...

Bernard Cole

A Book For All Reasons
Bernard Cole
1 Comment
Robert Oshana's recent book "Software Engineering for Embedded Systems (Newnes/Elsevier)," written and edited with Mark Kraeling, is a 'book for all reasons.' At almost 1,200 pages, it ...

Martin Rowe

Leonard Nimoy, We'll Miss you
Martin Rowe
Like many of you, I was saddened to hear the news of Leonard Nimoy's death. His Star Trek character Mr. Spock was an inspiration to many of us who entered technical fields.

Rich Quinnell

Making the Grade in Industrial Design
Rich Quinnell
As every developer knows, there are the paper specifications for a product design, and then there are the real requirements. The paper specs are dry, bland, and rigidly numeric, making ...

Special Video Section
After a four-year absence, Infineon returns to Mobile World ...
A laptop’s 65-watt adapter can be made 6 times smaller and ...
An industry network should have device and data security at ...
The LTC2975 is a four-channel PMBus Power System Manager ...
In this video, a new high speed CMOS output comparator ...
The LT8640 is a 42V, 5A synchronous step-down regulator ...
The LTC2000 high-speed DAC has low noise and excellent ...
How do you protect the load and ensure output continues to ...
General-purpose DACs have applications in instrumentation, ...
Linear Technology demonstrates its latest measurement ...
Demos from Maxim Integrated at Electronica 2014 show ...
Bosch CEO Stefan Finkbeiner shows off latest combo and ...
STMicroelectronics demoed this simple gesture control ...
Keysight shows you what signals lurk in real-time at 510MHz ...
TE Connectivity's clear-plastic, full-size model car shows ...
Why culture makes Linear Tech a winner.
Recently formed Architects of Modern Power consortium ...
Specially modified Corvette C7 Stingray responds to ex Indy ...
Avago’s ACPL-K30T is the first solid-state driver qualified ...
NXP launches its line of multi-gate, multifunction, ...
EE Times Senior Technical Editor Martin Rowe will interview EMC engineer Kenneth Wyatt.
Flash Poll