Вы находитесь на странице: 1из 10

Food

Living

Outside

Play

Technology

Workshop

ESP8266 WiFi temperature and humidity sensor


by EasyIoT on December 18, 2014

Table of Contents
ESP8266 WiFi temperature and humidity sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Intro: ESP8266 WiFi temperature and humidity sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 1: Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 2: Build sensor node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 3: Build EasyIoT server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 4: Add Sensor node to EasyIoT server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 5: Display data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

http://www.instructables.com/id/ESP8266-WiFi-temperature-and-humidity-logger/

Intro: ESP8266 WiFi temperature and humidity sensor


In this tutorial we will build ESP8266 WiFi Arduino temperature and humidity data logger. Data will be stored on EasyIoT server and displayed in web browser on remote
computer or on mobile phone. With ESP8266 EasyIoT Arduino library you can build sensor with couple lines of code. You can add up to 65535 sensor nodes to one
EasyIoT server.
EasyIoT server supports secure SSL connection - ESP8266 does not.

Step 1: Materials
ESP8266 WiFi module
Arduino pro mini 8Mhz 3.3V
DHT22 temperature and humidity sensor
5V power supply
AMS1117 3.3 regulator
Capacitor 1000uF
EasyIoT server (Windows machine or Raspberry Pi)
WiFi network (WiFi router)

http://www.instructables.com/id/ESP8266-WiFi-temperature-and-humidity-logger/

Step 2: Build sensor node


Conenct Arduino pro mini, ESP8266, power supply and DHT22 temperature humidity sensor.
VCC 3.3 V to Arduino pro mini
VCC 3.3V to DHT22 sensor VCC
VCC 3.3V to ESP8266 VCC module
VCC 3.3V to CH_PHD pin on ESP8266 module
connect GND on Arduino, DHT22, ESP8266 and power supply GND
connect pin 3 on Arduino to pin RST pin on ESP8266
connect pin 10 on Arduino to pin UTXD pin on ESP8266
connect pin 11 on Arduino to pin URXD pin on ESP8266
connect pin 2 on Arduino to pin DATA pin on DHT22
After you connect wires upload program to Arduino sensor node. Before we start using ESP8266 WiFi module we need to update ESP8266 firmware. We use V0.9.2.2
version of firmware. Detail instructions how to update firmware can be found here.
ESP8266 temperature humidity program is on GitHub. Don't forget to set correct access point username and password and EasyIoT serverIP address in
Esp8266EasyIoTConfig.h

http://www.instructables.com/id/ESP8266-WiFi-temperature-and-humidity-logger/

http://www.instructables.com/id/ESP8266-WiFi-temperature-and-humidity-logger/

Step 3: Build EasyIoT server


EasyIoT server will be responsible for logging sensor data. You can add up to 65535 ESP8266 WiFi sensor nodes to one EasyIoT server.
If you are using Windows machine: just download latest release of EasyIoT server win release and unzip it to Windows machine. Run EasyIoT.exe under administrator
privileges.
Or if you are using Raspberry Pi: download latest version of EasyIoT server disc image to SD card. Windows users can write EasyIoT server image to SD card with
Win32 Disk Imager.
Put SD card in Raspberry Pi and switch on Raspberry Pi. Raspberry Pi must be on same network as ESP8266 module.

Step 4: Add Sensor node to EasyIoT server


In web browser on computer enter Raspberry Pi IP address. Use username admin and password test when asked.
Go to Configure->Drivers->ESP8266 EasyIoT driver and enable driver. Press button Add Node and switch on your ESP8266 Arduino sensor. After couple of seconds you
should see two added sensor modules (no timeout message). Then go back and add new modules to Group and modules and enable data logging (see attached
pictures).

http://www.instructables.com/id/ESP8266-WiFi-temperature-and-humidity-logger/

http://www.instructables.com/id/ESP8266-WiFi-temperature-and-humidity-logger/

http://www.instructables.com/id/ESP8266-WiFi-temperature-and-humidity-logger/

Step 5: Display data


Go in Web browser in computer and enter IP address of your Raspberry Pi. On front page you should see current temperature and humidity and chart of temperature and
humidity.
Display data in web browser on remote computer or on mobile phone.

Related Instructables

ESP8266 WiFi
relay switch by
EasyIoT

ESP8266 WiFI
water leak
sensor by
EasyIoT

An inexpensive World Wide


IoT enabler
Web Control for
using ESP8266
under $30.00 by
by
jimeer01
gopinath.marappan

Arduino Wifi
Temperature
Logger by yanc

http://www.instructables.com/id/ESP8266-WiFi-temperature-and-humidity-logger/

ESP8266 Wifi
Temperature
Logger by
noelportugal

Advertisements

Comments
7 comments

Add Comment

kapilrathi22 says:

Feb 21, 2015. 10:37 AM REPLY


I am using ESP8266 with CP2102. For ESP8266 supply I am using LD33v connected to VCC and CH_PD. as soon as serial monitor is open it shows
continuous garbage value which is never ending. How to solve this issue?

Volthaus Electronics Laboratory says:

Dec 25, 2014. 9:08 PM REPLY


Thanks for putting this Ible together. I just bought a ESP8266 and I'm looking forward to what I can do with it, including possibly setting up an interface on my
website. Looks like iot-playground.com will be a good resource for info on my project as well. Thanks!

EasyIoT says:

Jan 3, 2015. 4:15 AM REPLY

Thx, I will create more interiesting stuff.

Akin Yildiz says:

Dec 20, 2014. 8:38 PM REPLY

this looks fun. i have done something similar. i really like the webpage interface. is that from the easyiot software?

EasyIoT says:

Dec 22, 2014. 12:07 AM REPLY


Yes, this is EasyIoT interface. It works good on desktop and mobile devices and supports secure SSL connection (ESP8266 does not suport SSL).
I noticed that you have many projects supporting "electronic" gardening. I'm also using EasyIoT to monitor and control my balcony garden. Maybe I will
write instructable about this.
Did you try NRF24L01 transceiver? It's really low power - it consumes less than 1/10 power of ESP8266 and it's really suitable for battery sensors.
EasyIoT also supports NRF24L01.

Akin Yildiz says:

Dec 22, 2014. 10:23 AM REPLY


have you seen the plant doctor family ? the reason i chose ESP is that so I don't have to have a base, like raspi to capture data. NRF24L01 is
bluetooth right? forgive my simple questions, i'm a true beginner. I am trying to put my system into plant pots and make it run on battery. it needs to
be usb-rechargable as well. size/mobility is an issue. for model making my current setup is the smallest in size... i need a lot of help making my
system more advanced/stable - especially better battery time. wouldn't you say using a wifi system be more universal/mobile. I can take my plant to
anywhere with wifi and it will start uploading data.?!

http://www.instructables.com/id/ESP8266-WiFi-temperature-and-humidity-logger/

EasyIoT says:

Dec 22, 2014. 1:46 PM REPLY


Nice. NRF24L01 is not bluetooth. If you are using ESP on battery, then put it in sleep mode or it will consume too much battery. See my webpage
for Arduino low power tips. Some of my sensors will work 10 years on 2 AA alkaline batteries. You can join forum and ask questions.

http://www.instructables.com/id/ESP8266-WiFi-temperature-and-humidity-logger/

Вам также может понравиться