My Account

Your Cart

Temperature Sensor DS18B20

Temperature Sensor DS18B20
Temperature Sensor DS18B20
5.06RON
Ex Tax: 5.06RON
  • Stock: In Stock
  • Model: A0301.DS18B20
Your orders placed until 16:30 on weekdays are shipped on the same day.

DS18B20 Digital Temperature Sensor

The DS18B20 is a high-precision digital temperature sensor that provides temperature readings ranging from 9 to 12-bit (configurable) via a 1-Wire interface.

Key Features of DS18B20 Sensor

  • Temperature Range: It operates within a temperature range of -55°C to +125°C.
  • Accuracy: It offers an accuracy of ±0.5°C for temperatures between -10°C and +85°C.
  • Resolution: The resolution is configurable from 9 to 12 bits, with 12 bits being the default setting.
  • Interface: It employs a 1-Wire interface, enabling multiple sensors to share the same data line.
  • Unique 64-Bit Serial Code: Each DS18B20 sensor has a unique 64-bit serial code, which allows for the identification and connection of multiple sensors on the same 1-Wire bus.
  • Power Supply: It can be powered either by an external power supply (3.0V to 5.5V) or parasitically from the data line.
  • Alarm Functionality: It has programmable alarm triggers for setting upper and lower temperature limits.

Applications of DS18B20 Sensor

  • Temperature Measurement: It's perfect for tracking temperatures in various applications, such as HVAC systems, environmental monitoring, and food processing.
  • Industrial Automation: It's utilized for precise temperature regulation in industrial operations.
  • Consumer Electronics: It's integrated into home automation systems for climate regulation.
  • Data Logging: It's suitable for temperature data logging applications.

Example Circuit


Here's an example of how to 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


To interface with the DS18B20 sensor, install the "OneWire" and "DallasTemperature" libraries in the Arduino IDE. Here's a sample code:


#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: The OneWire and DallasTemperature libraries are included to facilitate communication with the DS18B20 sensor.
  • Pin Definition: The digital pin (D2) connected to the DS18B20 data line is defined.
  • Setup: Serial communication and the DallasTemperature library are initialized.
  • Loop: Temperature readings are requested from the sensor and the temperature in Celsius is printed to the Serial Monitor every second.
    This example illustrates how to interface the DS18B20 sensor with an Arduino for precise temperature measurement. Modify the code and wiring as necessary based on your specific setup and needs.

Write a review

Note: HTML is not translated!
Rating
Bad Good

Category Products

10mm LDR - A Light-Sensitive ResistorThe LDR, an acronym for Light Dependent Resistor, is a type of photoresistor. Photoresistors are specialized elec..
2.90RON
Ex Tax:2.90RON
Add to Cart
LDR-Light Sensitive Resistor 5mm PhotoresistorThe Light Dependent Resistor, abbreviated as LDR, is a type of photoresistor. A photoresistor is a class..
0.28RON
Ex Tax:0.28RON
Add to Cart
AH175 Hall Effect SensorThe AH175 is a digital Hall-effect switch. It detects magnetic fields and changes its output state based on the presence of a ..
7.36RON
Ex Tax:7.36RON
Add to Cart
DHT11 Digital Temperature Humidity SensorThe DHT11 is a cost-effective digital sensor that measures both temperature and humidity. It is widely used i..
5.06RON
Ex Tax:5.06RON
Add to Cart
DHT21 AM2301 Digital Temperature Humidity Sensor ModuleThe DHT21, also known as AM2301, is a trusted digital sensor for measuring temperature and humi..
30.36RON
Ex Tax:30.36RON
Add to Cart
DHT22 AM2302: A High-Precision Digital Temperature and Humidity Sensor ModuleThe DHT22, alternatively known as the AM2302, is a highly precise digital..
28.52RON
Ex Tax:28.52RON
Add to Cart

WhatsApp Chat

Hi Guest! Please click one of our representatives Below To Chat On WhatsApp.