DS18B20 Temperature Sensor

DS18B20 Temperature Sensor
DS18B20 Temperature Sensor
1.01€
100 or more 0.69€
1000 or more 0.50€
  • Stock:
  • Product Code: SNA007.DS18B20
  • Weight: 0.30

DS18B20 Temperature Sensor

The DS18B20 is a digital temperature sensor that provides 9 to 12-bit (configurable) temperature readings over a 1-Wire interface. Here’s detailed information about the DS18B20 sensor:

Features:

  1. Temperature Range:
    • Operating: -55°C to +125°C
  2. Accuracy:
    • ±0.5°C from -10°C to +85°C
  3. Resolution:
    • Configurable from 9 to 12 bits, with the default being 12 bits.
  4. Interface:
    • Uses a 1-Wire interface, which allows multiple sensors to be connected on the same data line.
  5. Unique 64-Bit Serial Code:
    • Each DS18B20 has a unique 64-bit serial code, allowing multiple sensors to be connected and identified on the same 1-Wire bus.
  6. Power Supply:
    • Can be powered by an external power supply (3.0V to 5.5V) or parasitically from the data line.
  7. Alarm Functionality:
    • Programmable alarm triggers for upper and lower temperature limits.

Applications:

  • Temperature Measurement: Ideal for monitoring temperatures in a wide range of applications, including HVAC systems, environmental monitoring, and food processing.
  • Industrial Automation: Used for precise temperature control in industrial processes.
  • Consumer Electronics: Incorporated into home automation systems for climate control.
  • Data Logging: Suitable for temperature data logging applications.

Example Circuit:

Here's how you might connect a DS18B20 sensor to an Arduino:

  • VDD: Connect to 3.3V or 5V (depending on your Arduino model).
  • GND: Connect to ground.
  • DQ (Data Line): Connect to a digital pin on the Arduino (e.g., D2) with a 4.7k ohm pull-up resistor between DQ and VDD.

Arduino Sample Code:

You need to install the "OneWire" and "DallasTemperature" libraries in the Arduino IDE to interface with the DS18B20 sensor.

#include 
#include 

// Data wire is connected to Arduino pin 2
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

void setup() {
  Serial.begin(9600);
  sensors.begin();
}

void loop() {
  sensors.requestTemperatures(); // Send the command to get temperatures

  // Print the temperature in Celsius
  Serial.print("Temperature: ");
  Serial.print(sensors.getTempCByIndex(0)); // We only have one sensor, so we use index 0
  Serial.println(" °C");

  delay(1000); // Wait for a second before taking another reading
}

Explanation:

  • Libraries: Include the OneWire and DallasTemperature libraries to communicate with the DS18B20 sensor.
  • Pin Definition: Define the digital pin (D2) connected to the DS18B20 data line.
  • Setup: Initialize serial communication and the DallasTemperature library.
  • Loop: Request temperature readings from the sensor and print the temperature in Celsius to the Serial Monitor every second.

This example demonstrates how to interface the DS18B20 sensor with an Arduino for accurate temperature measurement. Adjust the code and wiring as needed based on your specific setup and requirements.

Write a review

Note: HTML is not translated!
Rating
Bad Good

Related Products

1kg Load Cell Weight Sensor for Electronic ScaleOur 1kg Load Cell Weight Sensor is a high-quality, precision measurement tool designed to provide accu..
2.51€
Add to Cart
5kg Load Cell Weight Sensor Our 5kg Load Cell Weight Sensor is a high-quality, precision measurement tool designed to provide accurate weight measurem..
2.30€
AM2301A Digital Temperature Humidity Sensor Module The AM2301A, also known as DHT21, is a digital temperature and humidity sensor. Here's some informa..
6.90€
Add to Cart
DHT11 Digital Temperature Humidity Sensor Temperature Sensor The DHT11 is a basic, low-cost digital temperature and humidity sensor. It is popular in ..
1.38€
DHT21 AM2301 Digital Temperature Humidity Sensor ModuleThe DHT21 (also known as AM2301) is a digital temperature and humidity sensor. It is widely use..
6.07€
Add to Cart
DHT22 AM2302 Digital Temperature Humidity Sensor Module The DHT22, also known as the AM2302, is a high-accuracy digital temperature and humidity senso..
5.70€
Add to Cart