DS18B20 Waterproof Digital Temperature Sensor – 1-Wire Interface
Overview:
The DS18B20 Digital Temperature Sensor is a highly accurate, waterproof temperature sensor ideal for wet environments, outdoor systems, or remote sensing applications. It communicates over a 1-Wire interface, allowing multiple sensors to be connected using only one digital pin. Compatible with Arduino, ESP32, Raspberry Pi, and other microcontrollers, it’s a go-to sensor for temperature monitoring projects.
Key Features:
Temperature Range: -55°C to +125°C
Accuracy: ±0.5°C from -10°C to +85°C
1-Wire Interface: Requires only one data line for communication
Waterproof Stainless Steel Probe – great for liquids and outdoor use
Unique 64-bit ID – multiple sensors can be used on the same bus
Digital Output: No ADC required
Technical Specifications:
| Parameter | Value |
|---|
| Temperature Range | -55°C to +125°C |
| Accuracy | ±0.5°C (-10°C to +85°C) |
| Resolution | 9 to 12 bits (programmable) |
| Voltage Range | 3.0V to 5.5V |
| Interface | 1-Wire |
| Cable Length | Typically 1 meter |
| Probe Material | Stainless Steel |
Wiring with Arduino Uno:
| DS18B20 Wire Color | Arduino Pin |
|---|
| Red (VCC) | 5V |
| Black (GND) | GND |
| Yellow (Data) | D2 (or any digital pin) |
🔧 Important: Use a 4.7kΩ pull-up resistor between the data line and VCC.
Arduino Code Example:
CopyEdit
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
void setup() {
Serial.begin(9600);
sensors.begin();
}
void loop() {
sensors.requestTemperatures();
float tempC = sensors.getTempCByIndex(0);
Serial.print("Temperature: ");
Serial.print(tempC);
Serial.println(" °C");
delay(1000);
}
Applications:
Resources: