An Overview
The DS18B20 is a one-wire programmable temperature sensor, extensively used to measure and control the temperature in harsh environments like in mines, industries, etc. The sensor is rugged and also can be purchased with a waterproof.
Working Principle
The DS18B20 temperature sensor works like any other temperature sensor. Sensor’s resolution ranges from 9 to 12 bits. However, 12 bit is used as the default resolution to power up the sensor. The temperature measurement, as well as the conversion of analog-to-digital-conversion, can be done with a convert-T command. We can store the resulting temperature information within the two-byte register in the sensor. And after that, the sensor comes back to its inactive state.
Interfacing
The sensor functions with the method of 1-Wire communication. Hence, It only needs one pin of the microcontroller with a pull-up resistor. We use the other two pins of the sensor for power. We need to use two types of commands to areas the values, one is a ROM command, and the other is a function command.
DS18B20 Features
- Unique 1-Wire® Interface Requires Only One Port Pin for Communication
- Reduce Component Count with Integrated
- Temperature Sensor and EEPROM
- Parasitic Power Mode Requires Only 2 Pins for operation (DQ and GND)
- Simplifies Distributed Temperature-Sensing Applications with Multi-drop Capability
- Flexible User-Definable Nonvolatile (NV) Alarm Settings with Alarm Search Command Identifies Devices with temperatures Outside Programmed Limits
- Available in 8-Pin SO (150 mils), 8-Pin µSOP, and
- 3-Pin TO-92 Packages
DS18B20 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
Pinout of DS18B20
Pin Number | Pin Name | Description |
1 | GND | Ground Pin |
2 | Vcc | Power supply pin. Requires voltage between 3.3V to 5V. |
3 | data | Provides the output using one wire method |
Applications
Environmental Control Systems
Environmental control systems are the devices used to determine environmental conditions. And, thus play a significant role in diverse industrial applications. Since each DS18B20 comprises a particular silicon serial number, therefore multiple DS18B20 sensors can occur on the same 1-Wire bus. This allows for setting temperature sensors in many places.
Thermostat Control System
A thermostat works by switching cooling or heating devices on or off, which helps to maintain the correct temperature. A thermostat can be the major control system for any cooling or heating system.
Digital Thermometers
DS18B20 can be used in digital thermometers. The best part of these thermometers is that there is no signal degradation over long distances. These thermometers can give up to 12 bits of precision from the onboard digital-to-analog converter. One can make this thermometer by interfacing the DS18B20 sensor with any microcontroller,