If what you're looking for is missing, call us — we'll help you find it

Electronics Projects

Digital Thermometer with DS18B20

Read a DS18B20 one-wire probe and show the temperature on an LCD.

Digital Thermometer with DS18B20 — main component

Overview

The DS18B20 reports temperature as digital values over a single wire, so readings stay accurate even on long leads. A 4.7 kΩ pull-up is the only extra part.

Build Steps

  1. Wire the one-wire bus

    Data to a digital pin with a 4.7 kΩ pull-up to 5 V; power from 5 V and ground. The TO-92 pins are GND, data, VCC from left to right flat side facing you.

  2. Read the sensor

    Use a one-wire library to start a conversion and read the 12-bit result; divide by 16 for degrees Celsius.

  3. Show it on the LCD

    Send the value over I2C to the 1602; run an I2C scanner first to confirm the backpack address.

  4. Check accuracy

    Compare against ice water (0 °C) and warm tap water, and average a few readings to steady the last digit.

Related Projects