What is the DS18B20 used for?
It measures temperature in places other sensors cannot go, such as water and soil. The DS18B20 datasheet (opens in a new tab) lists thermostats, industrial systems, consumer products and thermometers. In student projects it runs pool and fish-tank monitors, insulation tests, compost monitors and cooling-curve experiments.
How does the DS18B20 temperature sensor work?
A sensor inside the chip measures its own temperature and turns it into a 16-bit number. The microcontroller asks for a reading over the 1-Wire bus, waits up to 750 ms, then reads two temperature bytes and a check byte. Every chip has a unique 64-bit address, so several can share one data wire.
What is the accuracy of the DS18B20?
±0.5 °C from −10 to 85 °C, and ±2 °C across its full −55 to 125 °C range, according to the datasheet (opens in a new tab). Its resolution can be finer than that, down to 0.0625 °C, but a fine step does not make a reading true. Clone chips may not meet these figures.
What are the power requirements for the DS18B20?
It runs on 3.0 to 5.5 V. The datasheet (opens in a new tab) gives about 1 mA while it measures, at most 1.5 mA, and about 750 nA when idle. On an ESP32, power it from 3.3 V so the data line stays at 3.3 V.
Does the DS18B20 need a resistor?
Yes, the data line needs a pull-up to power. The datasheet's drawings show 4.7 kΩ, and Adafruit's probe page (opens in a new tab) calls its included 4.7 kΩ resistor required. Some ready-made modules and boards already include one, so check before you add a second.
Can a DS18B20 probe go in boiling water?
The chip is rated to 125 °C, but Adafruit (opens in a new tab) suggests keeping its PVC-jacketed probe under 100 °C, so boiling water is at the limit. It is also not for salt water or long-term use under pressure. In a classroom, use cool or lukewarm water only.
How many DS18B20 sensors can share one wire?
The datasheet (opens in a new tab) calls the number "virtually unlimited", because each chip has its own 64-bit address. In practice, long cables and many sensors need care with the pull-up and power. The MakerBuddy firmware reads only the first probe on socket 26.
Why does my DS18B20 read 85 or −127?
85.0 is the value the chip holds at power-up, so your code read it before a measurement finished. −127 is what the DallasTemperature library (opens in a new tab) returns when no sensor answers, which points to wiring, the pull-up or the pin. On the MakerBuddy dashboard a missing probe shows as 0.0 instead.