Introduction: ESP8266 WiFi DS18B20 Temperature Sensor (ESP8266 Arduino IDE Without Arduino)

In this tutorial we will show how to build ESP8266 WiFi temperature sensor with DB18B20. We will use Arduino IDE, but without Arduino. Data will be sent to EasyIoT server (Windows or Raspberry Pi) for nice display and logging.

See more tutorials at http://iot-playground.com/build

Step 1: Materials

  • ESP8266 module
  • DS18B20 temperature sensor
  • 4.7K resistor
  • 3.3 V power supply (or 2 AA batteries)

Step 2: Add Node to EasyIoT Server

Add node to EasyIoT server. Download EasyIoT server and install it on Windows machine or Raspberry Pi. Tutorial how to add node to EasyIoT server can be found here.

Step 3: Connection

Electrical connection is very simple. Just connect wires like on connection diagram on picture. You can use 2 AA batteries or 3.3V power supply.

Step 4: Program

We will use modified Arduino IDE. It can compile and program ESP8266 like Arduino. Tutorial how to use ESP8266 Arduino IDE is here. Program can be downloaded on GitHub. Before downloading program fix access point username and password:

#define AP_SSID "your ssid"
#define AP_PASSWORD "your AP password"

and EasyIoT server username, password and node address:

#define EIOT_USERNAME "admin"
#define EIOT_PASSWORD "test"

#define EIOT_IP_ADDRESS "192.168.1.5"

#define EIOT_PORT 80

#define EIOT_NODE "N13S0"

If everything is correct you should see temperature in EasyIoT server web interface. If you want to see temperature chart enable data logging for node parameter Sensor.Temperature.

Full tutorial ESP8266 WiFi DS18B20 temperature sensor Arduino IDE.

Comments

author
anaisota (author)2016-11-17

I've built similar units and programmed them to only wake up from deep sleep to do an occasional measurement and HTTP request. But the problem is that while battery life is weeks or months, the DS18B20 is sensitive to input voltage. When voltage goes down by time, measurements go up.

author
josephchrzempiec (author)2015-11-29

Hello i have a question. On batteries say like a 2 doubble AA battery pack how long would it last? I assume not very long right?

author
godfish (author)2015-09-20

Hello, I'm trying to follow this but, I just can't follow your endless links? Can't see how to hook up the ESP8266 and can't find your librarys, the instructions for "modified" Arduino IDE don't work and just link after link after link link, all saying go her for the answer and see this for that? sorry I just can't do it.