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

BD176 BJT PNP TransistorThe BD176 Transistor BJT PNP TO-126 is a superior, dependable, and high-performance transistor, engineered for diverse applica..
1.84RON
Ex Tax:1.84RON
 BS250 P-Channel MosfetThe BS250 P Channel Mosfet TO-92 is a semiconductor device of superior quality, designed to deliver high performance and reliab..
3.68RON
Ex Tax:3.68RON
HEF4077B Gates Quadruple Exclusive-NOR GateThe HEF4077B Gates Quadruple Exclusive-NOR Gate is a state-of-the-art, high-performance logic gate that gua..
4.60RON
Ex Tax:4.60RON
Add to Cart
0.0047uF 250VAC GPF - MKP X2 Polyester Film CapacitorPresenting the 0.0047 µF 250V GPF - MKP X2 capacitor, a component with unique attributes, making ..
20.70RON
Ex Tax:20.70RON
Add to Cart
0.1A 250V Glass Fuse 5x20 mm 5x20 glass fuses are small, cylindrical fuses used to protect electrical and electronic circuits from overcurrent co..
1.01RON
Ex Tax:1.01RON
Add to Cart
0.1F 5.5V Superfarad Capacitor Battery Type Super CapacitorThis capacitor is a battery-type capacitor that operates at voltages up to 5.5V. It is comm..
11.09RON
Ex Tax:11.09RON
Add to Cart

WhatsApp Chat

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