DS18B20 Waterproof Temperature Sensor with Cable – High-Precision 1-Wire Digital Temperature – 55°C to +125°C

250.00450.00

25 Items sold in last 3 months
  • Delivery to Pakistan

Shipping via Leopards

1-3 Business Days (Normally)

Shipping calculated at checkout.

  • Delivery to US

Shipping via DHL, UPS, or FedEx.

3-12 Business Days (Normally)

Shipping calculated at checkout.

Payment Methods:

Overview

🔹 Technical Specifications

  • Sensor Type: Digital (DS18B20)

  • Interface: 1-Wire (Dallas protocol)

  • Power Supply: 3.0V-5.5V DC

  • Current Consumption: 1mA (active), 750µA (standby)

  • Accuracy: ±0.5°C (-10°C to +85°C)

  • Resolution: Programmable 9-12 bits (0.5°C to 0.0625°C)

  • Probe Material: Stainless steel (IP67 waterproof)

  • Cable Length: Typically 1 meter (custom lengths available)

Detailed Description

 

DS18B20 Waterproof Temperature Sensor with Cable – High-Precision 1-Wire Digital Thermometer

Professional-Grade DS18B20 Temperature Probe with 1-Wire Interface – Ideal for Arduino, Raspberry Pi & ESP Projects

This DS18B20 digital temperature sensor comes in a weatherproof cable version, providing accurate -55°C to +125°C measurements with ±0.5°C precision. The 1-Wire interface allows easy connection to microcontrollers like Arduino, ESP8266, ESP32, and Raspberry Pi, making it perfect for home automation, weather stations, aquariums, and industrial monitoring.

🔹 Key Features

High Accuracy (±0.5°C) – Better than analog thermistors
Wide Temperature Range (-55°C to +125°C)
Waterproof Stainless Steel Probe – IP67 rated for harsh environments
1-Wire Digital Interface – Simple wiring (only 1 data pin needed)
Multiple Cable Color Variations – Supports different wiring configurations
Programmable Resolution (9-12 bits)
Unique 64-bit Serial Code – Enables multiple sensors on single bus

🔹 Wiring Guide

Cable Color   Connection
BlackGND
GreenGND
YellowGND
RedVCC (3-5V)
White/BlueData
YellowData
GreenData

Required: 4.7kΩ pull-up resistor between Data and VCC (some MCUs have internal pull-up)

🔹 Compatibility

Arduino (Uno, Nano, Mega)
ESP8266 & ESP32
Raspberry Pi
STM32 & other 3.3V/5V MCUs
Industrial PLCs with 1-Wire support

🔹 Applications

🌡 Home Automation – Smart thermostats, room monitoring
🌊 Aquarium/Pool Control – Water temperature regulation
🏭 Industrial Monitoring – Machinery temperature tracking
🌦 Weather Stations – Outdoor temperature sensing
🔬 Scientific Experiments – Precise thermal measurements

🔹 Package Includes

1× DS18B20 Waterproof Temperature Sensor

 

Just connect the TO-92 as in the pin diagram above (with the resistor mentioned above).

Software

To use it (assuming you connected to pin A1), simply write the following on the right-hand side:

var ow = new OneWire(A1);
var sensor = require("DS18B20").connect(ow);
setInterval(function() {
  sensor.getTemp(function (temp) {
    console.log("Temp is "+temp+"°C");
  });
}, 1000);

And the current temperature will be displayed every second.

27.625

You can also call the getTemp function directly (for instance console.log(sensor.getTemp())) however in this case it will immediately return with the last temperature reading and will start another. This means the first time getTemp is called, an incorrect temperature will be returned.

Multiple sensors

The DS18B20 communicates over a 1-Wire bus, which allows connecting multiple thermometers on the same data line.

To create an array containing three sensors, simply use:

var ow = new OneWire(A1);
var sensor1 = require("DS18B20").connect(ow, 0);
var sensor2 = require("DS18B20").connect(ow, 1);
var sensor3 = require("DS18B20").connect(ow, 2);
var sensors = [sensor1, sensor2, sensor3];

Alternatively, you can create the same array with a little help of the Array.map() function:

var sensors = ow.search().map(function (device) {
  return require("DS18B20").connect(ow, device);
});

Now make a function that will be called repeatedly by Espruino:

setInterval(function() {
  sensors.forEach(function (sensor, index) {
    sensor.getTemp(function (temp) {
      console.log(index + ": " + temp + "°C");
    });
  });
}, 1000);

And the current temperature of each sensor will be displayed every second:

0: 25.3125
1: 21.0625
2: 24.1875

Module reference

// For internal use - read the scratchpad region
DS18B20.prototype._r = function () { ... }

// For internal use - write to the scratchpad region
DS18B20.prototype._w = function (th, tl, conf) { ... }

/* Set the sensor resolution in bits. From 9 to 12.
    This setting is stored in device's EEPROM so it persists even after the sensor loses power.
*/
DS18B20.prototype.setRes = function (res) { ... }

// Return the resolution in bits. From 9 to 12
DS18B20.prototype.getRes = function () { ... }

// Return true if this device is still connected to the OneWire Bus
DS18B20.prototype.isPresent = function () { ... }

/* Get a temperature reading in degrees C. If callback is supplied,
it will be called with the current temperature. If it isn't the *last*
temperature will be returned and a new reading will be started. This
means that with no callback, the first call to getTemp will return
an invalid temperature. If the CRC fails, 'null' will be returned
*/
DS18B20.prototype.getTemp = function (callback) { ... }

// Return a list of all DS18B20 sensors with their alarms set
DS18B20.prototype.searchAlarm = function () { ... }

/* Set alarm low and high values in whole degrees C - see DS18B20.prototype.searchAlarm. 
  If the temperature goes below `lo` or above `hi` the alarm will be set.
*/
DS18B20.prototype.setAlarm = function (lo, hi) { ... }

/* Initialise a DS18B20 device. Use either as:
  connect(new OneWire(pin)) - use the first found DS18B20 device
  connect(new OneWire(pin), N) - use the Nth DS18B20 device
  connect(new OneWire(pin), ID) - use the DS18B20 device with the given ID
*/
exports.connect = function (oneWire, device) { ... }

Customer Reviews

0 reviews
0
0
0
0
0

There are no reviews yet.

Be the first to review “DS18B20 Waterproof Temperature Sensor with Cable – High-Precision 1-Wire Digital Temperature – 55°C to +125°C”