Skip to content

PRO TIP Block youtube.com at the DNS level β€” Pi-hole, NextDNS or your hosts file β€” but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

DS18B20 Temperature Sensor with Arduino | Complete Tutorial + Code + Library Guide

278 views on YouTube

Learn how to interface the DS18B20 Digital Temperature Sensor with Arduino in this complete beginner-friendly tutorial. In this video, you’ll learn everything you need to know about the DS18B20, including its working principle, pinout, wiring, OneWire communication, DallasTemperature library, and Arduino programming.

Unlike analog temperature sensors such as the LM35 or TMP36, the DS18B20 sends temperature data digitally over a single data wire, making it more accurate and less susceptible to electrical noise. It also allows multiple sensors to share the same data line, making it an excellent choice for temperature monitoring projects.

πŸ“Œ In this video you’ll learn:

βœ… DS18B20 overview and specifications
βœ… TO-92 and Waterproof DS18B20 versions
βœ… Pinout and wiring with Arduino
βœ… Pull-up resistor explanation
βœ… Standard mode vs Parasite Power mode
βœ… OneWire communication protocol
βœ… Installing the OneWire Library
βœ… Installing the DallasTemperature Library
βœ… Creating OneWire and DallasTemperature objects
βœ… Reading temperature in Celsius and Fahrenheit
βœ… Important DallasTemperature library functions explained
βœ… Adjusting sensor resolution (9–12 bits)
βœ… Reading multiple DS18B20 sensors
βœ… Complete Arduino example with code

πŸ›  Components Required

* Arduino Uno (or any compatible Arduino board)
* DS18B20 Temperature Sensor
* 4.7kΞ© Resistor
* Breadboard
* Jumper Wires
* USB Cable

πŸ’» Arduino Code

https://docs.google.com/document/d/1hw_DsBk3zA4TiIOWqDRCRzIjS7trksBgiUmDbv9-QdQ/edit?usp=sharing

πŸ“š Libraries Used

* OneWire
* DallasTemperature by Miles Burton

Install both libraries from the Arduino IDE Library Manager before uploading the code.

If you enjoyed this video, Please Like πŸ‘, Share πŸ“€and Subscribe πŸ”” to Electro Nerds Academy for more Arduino, ESP32, Electronics, and Embedded Systems tutorials.

#arduino #DS18B20 #temperaturesensor #arduinotutorials #OneWire #DallasTemperature #ElectroNerdsAcademy #embeddedsystems #arduinoprojects #electronics #sensors #DigitalTemperatureSensor #diyelectronics #arduinoprogramming #microcontrollerprogramming #iot