• Unique 1-Wire (r) 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 the data line. Power supply range is 3.0V to 5.5V
  • Measures temperatures from -55 degrees celsius to +125 degrees celsius (-67 F to +257 F)
  • +/-0.5 degrees accuracy from -10 to +85 degrees celsius
  • Thermometer resolution is user-selectable from 9 to 12 bits
  • Converts temperature to 12-bit digital word in 750ms (max.)
  • User-definable non-volatile (NV) alarm settings
  • Alarm search command identifies and addresses devices whose temperature is outside of programmed limits (temperature alarm condition)
  • Available in 8-pin SO (150mil), 8-pin mu-SOP, and 3-pin TO-92 packages
  • Software compatible with the DS1822
  • Applications include thermostatic controls, industrial systems, consumer products, thermometers, or any thermally sensitive system
  • Waterproof version available


The datasheet and other information about this chip is linked to here: http://datasheets.maxim-ic.com/en/ds/DS18B20.pdf


The DS18B20 is available from Sparkfun, Adafruit, among others.

The Waterproof DS18B20 is available from Sparkfun and Adafruit.

The High Temperature Waterproof DS18B20 is available from Adafruit.

The Part

The DS18B20 is available in three packages, TO-92, SO, and μSOP.

Pin Outs (from datasheet):


Below is the schematic from the datasheet for wiring the DS18B20 in both parasite power mode and with an external supply.


This image is of a simple circuit using an externally powered DS18B20 with an Arduino microcontroller (Source: http://bildr.org/2011/07/ds18b20-arduino/).

Library & Code Examples

The Dallas Temperature Control Library provides an easy-to-use interface for the DS18B20. The library is currently at version 3.7.2 and can be downloaded from http://milesburton.com/Dallas_Temperature_Control_Library. The library also requires the OneWire library: http://www.pjrc.com/teensy/td_libs_OneWire.html

Included with the library are a variety of examples including code for reading a single or multiple sensors. Once you have downloaded and installed the library the examples will be available through the Arduino IDE menu via File > Examples > Dallas Temperature Control.

The library provides a variety of functions, including searching for sensors attached to a data line, retrieving their address, setting their resolution and retrieving data in either Celsius or Fahrenheit.




Temperature, Thermometer, Hot, Heat, Cold, Cool, Farenheit, Celsius, Degrees, Weather, Environment, Digital