DS18B20 Digital Temperature Sensor
Overview
The DS18B20 is a digital temperature sensor module based on the DALLAS DS18B20 IC with 1-Wire interface. Available in chipset, waterproof probe, or breakout module configurations to suit different application requirements.


Specifications
- Power Supply 3V to 5.5V
- Current Consumption 1mA
- Temperature Range -55 to 125°C
- Accuracy ±0.5°C
- Resolution 9 to 12 bit (selectable)
- Conversion Time < 750ms
Supported GPIO
- Raspberry Pi 0~4
- Raspberry Pi 5
- BeagleBone Black/Green
Commands
[READ_TEMP]
Returns temperature measurement from the module. Resolution is fixed at 12-bit.
Item | Type | Description |
---|---|---|
Temperature(℃) | READ | Current temperature reading from the module. |
Example
Objective
This example demonstrates how to read temperature data from the DS18B20 sensor and display it on a dashboard gauge widget.
Parts
Part | Quantity |
---|---|
Raspberry Pi 4 * | 1 |
DS18B20 | 1 |
* Other compatible hardware may be used. See Supported GPIO for details.
Wiring
Connect each DS18B20 pin to the corresponding GPIO pin as listed in each row below.
DS18B20 | GPIO |
---|---|
VDD (VCC) | 3.3V |
GND | GND |
D (DQ) | 4 |

Project Link
References