In this tutorial we will show how to build WiFi temperature sensor connected in EasyIoT Cloud. We will use ESP8266, DS18B20 and Arduino IDE.

THIS TUTORIAL IS OBSOLETE. Use: ESP8266 WiFi DS18B20 temperature sensor (EasyIoT Cloud REST API V1) and Email alarm

Contents

1. Introduction

2. Materials

3. EasyIoT Cloud configuration 

4. Program

5. Hardware

6. Buying guide

 

Introduction

Historical 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

 

-3.3V power supply (battery or regulator)

5pcs 3.3V regulator module 800mA5pcs 3.3V regulator module 800mA
$1.12
$1.56
2xAA 3V Battery Holder Box Case Wire2xAA 3V Battery Holder Box Case Wire
$0.99
$0.99

 

 

See buying guide at the end of tutorial.

EasyIoT Cloud configuration 

Register to EasyIoT Cloud service. If you do not receive registration email check spam folder. If it's not there contact us and we will activate your account. 

Then go to Configure->Modules->Add Module and select Analog Input module type.

Click on Sensor.Parameter1.

 

For parameter set Description to Temperature, Unit to °C or °F, enable Log to database and set DB Avg.Interval to 10. DB logging means that we will log values in database, and historical values can be displayed in chart. DB Avg.Interval = 10 means that average value of parameter is inserted in database every 10 minutes.  Then press Save Parameter button.

 After you save parameter you will se InstanceId/ParameterId. Remember this value, because you will need it later in program.

Go back and press button Add parameter to add new parameter. Change Name to Settings.Icon1 and set Value to temperature.png. This settings will change default module icon. You can find all icons under Configure->Module Icons.  After you set values press button Save Parameter.

If you configure everything correctly you will see your newly added module on first page under Default group (go back on first page). You can change this group later if you like.

Program

Program is written in Arduino ESP8266 IDE. See Arduino ESP8266 IDE tutorial how to connect ESP8266 module to computer. Download program from our GitHub and change one line. Set Access Point username and password (AP_SSID     , AP_PASSWORD) and instance id/parameter id - same parameter (EIOT_CLOUD_INSTANCE_PARAM_ID) you've copied before in EasyIoT Cloud configuration.

Instance id/parameter id:

 

//AP definitions - update this

#define AP_SSID     "xxxxx"

#define AP_PASSWORD "xxxxx"

// EasyIoT Cloud definitions - change EIOT_CLOUD_INSTANCE_PARAM_ID

#define EIOT_CLOUD_INSTANCE_PARAM_ID    "xxxxx"

 

In program we will send value to EasyIoT Cloud server. Correct URL to updating value is:

http://cloud.iot-playground.com:40404/RestApi/SetParameter/[instance id]/[parameter id]/[value]

 

Hardware

Connection diagram is shown below. Instead of ESP8266-01 you can use different type of ESP8266. Also you can use 3.3V  power supply instead (AMS1117-3.3) of 2 AA batteries. If you connect everything correctly you can see temperature in EasyIoT cloud. Valuers are also visible in chart, because we enabled database logging.

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   

+1 #7 Erenst 2015-10-16 11:11
It works perfectly, thanks!
How did you change the module icon to a thermometer?

Oh, it is done via the Settings.Icon1 parameter!
+1 #6 Super User 2015-10-14 21:36
Quoting Andy:
Quoting Super User:
Quoting Andy:
Having problems registering,Error /Api/Authenticate/Register, problem seems to be with Safari works okay in Chrome



Thx, for report. I've tested with old version Safari 5.1.7 for Windows, since I do not own Mac, and it works ok.
Which version of Safari do you use?

I am using Version 9.0 (11601.1.56)


Now problem with safari is fixed and you can try. Maybe you need to clear cache in web browser to load new app.
+1 #5 Super User 2015-10-14 21:32
Quoting Todd McIntyre:
How long will the circuit last on batterys?

I guess not long, beacuse WiFi consumes a lot of power. You can put ESP in sleep mode - in this case you need also HW modifications.
#4 Todd McIntyre 2015-10-11 02:20
How long will the circuit last on batterys?
#3 Andy 2015-10-07 16:47
Quoting Super User:
Quoting Andy:
Having problems registering,Error /Api/Authenticate/Register, problem seems to be with Safari works okay in Chrome



Thx, for report. I've tested with old version Safari 5.1.7 for Windows, since I do not own Mac, and it works ok.
Which version of Safari do you use?

I am using Version 9.0 (11601.1.56)
#2 Super User 2015-10-07 16:43
Quoting Andy:
Having problems registering,Error /Api/Authenticate/Register, problem seems to be with Safari works okay in Chrome



Thx, for report. I've tested with old version Safari 5.1.7 for Windows, since I do not own Mac, and it works ok.
Which version of Safari do you use?
#1 Andy 2015-10-07 13:27
Having problems registering,Error /Api/Authenticate/Register, problem seems to be with Safari works okay in Chrome

You have no rights to post comments

Forum latest

  • No posts to display.