DS18B20 1-Wire Digital Temperature Sensor – TO-92
The DS18B20 is a high-accuracy digital temperature sensor featuring a simple 1-Wire interface, allowing temperature measurements using only one microcontroller data pin.
It provides digital temperature measurements from -55°C to +125°C with an accuracy of ±0.5°C from -10°C to +85°C. Its programmable 9-bit to 12-bit resolution, unique 64-bit device address and multidrop capability make it ideal for Arduino, ESP32, Raspberry Pi and embedded temperature-monitoring projects.
Technical Specifications
-
Sensor: DS18B20
-
Sensor Type: Digital Temperature Sensor
-
Package: TO-92, 3-Pin
-
Interface: 1-Wire
-
Supply Voltage: 3.0–5.5V DC
-
Temperature Range: -55°C to +125°C
-
Accuracy: ±0.5°C from -10°C to +85°C
-
Programmable Resolution: 9, 10, 11 or 12-Bit
-
12-Bit Resolution: 0.0625°C
-
Maximum Conversion Time: 750ms at 12-Bit Resolution
-
Unique Device Address: 64-Bit Serial Code
-
Alarm Function: Programmable High & Low Temperature Thresholds
-
Parasite Power Mode: Supported
-
Multiple Sensors on One Bus: Supported
1-Wire Digital Interface
The DS18B20 communicates using the 1-Wire protocol, requiring only a single GPIO data line for communication with the microcontroller.
A typical connection uses:
-
GND – Ground
-
DQ – 1-Wire Data
-
VDD – 3.0–5.5V Power
A pull-up resistor, typically 4.7kΩ, is commonly connected between the DQ data line and VCC.
Programmable Temperature Resolution
The measurement resolution can be configured according to the application:
-
9-Bit: 0.5°C
-
10-Bit: 0.25°C
-
11-Bit: 0.125°C
-
12-Bit: 0.0625°C
Higher resolution provides finer temperature readings but requires a longer conversion time.
At 12-bit resolution, the maximum temperature conversion time is approximately 750ms.
Multiple Sensors on One GPIO
Every DS18B20 contains a unique 64-bit serial number.
This allows multiple DS18B20 sensors to share the same 1-Wire data bus while each sensor can still be individually identified and read.
This is especially useful for:
- Multi-Point Temperature Monitoring
- HVAC Systems
- Server & Equipment Monitoring
- Battery Temperature Monitoring
- Environmental Monitoring
- Industrial Systems
Parasite Power Support
The DS18B20 can also operate in parasite power mode, where it derives power directly from the 1-Wire data line.
This allows certain applications to operate using only:
DQ + GND
However, using the dedicated VDD connection is generally simpler and preferable for many microcontroller projects.
Microcontroller Compatibility
The DS18B20 can be used with many platforms, including:
- Arduino UNO
- Arduino Nano
- Arduino Mega
- ESP32
- ESP8266
- Raspberry Pi
- STM32
- PIC
- AVR
- Other 3.3V and 5V Microcontrollers
Applications
Ideal for:
- Digital Thermometers
- Arduino Projects
- ESP32 Projects
- Raspberry Pi Projects
- HVAC Systems
- Temperature Controllers
- Data Logging
- Home Automation
- Smart Agriculture
- Battery Monitoring
- Equipment Temperature Monitoring
- Industrial Control
- Robotics
- IoT Projects
- Over-Temperature Protection
Pinout
With the flat face of the TO-92 package facing you and the pins pointing downward:
Pin 1 – GND
Pin 2 – DQ / Data
Pin 3 – VDD
Always verify the device orientation before applying power.
Important Notes
-
The DS18B20 provides a digital output, not an analog voltage output.
-
A 4.7kΩ pull-up resistor is typically required between DQ and VCC.
- Do not exceed the 3.0–5.5V operating supply range.
-
±0.5°C accuracy applies specifically from -10°C to +85°C, not across the entire -55°C to +125°C range.
- Multiple DS18B20 sensors can operate on the same 1-Wire bus because each has a unique 64-bit address.
-
This TO-92 component itself is not waterproof.
- For liquid or outdoor measurements, use a properly sealed DS18B20 probe version.
Package Includes
1 × DS18B20 Digital Temperature Sensor – TO-92