In this tutorial we will show how to build DS18B20 and ESP8266 temperature sensor without Arduino. We will use Arduino IDE and report temperature over WiFi on EasyIoT server.

Sensor temperature is visible in EasyIoT server Web interface. If data logging is enabled you can see temperature chart.

Sensor temperature chart

Materials

ESP8266 WiFi module

ESP8266 ESP-01 Serial WIFI Wireless Transceiver ModuleESP8266 ESP-01 Serial WIFI Wireless Transceiver Module
$2.11
$17.00
ESP8266 ESP-03 Serial WIFI Wireless Transceiver ModuleESP8266 ESP-03 Serial WIFI Wireless Transceiver Module
$2.07
$2.15
ESP8266 ESP-12 Serial WIFI Wireless Transceiver ModuleESP8266 ESP-12 Serial WIFI Wireless Transceiver Module
$2.06
$1.75
ESP8266 ESP-05 Serial WIFI Wireless Transceiver ModuleESP8266 ESP-05 Serial WIFI Wireless Transceiver Module
$1.88
ESP8266 ESP-07 Serial WIFI Wireless Transceiver ModuleESP8266 ESP-07 Serial WIFI Wireless Transceiver Module
$2.18
$1.88
ESP8266 Lua Nodemcu WIFI Network Development BoardESP8266 Lua Nodemcu WIFI Network Development Board
$7.43
$2.65

 

DS18B20 temperature sensor

DS18B20 DALLAS Temperature SensorDS18B20 DALLAS Temperature Sensor
$0.99
$0.79
DS18B20 DALLAS Waterproof  Temperature Sensor DS18B20 DALLAS Waterproof Temperature Sensor
$1.4
$1.80
DS18B20 Temperature Sensor moduleDS18B20 Temperature Sensor module
$1.89
 

 

4.7K resistor

400X 0.25w 1/4w Metal Film Resistor Pack Kit 1% 20 Value Each 20 Pcs 10 ~ 1M ohm400X 0.25w 1/4w Metal Film Resistor Pack Kit 1% 20 Value Each 20 Pcs 10 ~ 1M ohm
$1.88
$5.50

 

See buying guide at the end of tutorial.

EasyIoT server configuration

In EasyIoT server add new node in Virtual driver. Node type is Temperature (AI). Tutorial how to add node to EasyIoT server can be found here. Remember Virtual node address, because you will need it later.

Program

Program is available at GitHub. It is based on program contributed by community member @Dennis. To load program you will need ESP8266 Arduno IDE. Read Arduino ESP8266 IDE tutorial how to program ESP8266 in Arduino IDE.

In program you will need to change some settings. First set your AP username and password:

#define AP_SSID "your ssid"

#define AP_PASSWORD "your AP password"

Next change settings related to EasyIoT server like username, password, IP address, port and node address. Change following lines:

#define EIOT_USERNAME    "admin"

#define EIOT_PASSWORD    "test"

#define EIOT_IP_ADDRESS  "192.168.1.5"

#define EIOT_PORT        80

#define EIOT_NODE        "N13S0"

Connection

Connection diagram is very simple. Add DS18B20 to ESP8266 GPIO2 and one pull up resistor.

ESP8266 DS18B20 connection

 

ESP8266 DS18B20 temperature sensor prototype

 

Check also EasyIoT Clud ESP8266 DS18B20 temperature sensor.

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

Buying guide

To support this site and EasyIoT framework development please buy in our store.

DS18B20 DALLAS Temperature Sensor

The DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature measurements.

5PCS DS18B20 DALLAS Temperature Sensor

The DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature measurements.

DS18B20 DALLAS Waterproof Temperature Sensor

The DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature measurements

DS18B20 Temperature Sensor module

The DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature measurements.

400X 0.25w 1/4w Metal Film Resistor Pack Kit 1% 20 Value Each 20 Pcs 10 ~ 1M ohm

5pcs 3.3V regulator module 800mA

Basic regulator module based on AMS1117.

2xAA 3V Battery Holder Box Case Wire

This 2xAA battery holder puts a nice finishing touch on your battery powered project.

10Pcs 2xAA Plastic Battery Storage Case Box Holder

This 2xAA battery holder puts a nice finishing touch on your battery powered project.

ESP8266 ESP-01 Serial WIFI Wireless Transceiver Module

ESP8266 Serial WIFI Wireless Transceiver Module

ESP8266 ESP-03 Serial WIFI Wireless Transceiver Module

ESP8266 serial WIFI model ESP-03

ESP8266 ESP-12 Serial WIFI Wireless Transceiver Module

ESP8266 serial Port WIFI wireless module ESP-12

ESP8266 ESP-05 Serial WIFI Wireless Transceiver Module

ESP8266 ESP-05 Serial WIFI Wireless Transceiver Module

ESP8266 Lua Nodemcu WIFI Network Development Board

ESP8266 Lua Nodemcu WIFI Network Development Board

 


Comments   

#24 François GAGNEBIEN 2017-03-25 16:05
Dans Base64.cpp

Remplacer


avr/pgmspace.h par pgmspace.h>
#23 François GAGNEBIEN 2017-03-25 16:03
#include "" par #include ""
#22 François GAGNEBIEN 2017-03-25 16:01
"#include par #include "
#21 François GAGNEBIEN 2017-03-25 15:50
Suite....

Dans Base64.cpp

Remplacer
#include "Base64.h" par #include "Base641.h"

#include par #include

Dans DS18B20_temperature_sensor.ino

Base64_encode(unameenc, uname, strlen(uname));
par
base64_encode(unameenc, uname, strlen(uname));

Pour moi je compile après cela.
Quelqu'un peut il m'expliquer comment faire disparaître la bibliothèque Base64 (ou la remplacer par la bonne) que je ne trouve pas et qui crée le problème? Merci

(IDE Arduino 1.8.2 windows store1.8.2.0_x64)
#20 François GAGNEBIEN 2017-03-25 15:49
Dans Base64.cpp


#include par #include
#19 Matt 2017-01-19 08:17
I'm using a BMP280(Temp,Hum,Pres). Using this example I was able to set it up to log both temp and humidity. When I add a node for pressure I set the node to Pressure(AI) and node is N24S0.
/Api/EasyIoT/Control/Module/Virtual/N24S0/ControlL evel/SOMEVALUE returns "404 Not Found"
If I set the node to Temperature(AI) or Humidity(AI) the same url works.
+1 #18 Adam 2016-04-10 19:16
Unfortunately I have an error:

ESP8266-DS18B20:56: error: 'base64_encode' was not declared in this scope

base64_encode(unameenc, uname, strlen(uname));
+1 #17 poulayn 2016-03-06 20:37
eps8266WIFI LIBRAIRY DOWLOAD OR ???
#16 Super User 2016-02-16 08:48
Quoting 이건희:
I got an error with avr/pgmspace
in Base64.cpp, #include
exists but I can't find avr/pgmspace.h

how can i solve this problem

help me


Please search forum for solution.
#15 이건희 2016-02-16 08:04
I got an error with avr/pgmspace
in Base64.cpp, #include
exists but I can't find avr/pgmspace.h

how can i solve this problem

help me

You have no rights to post comments

Forum latest

  • No posts to display.