Wednesday, December 18, 2024

Humidity And Temperature Monitoring Using Arduino With The IoT

Using the Internet of Things (IoT) in homes and industries it is possible to control any electrical or electronic equipment. Moreover, you can get the information from any sensor and analyse it graphically or in any user-defined format from anywhere in the world. The IoT using Arduino microcontroller (MCU) is easy and fun for those who are new to the field. Presented here is a humidity and temperature monitoring using Arduino.

In this article, humidity and temperature information from DHT-11 sensor is analysed graphically on ThingSpeak platform using Arduino MCU and ESP8266 Wi-Fi module. Block diagram of the whole setup is shown in Fig. 1.

Fig. 1: Block diagram of humidity and temperature monitoring using Arduino with ESP8266

Circuit and working

Circuit diagram for monitoring humidity and temperature is shown in Fig. 2. It is built around Arduino MCU, DHT11 sensor and ESP8266 Wi-Fi module.

- Advertisement -
Circuit diagram humidity and temperature monitoring using Arduino with ESP8266
Fig. 2: Circuit diagram humidity and temperature monitoring using Arduino with ESP8266

The DHT11 sensor senses humidity and temperature, and sends 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 from anywhere in the world.

Fig. 3: New channel on ThingSpeak platform

Construction and testing

ThingSpeak is an open source data platform but you need to register to use it. After registering, login to your account and create a new channel with humidity as one field and temperature as another, as shown in Fig. 3. Once a new channel is created, it will generate two API keys, namely, write API key and read API key. Replace the line given below in the program with your write API key:

- Advertisement -

String apiKey = “ NTIM1RXET6YVUVWF “;

Next, substitute Host_Name and Password with your Wi-Fi name and Wi-Fi password in the two lines given below in the program (IoT.ino):

String Host_Name = “Jonah”;
String Password = “2569696”;

The program should be verified with your Wi-Fi setup. It uses DHT library. If DHT library is not present in your Arduino folder, download 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 have downloaded.

Compile the sketch/program and upload it to Arduino MCU through Arduino IDE. Ensure that Wi-Fi modem and the Internet connection in your PC/smartphone are working properly.

Fig. 4: Graphical view of humidity and temperature on ThingSpeak platform
Fig. 5: Channel Settings

Once sketch uploading is done, it will upload humidity and temperature values on ThingSpeak platform and you will be able to 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.

Author’s prototype of the humidity and temperature monitoring using Arduino with ESP8266
Fig. 6: Author’s prototype of the humidity and temperature monitoring using Arduino with ESP8266

Other applications

Along with temperature and humidity sensor, other sensors like gas, voltage, current and energy can be used based on the requirement. Moreover, it is also possible to take further actions by controlling the actuators from the Internet once the sensor values are going above/below predetermined values.

Download Source folder

If you found this IoT project useful then you may also like Top 30+ IoT Projects | IoT Project Ideas for Enthusiasts.


D. Citharthan is assistant professor at Christ The King Engineering College, Coimbatore, Tamil Nadu
T. Jonah Gilbert enjoys reading articles on machines, DIY projects and working with the IoT based projects

This article was first published on 8 February 2017 and was updated on 26 May 2019.

26 COMMENTS

  1. Hey We are using Mesh module(working as Coordinator) base temperature sensor consisting of chip – SHT31
    interface with Arduino Nano which reads the analog readings and convert it to digital and send the data Wireless to mesh module connected via USB module to laptop USB port (working as Router)
    We are trying to send the data of sensor to internet cloud but as I am beginner I need your suggestion about how can we send the data of Temperature sensor connected to mesh module will send the data on internet cloud
    Also please suggest if anything else in hardware is required

  2. Thanks for the feedback! Since Arduino Uno board is used here, the microcontroller (MCU) is ATmega328. ESP8266 Wi-Fi module is used to transmit the sensor signal to the Cloud and so RFM95 is not required in this project.

  3. sir i made it successful by using Arduino Uno , DHT22 or DHT11 and ESP8266-01 and connected to thingspeak as advice by you. Great.
    Now my next attempt to use 2 or 3 DHT22 sensors and to transmit the data with single ESP8266-01 through one Arduino Uno Board, to the cloud. Can it be Possible, hope it will, then plz guide me. I am more confident in hardware and with very tiny knowledge with coding. plz help.

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Truly Innovative Electronics

Electronics News

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics

×