DS18B20
Objective

Use Arduino and waterproof DS18B20 to test liquid temperature

Parts and devices:

Arduino UNO R3 x 1

Waterproof DS18B20 module x 1

4.7Kohm resistor x 1

Circuit Graph

DS18B20_bb

Sample code:

Step 1) Download OneWire Library from http://osoyoo.com/wp-content/uploads/2016/06/OneWire.zip, unzip the file and put the folder into Arduino iDE library sub folder.
Step 1)Download sample code from http://osoyoo.com/wp-content/uploads/2016/06/ds18b20temp.txt,load it into Arduino IDE

Result:

Open the serial window of your ARduino IDE, hold the sensor head in your hand, you will see your hand temperature in serial window as following:

IMG_20160616_175408

Put the sensor into cold water, you will see the temperature drop down.

IMG_20160616_175440          IMG_20160616_175505