Skip to main content

DS18B20 Temperature Sensor

Pin Configuration

No:

Pin Name

Description

1

Ground

Connect to the ground of the circuit

2

Vcc

Powers the Sensor, can be 3.3V or 5V

3

Data

This pin gives output the temperature value which can be read using 1-wire method  

 

DS18B20 Sensor Specifications

  • Programmable Digital Temperature Sensor
  • Communicates using 1-Wire method
  • Operating voltage: 3V to 5V
  • Temperature Range: -55°C to +125°C
  • Accuracy: ±0.5°C
  • Output Resolution: 9-bit to 12-bit (programmable)
  • Unique 64-bit address enables multiplexing
  • Conversion time: 750ms at 12-bit 
  • Programmable alarm options
  • Available as To-92, SOP and even as a waterproof sensor

Note: Read further to know why these parameters are important. Also the DS18B20 datasheet can be found at the bottom of the page

 

Alternative Temperature Sensors

Thermocouple, TMP100, LM75, DHT11, SHT15, LM35DZ, TPA81, D6T

 

DS18B20 Equivalent Sensors

DS18S20

 

Where to use DS18B20 Sensor

The DS18B20 is a 1-wire programmable Temperature sensor from maxim integrated. It is widely used to measure temperature in hard environments like in chemical solutions, mines or soil etc. The constriction of the sensor is rugged and also can be purchased with a waterproof option making the mounting process easy. It can measure a wide range of temperature from -55°C to +125° with a decent accuracy of ±5°C. Each sensor has a unique address and requires only one pin of the MCU to transfer data so it a very good choice for measuring temperature at multiple points without compromising much of your digital pins on the microcontroller.

 

How to use the DS18B20 Sensor

The sensor works with the method of 1-Wire communication. It requires only the data pin connected to the microcontroller with a pull up resistor and the other two pins are used for power as shown below.

DS18B20 Microcontroller Circuit Diagram

The pull-up resistor is used to keep the line in high state when the bus is not in use. The temperature value measured by the sensor will be stored in a 2-byte register inside the sensor. This data can be read by the using the 1- wire method by sending in a sequence of data. There are two types of commands that are to be sent to read the values, one is a ROM command and the other is function command. The address value of each ROM memory along with the sequence is given in the datasheet below. You have to read through it to understand how to communicate with the sensor.

If you are planning to interface it with Arduino, then you need not worry about all these. You can develop the readily available library and use the in-built functions to access the data.

 

Applications

  • Measuring temperature at hard environments
  • Liquid temperature measurement
  • Applications where temperature has to be measured at multiple points

 

2D-Model

DS18B20 Temperature Sensor Dimensions

Related Post



Join 20K+subscribers

We will never spam you.

* indicates required

Be a part of our ever growing community.