The DS18B20 Waterproof Temperature Probe Sensor is a digital temperature sensor designed for precise temperature measurement in harsh or wet environments. It uses the One-Wire protocol, meaning it requires only one data line (plus ground) for communication, making it easy to connect multiple sensors on the same wire.
Key Features
Temperature Range: –55°C to +125°C
Accuracy: ±0.5°C (from –10°C to +85°C)
Output Type: Digital (no ADC required)
Resolution: Programmable from 9-bit to 12-bit
Waterproof Design: Encased in a stainless steel tube with sealed epoxy, ideal for immersion in water or harsh conditions
Power Supply: 3.0V to 5.5V
Cable Length: Commonly 1m, 2m, or longer
Applications
Liquid temperature measurement (e.g., aquariums, hydroponics)
Outdoor weather stations
Industrial systems
Food processing
IoT temperature monitoring projects
Wiring
Red: VCC (3.3V or 5V)
Black: GND
Yellow: Data (connect with a 4.7kΩ pull-up resistor to VCC)
Communication Protocol
Uses One-Wire Bus (all data over a single wire)
Each sensor has a unique 64-bit serial code → multiple sensors can be on the same bus
Arduino Example Code
#include <OneWire.h>
#include <DallasTemperature.h>
// Pin where DS18B20 is connected
#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);
}





















