Temperature
DS18B20
1-Wire digital thermometer, ±0.5°C, configurable 9-12 bit resolution — many can share one data pin.
DS18B20 · Analog Devices (Maxim)
Overview
The DS18B20 is a true Dallas/Maxim 1-Wire digital thermometer: each chip has a unique 64-bit ID burned in, so any number of them can share a single data pin (needs the OneWire + DallasTemperature Arduino libraries, not digitalRead()). Sold both as the bare 3-pin TO-92 package and as a "waterproof probe" — a length of cable with the same die potted into a stainless-steel tip — the two are electrically identical, just repackaged differently, so this record covers both. Resolution is configurable from 9 to 12 bits (0.5°C down to 0.0625°C); the guaranteed ±0.5°C accuracy only holds over -10°C to +85°C, and is looser outside that band.
Wiring tip: 1-Wire — needs a 4.7kΩ pull-up on DATA (usually NOT included on bare boards/probes) and the OneWire library
Pins & wiring
DS18B20
TO-92
Physical pin order shown left to right.
All pins
Hover · click to selectSelected pin
GND
- Direction
- Passive
Full pin table
| Pin | Name | Role | Direction | Note |
|---|---|---|---|---|
| 1 | Ground | Passive | — | |
| 2 | GPIO | Open-drain | OneWire data line — needs the OneWire/DallasTemperature library, not digitalRead(). | |
| 3 | Power | Power | This example uses normal (externally-powered) mode; the chip also supports a parasite-power mode that steals power from DQ itself, not modeled separately here. |
Wiring examples
5V host (Arduino Uno), normal power mode
arduino-uno pinout →| DS18B20 pin | Connects to | Note |
|---|---|---|
| VDD | 5V | — |
| GND | GND | — |
| DQ | D2 | — |
You also need
- Required4.7 kΩ resistor between DQ and VDD — Required — the 1-Wire bus won't work without it.
3.3V host (ESP32), normal power mode
esp32-devkit-v1 pinout →| DS18B20 pin | Connects to | Note |
|---|---|---|
| VDD | 3V3 | — |
| GND | GND | — |
| DQ | GPIO4 | — |
You also need
- Required4.7 kΩ resistor between DQ and VDD — Required — the 1-Wire bus won't work without it.
Specifications
Footprint
No independently verified physical footprint is on file for this part yet.
Alternatives
Upgrades
Strictly better on the headline spec, but expect to touch firmware or wiring to actually use the difference.
I2C multi-sensor (adds humidity + pressure) with faster sampling, if you don't need the waterproof-probe form factor.
Compare with DS18B20- Interface: onewire → i2c
Adds humidity sensing if you need it — trades away 1-wire multi-drop and the waterproof-probe option.
Compare with DS18B20- Measures: temperature → temperature, humidity
- Interface: onewire → digital (timed, proprietary)
Documents
Datasheets
- DS18B20 DatasheetAnalog Devices
Frequently asked questions
What voltage does the DS18B20 run at?
The DS18B20 runs at 3–5.5V, per the spec sheet below. Always double-check against the specific board you have — some breakouts add an onboard regulator that changes the usable input range.
How many pins does the DS18B20 have?
The DS18B20 has 3 pins, communicating over Digital, 1-Wire. See the full pinout table in Pins & wiring for each pin's role.
Can I simulate the DS18B20 before ordering hardware?
Not yet — the DS18B20 does not have a live simulation model in Banana Board today, so validate the wiring here and test on real hardware.
Where is the DS18B20 datasheet?
Linked in the Documents section on this page, and cited on every spec that came from it.
Related references
Build it, do not just look it up
Describe your circuit in one sentence and Banana Board wires it to these exact pins, validates it, and lays out a fab-ready PCB.