loading

Hello, everyone ! Today I'm going to show you how to make LCD or Serial* thermometer with DS18B20 digitaltemperature sensor using Arduino, breadboard, jumpers. So you can measure temperature of the air, liquids like water and the temperature of the ground.

*prints the temperature data on the serial monitor of the arduino IDE.

Step 1: ​Information About the Sensor

DS18B20 is 1-Wire digital temperature sensor from Maxim IC. Reports degrees in Celsius with 9 to 12-bit precision, from -55 to 125 (+/-0.5). Each sensor has a unique 64-Bit Serial number etched into it - allows for a huge number of sensors to be used on one data bus.

Features:

  • Unique 1-Wire® interface requires only one port pin for communication
  • Each device has a unique 64-bit serial code stored in an onboard ROM
  • Multidrop capability simplifies distributed temperature sensing applications
  • Requires no external components
  • Can be powered from data line.
  • Power supply range is 3.0V to 5.5V
  • Measures temperatures from –55°C to +125°C (–67°F to +257°F)±0.5°C accuracy from –10°C to +85°C
  • Thermometer resolution is user-selectable from 9 to 12 bits
  • Converts temperature to 12-bit digital word in 750ms (max.)
  • User-definable nonvolatile (NV) alarm settings
  • Alarm search command identifies and addresses devices whose temperature is outside of programmed limits (temperature alarm condition)
  • Applications include thermostatic controls, industrial systems, consumer products, thermometers, or any thermally sensitive system

Step 2: Gathering the Parts

To make the thermometer you will need the following things:

  1. Arduino board (UNO,DUE,Micro, etc..).
  2. DS18B20 sensor a waterproof or not and one 4.7k resistor*
  3. 16x2 LCD display with I2C bus.
  4. Breadboard and some jumpers to connect everything together.

*Some stores sell the sensor with 4.7k resistor

Step 3: Libraries !!!

Before you start to make the thermometer, download and unzip the following libraries for arduino at - /Progam Files(x86)/Arduino/Libraries (default)

  1. 1- Wire bus
  2. Dallas Temperature, it does all the calculations and other stuff
  3. Liquid Crystal I2C

Step 4: Serial Thermometer

To print the data on the Serial monitor connect the DS18B20 sensor to the Arduino using the jumpers and the breadboard and don't forget to connect or solder the 4.7k resistor between pin 2 an 3 of the sensor.

Then download, open and upload the .ino file which is named - DS18B20_Serial.

If everything is ok you should see the temperature being measured and showed in the Serial monitor of the arduino IDE like on the screenshot above.




Step 5: LCD Thermometer

If you don't want to measure the temperature through the serial monitor then this step is for you !

Connect the I2C LCD to pins UNO,- A4 (SDA) , A5 (SCL) andthe sensor to digital pin 2. Then download and upload the .ino file which is named - DS18B20_I2C_LCD . If everything is OK you will see the temperature readings on the display.

Also visit my previous instructable Arduino Thermometer With LM35 - here

<p>This was a very useful tutorial. I used it primarily to get started, and then a few other resources to get a prototype going with three temperature sensors, on two busses that updates dweet.io to create an on-line dashboard. It's not pretty, but it's working.</p>
<p>It's awesome what you have done. I made one device using ESP-8266 HUZZAH and 6 DS18B20 sensors to monitor my greenhouse and I was sending the whole data from them to Adafruit IO. </p>
<p>Interesting on your greenhouse project. I have a couple of those ESP-8266 boards too. One day want to get them going as a remote temperature sensor too. Would be much easier for outside temperature measurement to have it wireless. Could then put it on the north side of my house. The Adafruit IO looks interesting, I'm only marginally happy with the dweet.io/freeboard.io combo, but it's been doing the job now for a year. I like the long term temperature graph that you are able to display. Perhaps it's time to update my setup.<br><br>Thanks again for posting this version, it was very helpful getting mine going.</p>
<p>hi.thanks very lot for this project.<br>I have a question:<br>how can i save the log for a month which data save per hour a day.<br>i mean save the log hour to hour for 1 month.and so i can draw the graph of these logs.<br>please help me.thanks a lot master.</p>
<p>thanks!! we will use this for our thesis project :)</p>
<p>Works like a charm.</p><p>Thanks:-)</p><p>Thnal</p>
<p>Thanks for the tutorial! Was really useful ;)</p><p>I complemented this with another tutorial http://undercontrol.io/ds18b20-temperature-sensor/ and finally got connected my DS18b20 with an ESP8266.</p>
<p>You're welcome ! But I think it need some retouching.</p>
<p>Maybe the tutorial is not so complete, but I found that the SDK and platform provided work like a charm!</p>
Hi<br>Thanks for this example. <br>I have successfully got as far as the serial thermometer but when i try to compile the i2c lcd sketch it says<br>'class LiquidCrystal_I2C' has no member name 'init' <br>I am completely new to Arduino and would really appreciate your help. <br>Thank you
great build I got a question about the sensor, is it possible to replace it with sensor capable of reading 1200&deg;f and higher as I would like to read the temp of my aluminum forge thanks.
<p>Hello, since you want to measure 1200&deg; F (649&deg; C) and above you gonna need a thermocouple type K 'cause DS18B20 will burn. The thermocouples are something different, they can withstand temps above 1000&deg;F, they are analog. </p><p>I will be happy to help with it.</p>
<p>i get </p><p>Arduino: 1.6.6 (Windows 8), Board: &quot;Arduino Nano, ATmega328&quot;</p><p>C:\Users\aviles\Desktop\DS18B20_I2C_LCD\DS18B20_I2C_LCD.ino: In function 'void setup()':</p><p>DS18B20_I2C_LCD:17: error: 'class LiquidCrystal_I2C' has no member named 'init'</p><p> lcd.init();</p><p> ^</p><p>exit status 1</p><p>'class LiquidCrystal_I2C' has no member named 'init'</p><p> This report would have more information with</p><p> &quot;Show verbose output during compilation&quot;</p><p> enabled in File &gt; Preferences.</p>
<p>temperature trough is a typographical error. The author was trying to say &quot;measure temperature through the serial...&quot;</p>
I need a ds18b20 for a project of mine, but I need it to spit out a 1 decimal reading instead of 2... is that possible?
<p>Yes, of course ! Its possible. </p>
<p>Please tell me what a temperature trough is?</p>

About This Instructable

27,016views

162favorites

Bio: I am a dreamer, maker and an engineer making and sharing interesting projects here at Instructables. Follow me @ instagram: @the_gadget.boy
More by Konstantin Dimitrov:Arduino/Genuino 101 BLE Thermometer With TMP102 and Blynk Pixie: An Arduino Based NeoPixel Wristwatch Turn Your Old 2.5'' Or 3.5'' Hard Drive Into Portable/External 
Add instructable to: