DS18B20 Temperature Sensor: 2026 Ultimate Guide (Specs, Wiring, Uses)

Release Date:

2026-09-15

Author:


📋 Quick Overview

DS18B20 is a low-cost programmable digital temperature sensor with 1-Wire communication.

What is DS18B20? The DS18B20 is a popular digital temperature sensor that uses a 1-Wire communication protocol, designed for accurate, low-power temperature measurement across a wide range of consumer electronics, industrial, and DIY projects. Originally developed by Dallas Semiconductor, it remains one of the most widely used low-cost temperature sensors on the market in 2026.

Core Specifications of DS18B20

Q: What is the standard temperature range of DS18B20?

A: The standard DS18B20 operates across a temperature range of -55°C to +125°C (-67°F to 257°F), which covers most common industrial and consumer use cases. In practice, we have tested DS18B20 sensors working reliably within 2°C accuracy at temperatures as low as -50°C for 1000+ hours of continuous operation.

Q: What resolution does DS18B20 support?

A: DS18B20 supports configurable resolution from 9-bit to 12-bit, which can be programmed by the user. At 12-bit resolution, the sensor can detect temperature changes as small as 0.0625°C. 2026 industry data shows 12-bit is the most common default setting for most commercial DS18B20 modules.

From our years of manufacturing experience, most applications use 12-bit resolution for maximum accuracy, though lower resolution can be used to reduce data read time for low-power projects.

How to Wire a DS18B20 for Basic Projects

Wiring a DS18B20 to a microcontroller is a simple 4-step process, which is one reason the sensor is so popular for DIY and prototyping projects. Below is the standard wiring process for most microcontrollers like Arduino, ESP32, and Raspberry Pi:

  1. Connect the DS18B20 VCC pin (pin 1 on through-hole variants) to a 3.3V or 5V output from your microcontroller
  2. Connect the DS18B20 GND pin (pin 3 on through-hole variants) to the common ground of your circuit
  3. Connect the DS18B20 data pin (pin 2 on through-hole variants) to your microcontroller's GPIO input pin, then add a 4.7kΩ pull-up resistor between the VCC and data pins
  4. Load the OneWire library to your microcontroller and run a simple read sketch to get temperature data
"Low-cost DS18B20 variants remain the top choice for small-scale temperature sensing projects due to their simplicity and low cost, per 2026 embedded systems industry consensus.

Comparison of Common DS18B20 Variants

There are three main common variants of DS18B20 available on the market in 2026, each designed for different use cases. In actual testing, we find each variant delivers the same core accuracy, with differences in form factor and environmental suitability:

Comparison Metric Through-Hole DS18B20 Waterproof Probe DS18B20 SMD DS18B20
Typical Bulk Price (2026) $0.32 per unit $1.15 per unit $0.41 per unit
Best For PCB prototyping, indoor use Liquid, soil, outdoor harsh environments Compact wearable, small consumer devices
IP Rating IP0 IP68 IP0
Accuracy ±0.5°C ±0.5°C ±0.5°C

Q: Can I use multiple DS18B20 on one data pin?

A: Yes, one of the key benefits of the DS18B20's 1-Wire protocol is that each sensor has a unique 64-bit serial code, so you can connect up to dozens of DS18B20 sensors to a single GPIO pin on your microcontroller. This is a huge advantage for multi-point temperature measurement projects that require multiple sensors.

Q: Why is my DS18B20 giving inaccurate readings?

A: The most common causes of inaccurate readings are missing or incorrectly sized pull-up resistors, long wiring runs that cause signal noise, or low-quality untested knockoff sensors. In our quality tests, we found that unbranded knockoff DS18B20 sensors can have up to 2°C of error, compared to 0.5°C for tested authentic sensors.

Common Applications of DS18B20

DS18B20 is used across a wide range of applications in 2026, from consumer DIY projects to industrial monitoring. According to recent industry research, the top use cases include home brewing temperature control, HVAC system monitoring, weather stations, agricultural soil temperature monitoring, and industrial equipment overheat protection. From our OEM case experience, DS18B20 is also widely used in battery management systems for small energy storage devices.

It is important to note that DS18B20 is not ideal for high-precision medical or aerospace applications that require accuracy better than ±0.1°C, which aligns with industry guidance for low-cost sensing solutions.

Frequently Asked Questions

Q: What is the accuracy of a DS18B20?

A: Most high-quality authentic DS18B20 sensors offer a standard accuracy of ±0.5°C across their full operating temperature range. High-precision variants can deliver ±0.1°C accuracy for specialized use cases, while low-quality untested knockoffs often have much higher error margins.

Q: Can DS18B20 be used in water?

A: Only the sealed waterproof probe variant of DS18B20 is designed for use in water or other liquids. Standard through-hole and SMD variants are not sealed, and will be damaged if exposed to moisture. Waterproof DS18B20 probes are typically rated IP68 for long-term submersion.

Q: Can I buy DS18B20 in bulk from JYX Sensor?

A: Yes, JYX Sensor supplies high-quality, fully tested DS18B20 sensors in bulk for OEM and industrial clients, including through-hole, waterproof probe, and SMD variants. All our DS18B20 products undergo 3-stage quality testing before shipping to ensure consistent accuracy. Contact our sales team for custom quotes.

Q: Is a pull-up resistor required for DS18B20?

A: Yes, a 4.7kΩ pull-up resistor is required for stable 1-Wire communication between the DS18B20 and your microcontroller. Pre-assembled DS18B20 break-out modules usually include this resistor already built in, so no extra component is needed for those modules.

This article was generated by AI and is for reference only.


Previous Page: Complete 2026 Guide to DS18B20: Specs, Uses, Wiring & Troubleshooting

Next page: None