Skip to product information
DS18B20 Digital Temperature Sensor Module

DS18B20 Digital Temperature Sensor Module

Sale price  $1.95 Regular price  $2.95
Description
Details
Material

Module utilizes the popular 1-Wire DS18B20 temperature measurement IC.

Description

The DS18B20 Digital Temperature Sensor Module utilizes the popular 1-Wire DS18B20 temperature measurement IC.

PACKAGE INCLUDES:

  • DS18B20 Digital Temperature Sensor Module

KEY FEATURES OF DS18B20 DIGITAL TEMPERATURE SENSOR MODULE:

  • -55°C to +85°C temperature measurement range with good accuracy
  • 1-wire interface to save on MCU pins
  • LED to indicate module communications
  • 3.3 and 5V compatible

Communication with the DS18B20 is via the 1-Wire serial interface.  There is an LED on the module that flashes when the sensor is communicating with an MCU.

The communication protocol can look daunting when looking at the datasheet, but fortunately most poplar microcontrollers like Arduino have software libraries that make using these devices very straightforward and easy to do.

There are some options which can be programmed when using the device such as choosing between number of bits of resolution vs conversion time, but those can be ignored for establishing basic operation.

Hookup is straightforward.  Just supply power, ground and connect the 1-Wire bus pin to a digital pin on the microcontroller.  The part is compatible with 3.3 or 5V power.

Module Connections

There is a 3-pin header on the assembly.  There are a couple of different labeling schemes used on these modules as the baseboard is used for several different modules.

1 x 3 Header 

  • ‘-‘ or ‘G’ = Ground
  • Center Pin or ‘R‘ = Vcc (3.3 – 5V)
  • ‘S’ or ‘Y’ = 1-wire bus.  Connects to digital pin on MCU

OUR EVALUATION RESULTS:

DS18B20 Digital Temp Sensor Module - In UseThis is a basic module that can be used in a number of different applications where temperature measurement is useful such as determining when a cooling fan should be turned on.

We also offer the DS18B20 device in a number of other packages including as a bare IC for designing your own circuits, a waterproof version and others.

The software below implements basic communications with the sensor using the 1-Wire bus protocol and provides a read-out of the sensor output.  We use pin 4 in the example, but this can be reassigned to any digital pin.

The program uses the OneWire and DallasTemperature libraries that can be installed from the IDE Library Manger.

This shows an example output from the program.

DS18B20 Digital Temperature Sensor Module Example Program

/*
DS18B20 Digital Temperature Sensor Test

Basic code to establish communication with the DS18B20 and retrieve temperature measurement data. 

Requires OneWire and DallasTemperature Libraries
*/

#include <OneWire.h> 
#include <DallasTemperature.h> 

const int ONE_WIRE_BUS = 4;  // Define a pin for communicating to the DS18B20 device via the oneWire bus.
OneWire oneWireLocal(ONE_WIRE_BUS);   // Setup a oneWire instance to communicate with the DS18B20 device
DallasTemperature sensorsLocal(&oneWireLocal);  // Pass this oneWire reference to DallasTemperature

float tempLocal = 0.0;    // Variable for holding the temperature returned from the sensor

//===============================================================================
//  Initialization
//===============================================================================
void setup() 
{ 
  Serial.begin (9600);      // Set output window comm rate
  sensorsLocal.begin();
}

//===============================================================================
//  Main
//===============================================================================
void loop() 
{
  CheckTemps();   // Call the routine that actually does the work
  Serial.print("Current Temp: ");  // Printout the results
  Serial.println(tempLocal);
   
  delay(1000);
}

//===============================================================================
//  Subroutines
//===============================================================================
void CheckTemps()
{
  sensorsLocal.requestTemperatures();   // Send command to get temperature from the DS18B20
  // The sensor will return reading from previous request unless a delay is used to give it time to
  // complete the reading request.  If polling every second like we are doing here, the delay can be ignored.
  delay(100);  
  tempLocal = sensorsLocal.getTempCByIndex(0);  // There can be more than one device on this same bus
                                                // so we need to use the first index of (0)
}

BEFORE THEY ARE SHIPPED, THESE MODULES ARE:

  • Inspected
  • Basic operation verified
  • Packaged in a resealable ESD bag for protection and easy storage.

Notes: 

  1. This module is the same or similar to the KY-001.
  2. If you experience any communication issues, try adding a 4.7K ohm pull-up resistor on the ‘S’ pin.

Technical Specifications

Communication Interface 1-Wire
Input Logic High > 2.2V
Logic Low < 0.8V
Supply Voltage Maximum 5.5V
Minimum 3V
Temperature  Maximum Range -55°C to +85°C
 Accuracy (-10°C to 85°C) +/- 0.5°C
Package SS Encapsulated TO-92
Dimensions L x W (PCB) 20 x 15mm  (0.8 x 0.6″)
Datasheet DS18B20

 

Reliable JST connector cables with secure locking design, UL-certified wires, and high-quality crimping. Supports up to 3A current with compact 2.5mm pitch. Ensures stable power and signal transmission for PCB, LED, robotics, and industrial use. Custom lengths, colors, and pin counts available.

cables are made with high-purity copper wires and solid copper terminals, ensuring excellent conductivity, low resistance, and long-term reliability in power and signal transmission. Ideal for high-performance electronic applications.

Are any purchases final sale?

We are unable to accept returns on certain items. These will be carefully marked before purchase.

When will I get my order?

We will work quickly to ship your order as soon as possible. Once your order has shipped, you will receive an email with further information. Delivery times vary depending on your location.

Where are your products manufactured?

Our products are manufactured both locally and globally. We carefully select our manufacturing partners to ensure our products are high quality and a fair value.

How much does shipping cost?

Shipping is calculated based on your location and the items in your order. You will always know the shipping price before you purchase.

Frequently Bought Together