Description: This is the latest DS18B20 1-Wire digital temperature sensor from Maxim IC. Reports degrees C with 9 to 12-bit precision, -55C to 125C (+/-0.5C). Each sensor has a unique 64-Bit Serial number etched into it - allows for a huge number of sensors to be used on one data bus. This is a wonderful part that is the corner stone of many data-logging and temperature control projects.
Features:
-
Unique 1-Wire® interface requires only one port pin for communication
-
Each device has a unique 64-bit serial code stored in an onboard ROM
-
Multidrop capability simplifies distributed temperature sensing applications
-
Requires no external components
-
Can be powered from data line. Power supply range is 3.0V to 5.5V
-
Measures temperatures from –55°C to +125°C (–67°F to +257°F)
-
±0.5°C accuracy from –10°C to +85°C
-
Thermometer resolution is user-selectable from 9 to 12 bits
-
Converts temperature to 12-bit digital word in 750ms (max.)
-
User-definable nonvolatile (NV) alarm settings
-
Alarm search command identifies and addresses devices whose temperature is outside of programmed limits (temperature alarm condition)
-
Applications include thermostatic controls, industrial systems, consumer products, thermometers, or any thermally sensitive system
Documents:
Replaces: SEN-08366
Comments 22 comments
This is super easy to hook up to an arduino. 5v to pin 3, ground pin 1 and hook up a digital line to pin 2. Make sure to put a 4.7k resistor between pin 3 and 2. You can find some sample code here: http://www.arduino.cc/playground/Learning/OneWire. The temperature sensitivity is great.
have fun!
Really helpful – easily got it working now. Thx :).
Hello Scott,
this might be a silly question, plz help me understand. I ran the code as it was given here, http://www.arduino.cc/playground/Learning/OneWire.
the output numbers are in the range of 190-193. the setup was @ room temperature. how can i relate this number to degree C or F. thanks.
Fun little devices — accurate and cheap. They’re also insanely easy to wire up. When Maxim says “one wire,” they mean it; you can even power it using the data line if you’re careful about timings and provide a strong pull-up when needed. Developing code to drive them is nontrivial, though (various layers include bit timings, commands and ROM codes etc), but once it’s working, they’re very reliable.
Thx. for the link ScottS.
Excellent sensor that’s a huge package in a small box. The best temperature sensor to have in your toolkit. With so much on board capability you will save memory and processing time.
Please consider carrying more 1-wire devices:
http://www.maxim-ic.com/pl_list.cfm/filter/21/ln/en
Miles Burton has an easy to use Arduino library for this sensor here:
DallasTemperature Library
It currently supports the DS18B20, DS18S20 and DS1822.
Mine does not work and i am using mine with a PICAxe. Help me someone, KATE!!!!
Check the wiring diagram. The datasheet for the PICAXE 08M should show the diagram. There is a command already written for it, by the way. Try “readtemp (pin),(variable)”.
I am also having problems getting this to work with a Picaxe-08M. Are these the old style sensors? The Picaxe manual states “Note the readtemp command does not work with the older DS1820 as they have a different internal resolutiom.” If these are the old style that should be listed in the product description.
I’ve ordered these from here in September and they were the DS18B20’s. They are actually labeled on the face of the IC but you’ll have to use a magnifying glass and strong light to read it to verify what you have. A brief description of the differences between versions: The DS18B20’s have 12 bit resolution capabilties. The original DS1820’s (note lack of B or S) have 9 bit resolution. The DS18S20 (note S) was meant as a drop-in replacement for the original DS1820. It gets a 12 bit temp value but rounds it to a 9 bit value. You CAN however get 12 bit resolution with the DS18S20’s but it requires extra calculations/reading of registers to be done that the DS18B20’s don’t require. The DS18B20’s also allow you to specify 9, 10, 11, or 12 bit resolution programmatically. Taking 9 bit values takes less time and power.
Great sensor. Do you have an eagle file for it? I know I could modify a transistor layout but it would be nice to have an accurate one for it.
Eagle part?
Great, great sensor. Very clean output. Very sensitive. If you hold it in your hand it will spike very quickly.
Accurate and easy-to-use. I posted the design and source of a simple 4-channel monitor/logger using this device, an arduino and EA DOG-M LCD display using the libraries listed here to my website if that’s of any help to anyone.
Hi all,
I just purchased a few of these recently. I was wondering if anyone knows whether it’s possible, and how difficult, it would be to interface these sensors with a NI USB-6008 DAQ and LabView.
Thanks!
Dear all,
if you get this sensor you need to know how to retrieve the serial unique number from the sensor if you design one wire multiple thermometer.
youtube
Anyone has a sample code of this sensor for verilog?
Hello all,
this might be a silly question, plz help me understand. I ran the code as it was given here, http://www.arduino.cc/playground/Learning/OneWire.
the output numbers are in the range of 190-193. the setup was @ room temperature. how can i relate this number to degree C or F. thanks.
Divide your output by 16 and that should be degrees C. I’m assuming your values are in hexadecimal (we usually write that 0x192) since that would be the correct output for room temperature.
0x192 = 402 decimal / 16 = 25.125 degrees C.
Just a note for anyone who decides to use the code from the Bildr Tutorial.. Some guy told the author that he had a bug in his code, and so he changed a value near the end from 16 to 2, but now it does have a bug.
I changed my code back to 16, and the code is now working properly.
float TemperatureSum = tempRead/16-0.25+(CONT_PER_C-CONT_REMAIN)/CONT_PER_C;
I switched back to the original code.
Thanks for pointing it out.
Anyone know what order the 64 bit ROMs are returned in in a ROM search request of a multidrop configuration?
I’m using the code from the Arduino Playground OneWire examples… The function ds.search(addr) returns an array of the found sensors – but in what order?
In particular, if I add a new drop to an existing setup, won’t the array ordering change?