DS18B20 Temperature Sensor

The digital temperature sensor like DS18B20 follows single wire protocol and it can be used to measure temperature in the range of -67oF to +257oF or -55oC to +125oC with +-5% accuracy. The range of received data from the 1-wire can range from 9-bit to 12-bit. Because, this sensor follows the single wire protocol, and the controlling of this can be done through an only pin of Microcontroller. This is an advanced level protocol, where each sensor can be set with a 64-bit serial code which aids to control numerous sensors using a single pin of the microcontroller. This article discusses an overview of a DS18B20 temperature sensor

What is a DS18B20 Temperature Sensor?

The DS18B20 is one type of temperature sensor and it supplies 9-bit to 12-bit readings of temperature. These values show the temperature of a particular device. The communication of this sensor can be done through a one-wire bus protocol which uses one data line to communicate with an inner microprocessor. Additionally, this sensor gets the power supply directly from the data line so that the need for an external power supply can be eliminated. The applications of the DS18B20 temperature sensor include industrial systems, consumer products, systems which are sensitive thermally, thermostatic controls, and thermometers.

DS18B20 Pin Configuration

The pin configuration of DS18B20 discussed below.

  • Pin1 (Ground): This pin is used to connect to the GND terminal of the circuit
  • Pin2 (Vcc): This pin is used to give the power to the sensor which ranges from 3.3V or 5V
  • Pin3 (Data): The data pin supplies the temperature value, which can communicate with the help of 1-wire method.


The specifications of this sensor include the following.

  • This sensor is a programmable and digital temperature sensor
  • The communication of this sensor can be done with the help of a 1-Wire method
  • The range of power supply is 3.0V – 5.5V
  • Fahrenheit equal s to -67°F to +257°F
  • The accuracy of this sensor is ±0.5°C
  • The o/p resolution will range from 9-bit to 12-bit
  • It changes the 12-bit temperature to digital word within 750 ms time
  • This sensor can be power-driven from the data line
  • Alarm options are programmable
  • The multiplexing can be enabled by Unique 64-bit address
  • The temperature can be calculated from -55°C to +125°C.
  • These are obtainable like SOP, To-92, and also as a waterproof sensor

Working Principle

The working principle of this DS18B20 temperature sensor is like a temperature sensor. The resolution of this sensor ranges from 9-bits to 12-bits. But the default resolution which is used to power-up is 12-bit. This sensor gets power within a low-power inactive condition. The temperature measurement, as well as the conversion of A-to-D, can be done with a convert-T command. The resulting temperature information can be stored within the 2-byte register in the sensor, and after that, this sensor returns to its inactive state.

If the sensor is power-driven by an exterior power supply, then the master can provide read time slots next to the Convert T command. The sensor will react by supplying 0 though the temperature change is in the improvement and reacts by supplying 1 though the temperature change is done.

DS18B20 Temperature Sensor Applications

The applications of DS18B20 include the following.

  • This sensor is extensively used to calculate temperature within rigid environments which includes mines, chemical solutions, otherwise soil, etc.
  • This sensor is used to measure the liquid temperature.
  • We can use it in the thermostat controls system.
  • It can be used in industries as a temperature measuring device.
  • This sensor is used as a thermometer.
  • It can be used in devices like which are sensitive to thermal.
  • These are used in HVAC systems.
  • Applications where the temperature has to be measured at multiple points.

Thus, this is all about a DS18B20 temperature sensor. This sensor can be accessible in two packages like simple DS18B20 sensor and waterproof DS18B20 sensor which are used in hydro-projects to determine the temperature of the water. Here is a question for you, what are the advantages of a DS18B20 temperature sensor?