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

hi

Nid ria Do-it-yourself


thu
Ka

Humidity And Temperature monitoring


Using Arduino With The IoT
D. Citharthan and T. Jonah Gilbert

U
sing the Internet of Things in the world. The IoT using Arduino MCU and ESP8266 Wi-Fi module.
(IoT) in homes and indus- microcontroller (MCU) is easy and Block diagram of the whole setup is
tries it is possible to control fun for those who are new to the shown in Fig. 1.
any electrical or electronic equip- field.
ment. Moreover, you can get the In this article, humidity and Circuit and working
information from any sensor and temperature information from DHT- Circuit diagram for monitoring
analyse it graphically or in any 11 sensor is analysed graphically on humidity and temperature is shown
user-defined format from anywhere ThingSpeak platform using Arduino in Fig. 2. It is built around Arduino
MCU, DHT11 sensor and ESP8266
Power Supply Wi-Fi module.
The DHT11 sensor senses hu-
midity and temperature, and sends
DHT-11 Arduino UNO ESP8266
Sensor Microcontroller Wi-Fi Module the information to digital pin 5 of
Arduino MCU, as shown in Fig. 2.
From Arduino MCU, humidity and
temperature values are uploaded
to the Cloud at regular intervals
of time through ESP8266 Wi-Fi
module. From the Cloud, humidity
and temperature values can be seen
graphically on ThingSpeak platform
(http://thingspeak.com) from any-
Fig. 1: Block diagram of analysing humidity and temperature using Arduino with ESP8266 where in the world.

Construction and testing


Board 1 ThingSpeak is an open source
TP1 data platform but you need to
TP0
POWER USB register to use it. After regis-
INPUT
tering, login to your account
IOREF
DRIVER AREF
IC3 and create a new channel with
GND
RST 13 DHT11 humidity as one field and tem-
TP2
ARDUINO

3.3V 12
1 8 5V 11
VCC DATA NC GND perature as another, as shown
UTXD GND 1 2 3 4
7
GND
GND
10
9
in Fig. 3. Once a new channel
2 CH_PD GPIO2
Vin 8 is created, it will generate two
IC2
ATMEGA328

3 GPIO0 6
RST API keys, namely, write API key
ESP8266
4
VCC URXD
5 7
6
and read API key. Replace the
DIGITAL

A0 5 line given below in the program


A1 4
ANALOG

A2 3
A3
A4
2
TX 1
Test Points
A5 RX 0
Test point Details
TP0 0V (GND)
TP1 5V
Fig. 2: Circuit diagram for analysing humidity and temperature using Arduino with ESP8266 TP2 3.3V

130 October 2016 | Electronics For You www.efymag.com


efy Note
The source code of
this project is
included in this
month’s EFY DVD and
is also available for free
download at source.
efymag.com

The program should be verified


with your Wi-Fi setup. It uses DHT
library. If DHT library is not pre-
sent in your Arduino folder, down-
load it from https://github.com/
adafruit/DHT-sensor-library. To
import DHT library in Arduino IDE,
select Sketch→Import library→Add
library→Select the library that you
Fig. 3: New channel on ThingSpeak platform have downloaded.
Compile the sketch/program
and upload it to Arduino MCU
through Arduino IDE. Ensure that
Wi-Fi modem and the Internet con-
nection in your PC/smartphone are
working properly.
Once sketch uploading is
done, it will upload humidity and
temperature values on ThingSpeak
platform and you will be able to
Fig. 4: Graphical view of humidity and temperature on ThingSpeak platform see it graphically in Private View
window, as shown in Fig. 4. If you
want to change channel or field
name, you can change it from
Channel Settings (Fig. 5). Author’s
prototype is shown in Fig. 6.

Other applications
Along with temperature and hu-
midity sensor, other sensors like
gas, voltage, current and energy
can be used based on the require-
ment. Moreover, it is also possible
to take further actions by control-
ling the actuators from the Inter-
net once the sensor values are
Fig. 5: Channel Settings going above/below predetermined
values.
with your write API key:
String apiKey = “ NTIM1RXET6YVUVWF “;
D. Citharthan (left) is assistant professor
Next, substitute Host_Name at Christ The King Engineering College,
and Password with your Wi-Fi Coimbatore, Tamil Nadu
name and Wi-Fi password in T. Jonah Gilbert
the two lines given below in (right) is pursuing
B.E. from Christ The
the program (IoT.ino): King Engineering
String Host_Name = “Jonah”; College, Coimbatore,
Tamil Nadu
Fig. 6: Author’s prototype String Password = “2569696”;         

www.efymag.com Electronics For You | October 2016 131

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