The DS18B20 is a digital temperature sensor from Maxim Integrated (now Analog Devices), known for:
β
Accurate temperature readings
β
Unique 64-bit serial code (for multiple sensors on one wire)
β
1-Wire interface (needs only 1 data line + GND + VCC)
β
Waterproof versions available
| Feature | Description |
|---|---|
| Temperature Range | -55°C to +125°C |
| Accuracy | ±0.5°C (from -10°C to +85°C) |
| Interface | 1-Wire digital |
| Resolution | Programmable: 9 to 12 bits |
| Voltage | 3.0V to 5.5V |
| ID Address | Each sensor has a unique ID |
| Component | Description |
|---|---|
| ESP32 Dev Board | Microcontroller |
| DS18B20 Sensor | Waterproof or standard TO-92 version |
| 4.7kΩ Resistor | Pull-up resistor for 1-Wire |
| Jumper Wires | For connections |
| Breadboard (opt.) | For prototyping |
| DS18B20 Pin | Wire Color (usually) | Connect to ESP32 | Description |
|---|---|---|---|
| VCC | Red | 3.3V or 5V | Power |
| GND | Black | GND | Ground |
| DQ (Data) | Yellow | GPIO 15 (example) | 1-Wire Data |
π§ Add a 4.7kΩ resistor between VCC and DQ.
VCC
|
|
[4.7kΩ]
|
DQ --------+-------- GPIO 15 (1-Wire pin)
|
GND
Open Arduino IDE
Go to Sketch > Include Library > Manage Libraries
Search and install:
OneWire by Paul Stoffregen
DallasTemperature by Miles Burton
| Application | Use Case Example |
|---|---|
| π Home Automation | Room/ambient temperature |
| π° Water Monitoring | Check water heater/cooler |
| πΏ Agriculture | Soil/environmental sensing |
| π₯ Fire Detection | Overheat alert in machines |
| π’ Aquarium Monitoring | Check fish tank or pet enclosures |
| Problem | Fix |
|---|---|
| Reading -127.00 °C | Sensor not connected or wrong pin |
| Output always 0.00 °C | Missing pull-up resistor |
| Sensor not detected | Use .getDeviceCount() to debug |
| Multiple sensors issue | Use .getAddress() with sensor ID |
HOW TO OPERATE
As per official documentation Step by step process for pico program run after power on:Save your pyt...
ESP32 Board are so popular? Mainly because of the following featuresLow-costBluetoothWiFiLow PowerDu...
Node MCU ESP8266 Board are so popular? Mainly because of the following features.Its true Arduino Kil...
π§ Basic IntroductionL298N is a dual H-Bridge motor driver IC that allows controlling the direction...
π§ Components Needed:ComponentQuantityESP32 Dev Board1L298N Motor Driver Module1DC Gear Motors (TT o...
The ADXL335 is a small, thin, low-power 3-axis analog accelerometer manufactured by Analog Devices....
π§ What is an Ultrasonic Sensor?An ultrasonic sensor is a device that uses sound waves to detect how...
π What is the DHT11 Sensor?The DHT11 is a basic, low-cost digital temperature and humidity sensor....
π₯ FIRE BOT β Bluetooth Controlled Fire Extinguisher RobotWelcome to the FIRE BOT project! This robo...
BMP180 Sensor: Digital Barometric Pressure SensorThe BMP180 is a digital barometric pressure sensor...
π§ 1. Hardware Overview: 1.8" TFT DisplayMost 1.8" TFT modules are based on the ST7735 driver and co...
The SSD1306 is a popular controller used in OLED (Organic Light Emitting Diode) displays, most commo...
A servo motor is a type of motor designed for precise control of angular position, making it ideal f...
The Gravity Voice Recognition Module is a user-friendly module developed by DFRobot that allows micr...
The APDS-9960 is an advanced, compact sensor from Broadcom (formerly Avago Technologies) that offers...
π What is the 28BYJ-48 Stepper Motor?The 28BYJ-48 is a 5V unipolar stepper motor with a built-in re...
How Soil Moisture Sensor Works and Interface it with Esp32Β When you hear the term βsmart garden,β on...
π§ What is an Analog Joystick?An analog joystick typically has:2 potentiometers (one for X-axis, one...
π‘ What is the NEO-8M GPS Module?The NEO-8M is a high-precision GNSS GPS receiver by u-blox, capable...
π§ What is a NeoPixel?NeoPixel is Adafruitβs name for individually addressable RGB LEDs using the WS...
π§ What is a PIR Sensor?PIR = Passive Infrared SensorA PIR sensor detects motion by measuring change...
β What is AI Thinker GP-02?The AI Thinker GP-02 is a GNSS (GPS) module, designed to work with satel...
π‘ What is SIM900?The SIM900 is a GSM/GPRS module from SIMCom. It allows microcontrollers like ESP32...
π§ What is a Push Button?A push button is a simple mechanical switch that connects two points in a c...
π€ What is a Tilt Sensor?A tilt sensor (also called a ball switch or mercury switch) is a digital sw...
π¨ What is the TCS34725?The TCS34725 is a color sensor made by AMS (now part of Renesas).It detects...
π What is an I2C LCD?An I2C LCD is a Liquid Crystal Display that uses the I2C communication protoco...
π§ What is MPU6050?The MPU6050 is a 6-axis motion tracking device made by InvenSense. It combines:β ...
β° What is DS1307 RTC?The DS1307Β is a real-time clock IC by Maxim Integrated that keeps track of:Sec...
π΅ What is DFPlayer Mini?The DFPlayer Mini is a tiny, standalone MP3 audio player module. It can pla...
π‘ What is an IR Receiver?An IR (Infrared) Receiver module receives signals from an IR remote contro...
π What is a Rotary Encoder?A rotary encoder is an electro-mechanical sensor that converts the angul...
π What is the Dot Matrix Display with MAX7219?A Dot Matrix Display is an arrangement of LEDs in a g...
π What is ESP-NOW?ESP-NOW is a wireless communication protocol developed by Espressif, allowing ESP...
π€ ESP32 Joystick Controlled Robot Using ESP-NOW Protocol & L298N Motor DriverWireless bot control w...
β€οΈ Heart Rate & SpOβ Sensor (MAX30100/MAX30102)π¬ Pulse Sensor | SpOβ Monitor | Wearable Health Tech...