ESP8266/ESP-12 Arduino Powered SmartThings DS18B20 Temp. Sensor

2,404

28

3

We all like to know what the current room temperature is, and sometimes what the temperature is in another room, or maybe even in your vacation house on the other side of the world. Maybe you want to monitor the temperature in your pet Lizard's house? You've come to the right place to learn how to build your very own SmartThings connected DS18B20 Temp. Sensor with an ESP8266 and Arduino. Check out this Vid and read on.

Step 1: Hardware - What You'll Need

I DO NOT endorse, represent, or receive anything at all for the examples below. Caveat Emptor.

Substitute as needed for your individual requirements/parameters. Links to products are only for examples and not promotion. I did not use a resistor for the DS18B20. Please use your own judgement.

1. ESP8266 ESP12 NodeMCU SOC

2. DS18B20 Temperature Sensor

3. NodeMCU Base

4. Samsung SmartThings 2.0 Hub

USB Micro Cable

Step 2: Software - What You'll Need

ASSUMPTIONS: Comfortable working with Arduino IDE, Libraries, SmartThings IDE and GITHub.

Arduino IDE

Samsung SmartThings IDE

SmartThings Android App

GITHub

Step 3: Hardware Setup

For this section, the steps explained are based on my setup. Adjust as needed.

  • Install NodeMCU board onto Node Base. (confirm the correct orientation by antenna locations matching on each or pin numbers matching if listed on base)
  • Install female terminator connections on DS18B20. (I snipped, stripped, soldered and wrapped jumpers to the DS1820B's lines)
  • Attach DS18B20 power to 3.3v rail on Node Base. See Pic.
  • Attach DS18B20 ground to ground rail on Node Base. See Pic.
  • Attach DS18B20 Data to pin D3 rail on Node Base. See Pic.

NOTE: You may need to disconnect Data connection when loading sketch and reconnect after load has completed.

Step 4: Software Setup

ASSUMPTIONS: Comfortable working with Arduino IDE, Libraries, SmartThings IDE and GITHub.

I know there is a lot of initial information and configuration if this is your first time setting up the ST_Anything configurations, but it is worth it. PLEASE feel free to ask any questions you may have along the way. In addition, the SmartThings Forum for this project is a GREAT place for tips and advice.

  • Modify the attached Arduino sketch, adding your WiFi/SmartThings environment specifics. The sketch calls out where to make the changes, as do the steps on the GITHub Page.
  • Refer to the attached screenshots for the (2) ST_Anything device specific changes. (For NodeMCU 0.9 version...Change Pin D7 to Pin D3) and commenting out any devices/libraries that you may not want to install at this time.
  • The attached sketch has the D7 to D3 changes and the commented out extras.

    NOTE: If you disconnected the jumper from D#, reconnect after sketch has been loaded.
  • Open your SmartThings Mobile App. If you still need to add details as per the steps here, do so now.
  • Take a look in your list of devices within your SmartThings Mobile App, you should now see a DS18B20 listed with your current temperature.

Share

    Recommendations

    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • Toys Contest

      Toys Contest
    • First Time Author

      First Time Author

    3 Discussions

    0
    None
    DJman230

    10 days ago

    Hello, Do you know if the DS18B20 requires more Amperage for the 3meter or 5meter version?

    0
    None
    bob5731

    6 months ago

    I have WeMos D1 CH340 WiFi Arduino UNO R3 Development Board ESP8266.

    I just saw in the serial monitor that it’s not connecting to the network?

    1 reply
    0
    None
    johnnyfrxbob5731

    Reply 6 months ago

    Has it ever connected successfully?