Home - Blog

DS18B20 1-Wire Digital Temperature Sensor – Pinout, Features, and Applications

Digital sensors convert and transmit data digitally, examples being pressure, humidity, and temperature sensors. The DS18B20 temperature sensor is one example of a digital sensor. And so, our post will overview the sensor, specifically its pinout, applications, features, and usage.

What is the DS18B20 1-Wire Temperature Sensor?

DS18B20 is a digital thermometer with a water-proof and pre-wiring feature. It is also compatible with 3.0-5.5V systems and is often applied when measuring objects in wet or distant places.

A downside with DS18B20 is their use of the complex Dallas 1-Wire protocol. It is because the protocol parses out communication via a bunch of code. 

Contrarily, being that DS18B20 is digital, you won’t have any signal degradation even when you’re far away.

DS18B20 Temperature Sensor Pinout

DS18B20 is a 3-pinned temperature sensor, as we’ll see below.

Pin1/ Ground pin; The first pin connects to the circuit’s ground. 

Pin2/ Vcc pin; The second pin is the sensor’s supply pin with a power supply range from 3.3V to 5V. 

Pin3/ Data pin; It provides the temperature value output to be read by the 1-wire method

DS18B20 Temperature Sensor Specifications

The specifications and features of the programmable digital temperature sensor DS18B20 comprise;

  • It has a usable temperature range of -55°C to +125°C and an operating voltage ranging from 3V to 5V. 
  • Secondly, it has programmable alarm options and communicates via a 1-Wire interface. In other words, it needs a single digital pin for communication. What’s more, multiple sensors can share one pin. 
  • Then, its conversion time is 750ms at 12-bit, and its programmable selectable resolution at power is 9-bit to 12-bit. 
  • In addition, it has a stainless steel tube diameter tube of 35mm long × 6mm diameter. In addition, the cable diameter of 4mm is 90cm long. 
  • It also has a unique 64-bit address that helps in multiplexing, and its accuracy is at ±0.5°C. 
  • Lastly, you can find it as a waterproof sensor or in SOP, SOIC, UMAX, and TO-92 packages. 

How to use the DS18B20 Temperature Sensor?

Generally, temperature sensing in DS18B20 operates on a 1-wire communication method. That’s to say, it needs you to use a pull resistor to connect the data pin to the MCU. Then, you’ll use the other pins as power sources, as illustrated in the diagram below;

Circuit diagram showing how DS18B20 works

Furthermore, when the bus isn’t functioning, the 4.7k ohm pull-up resistor keeps the 1-wire line in a high state. 

Also, after the single sensor measures the temperature readings, the in-built 2-byte register stores the value. Afterward, you can send a data sequence (1-wire method) to help read the data. 

Types of commands that read temperature values.

  • Function command
  • ROM command

Often, the DS18B20 datasheet outlines the sequence and the address value of each ROM memory. Therefore, reading through it is crucial in comprehending communications in sensors. 



If you want to interface the sensor with Arduino, use the built-in functions in accessing data and install the Arduino library. 

DS18B20 Temperature Sensor Applications

Some applications of the DS 18B20 1-wire digital temperature sensor include;

measuring temperature in a heatwave

(measuring temperature in a heatwave)

  • Applications where you need to measure temperature at multiple points,
  • Liquid temperature measurement,
  • Industrial systems, 
  • Consumer products, 
  • Measuring temperature in complex environments. 


So DS 18B20 are precise temperature sensors that require no external components to operate. Depending on your project, you can choose various packaging, like a waterproof probe style orTO-92 package. 

Don’t hesitate to contact us for more info on the DS 18B20 sensor. 

Avatar photo
Hommer Zhao
Hi, I am Hommer Zhao, the founder of WellPCB. So far, we have more than 4,000 customers worldwide. If you have any questions, you can feel free to contact me! Your happiness as a customer is my priority!