• Home
  • Tutorials
  • Interfacing DS18B20 Waterproof Digital Temperature Sensor with evive

Interfacing DS18B20 Waterproof Digital Temperature Sensor with evive

About This Tutorial
In this tutorial we will interface DS18B20 waterproof digital temperature sensor with evive and we will display temperature measured by this temperature sensor on “TFT” display
Tutorial Info

Components Required

Image Component Quantity Available in Kit
evive 1
USB A-B Cable 1
Male to Female Jumper Cable 10cm 1
  • None
Temperature Sensor (DS18B20 | Waterproof) 1
  • None


In this tutorial, we will use pre-wired and waterproof version of the DS18B20 digital temperature sensor. This sensor is handy when you want to measure temperature of the place which is far away, or in wet condition. Because the sensor is digital, we don’t get signal degradation over a long distance. This 1-wire digital temperature sensor is fairly precise (i.e + or – 0.5-degree Celsius). 

Temperature Sensor DS18B20


Pin description

The DS18B20 waterproof digital temperature sensor has 3 pins (2-power supply pin 1-data pin)

  • VCC – Red
  • GND – Black
  • DATA – Yellow or White

Circuit diagram

  • Connect “GND” of DS18B20 sensor to “GND” of evive board
  • We will also use 4.7 k ohm resistor as a pull-up resistor between “VCC” and “DATA”  pin as shown below in the circuit diagram
  • Connect one end of the resistor to “VCC” and another end to “DATA” wires of the temperature sensor 
  • Connect “VCC” of the temperature sensor to “VCC” of  evive board
  • Connect “DATA” pin of the temperature sensor to pin number 2 of evive board


PictoBlox Program

In this program, we will display the temperature sensor data on TFT Display. Follow the instructions:

  1. Open PictoBlox.
  2. Select the board as evive:
    Selecting Board
  3. Connect the evive.
    Select Port
  4. Add Advance Sensors extension in PictoBlox by clicking on the add extension button on the bottom left corner.
    Load Extensions
  5. Create the following script using when evive starts up block:
    DS18B20 Sensor
  6. Upload the code onto evive:
    Upload Code

You can download the PictoBlox program from here: Display Temperature using DS18B20 Sensor

evive Notes Icon
Note: If the data coming from the sensor is -127, then check the connections.
Share this Tutorial
Share on facebook
Share on twitter
Share on pinterest
Share on reddit
Share on print
Featured Projects

Leave a Reply