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