DS18B20 temperature sensor pinout
DS18B20 temperature sensor (TO-92), DS18B20, 3.3 V logic, 7.2×11.5 mm, 3 pins
verified20.10.2026
View of the flat marked side, pins down: GND, DQ, VDD from left to right.
BuyDownload PNG- Chip
- DS18B20
- Logic
- 3.3 V
- Power
- VDD (pin 3) 3-5.5 V
Important
- To ESP32: VDD to 3V3, GND to GND, DQ to any GPIO with output (GPIO34-39 are input only and do not work for 1-Wire), 4.7 kΩ from DQ to 3V3. OneWire and DallasTemperature libraries.
- To Arduino: VDD to 5V, DQ to D2 or any digital pin, 4.7 kΩ from DQ to 5V.
- GND and VDD swapped: the sensor heats up. Remove power at once and check the pin order.
- Parasitic power (two wires): VDD and GND to ground, DQ through 4.7 kΩ. During a measurement the line needs a strong pull-up through a transistor; above 100 °C this mode is not recommended (Maxim).
- At 12 bit a measurement takes up to 750 ms, at 9 bit it is 8 times faster.
- 1-1.5 mA while measuring, up to 1 µA in standby.
Revisions and clones
- Waterproof probe (Adafruit 381): red VDD, black or blue GND, yellow or white DQ. Unbranded probes may use other colors (low confidence): check the seller's description or buzz out the wires to the sensor.
- SO-8 (DS18B20Z) and µSOP (DS18B20U): pins per the datasheet, SO-8 has VDD 3, DQ 4, GND 5.
- DS18S20 and DS1820: same TO-92 pin order, different accuracy and commands.
All pins
| Label | Number | Functions | Limits | Check |
|---|---|---|---|---|
| GND | pin 1 | Ground | verifiedLabelled on other revisions as: 1 | |
| DQ | pin 2 | 1-Wire: data, open drain | verifiedA 4.7 kΩ pull-up from DQ to VDD is required. Several sensors can share one wire: each has its own 64-bit address.Labelled on other revisions as: DATA, DAT, 2 | |
| VDD | pin 3 | 3.3 V | power input | verified3.0-5.5 V. In parasitic power mode VDD is tied to GND.Labelled on other revisions as: VCC, 3 |
Sources
Every pin is verified against the manufacturer's documents.
- Maxim DS18B20 Programmable Resolution 1-Wire Digital Thermometer (REV 042208, Adafruit copy)datasheet, checked 20.10.2026TO-92, view of the marking: 1 GND, 2 DQ, 3 VDD; supply 3.0–5.5 V; active current 1–1.5 mA, standby 750–1000 nA; 4.7 kΩ pull-up; parasitic power from VDD to GND with a strong pull-up during measurement, not recommended above 100 °C; 12 bit up to 750 ms
- Adafruit: Waterproof DS18B20 Digital temperature sensor + extras (381)user guide, checked 20.10.2026probe with three wires: red 3-5 V, blue or black GND, yellow or white data; with four: red, black, white; 4.7 kΩ pull-up included; keep the PVC cable below 100 °C
Size: TO-92 package 4.8×4.6 mm, leads spread to 2.54 mm pitch (the package pitch is 1.27 mm) (approximate).
FAQ
- What supply voltage does the DS18B20 temperature sensor need?
- VDD (pin 3): 3-5.5 V. 3.3 V logic.



