Skip to main content
shopping_basket Basket 0
Log in

Hello everyone, I hope you all are having fun and enjoying your lives. In today's tutorial, we will have a look at this amazing temperature sensor DS18B20 in detail. DS18B20 is available in two packages, one is simple DS18B20 temperature sensor while the second one is waterproof DS18B20 which can be used in hydro projects and can measure the temperature of water.

Both of these packages of DS18B20 are shown in the below figure:

DS18B20_4c23333ef04ffa8abfbfa6f1b89430a035a205dc.jpg

Basics of DS18B20

  • DS18B20 is a simple yet very efficient temperature sensor which follows 1 wire protocol.
  • It can measure temperature from -55 degree Celsius to +125 degree Celsius.
  • As it follows 1 wire protocol so we can receive the data from a single pin.
  • We can also interface multiple DS18B20 temperature sensors on a single pin and can get their data by calling the respective address.
  • Now let's have a look at DS18B20 Pinout:

DS18B20 Pinout

  • DS18B20 comes in two packages and both of these packages contain 3 pins each, which are:
    • Pin # 1: GND ( We have to provide ground here ).
    • Pin # 2: Data ( It's the data pin from where we can get the temperature values ).
    • Pin # 3: Vcc ( +5V has to be provided there to power up DS18B20 ).
  • These DS18B20 Pinouts are also shown in the above figure.

DS18B20 Power Mode

  • There are two types of power modes available for DS18B20, which are:
    • External Power Mode.
    • Parasite Power Mode.
  • In external power mode, we provide power through an external source and it is applicable when the temperature is less than 100 degrees Celsius.
  • Parasite power mode is used when we have to measure temperature greater than 100 degrees Celsius. In this case, we have to use pull up mosfet.

DS18B20 Applications

  • I have worked on many different temperature sensors but I have found DS18B20 to be the best of all because it follows 1-wire protocol and is quite easy to handle.
  • It has a lot of applications, which are as follows:
    • We can use waterproof DS18B20 in hydro projects.
    • It can act as a thermistor.
    • We can use it in thermally sensitive projects.
    • We can also use it in HVAC systems where temperature measuring is quite necessary.

So, that was all about this temperature sensor DS18B20 which is a 1-wire sensor and provides accurate temperature values. I hope you have enjoyed today's tutorial, if you have any questions, then ask in comments. Will meet you guys in the next tutorial. Till then take care and have fun !!! :)

DesignSpark Electrical Logolinkedin