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.
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.
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.
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:
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.
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.
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
How can I get a alert message in the form of SMS from thingspeak when temperature goes beyond some threshold
For that you have to use GSM module along with Arduino.
Here’s the reply from the author Citharthan D.-
It is only possible to receive a tweet. For tutorial and examples, please click the link below.
https://thingspeak.com/pages/how_to#act
If you need to get sms/ email then, you can try UBIDOTS. you can get step by step information in their website.
https://ubidots.com/
Where can I find the sketch loT.ino for the mentioned above
How to implement energy saving element in arduino ? Is it implement in arduino or battery itself ?
Thanks.
You are welcome.
could u pls send me arduino software program of dis project
Hi
Can you tell me where to find IoT.ino please
You can find IoT.ino from the Source folder given here at the end of this article. You can also down the same from the link given here: http://www.efymag.com/admin/issuepdf/Humidity%20and%20Temperature%20Monitoring%20Using%20Arduino%20with%20The%20IoT.zip
Can i have the code for this project.I am working on this project ,it would help me very much….
Dear Sumanth, the source code is present at the end of the article.
how to do this with DHT22?
i want to use this project for controlling the temperature and humidity.(as you have mentioned in its applications) how can i do that?
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
Hi….thanks for this article. Which is the MCU used here? Also would an RFM95 be required to transmit the readings from the sensor?
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.
I Did not get data in thingspik.my connections are correct and data is shown in serialmonitor.please help me.
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.
hey, why i’m getting error duplicationg this? need help
Dear
Can you share me the code that you get from thingspeak
How can I get a alert message in the form of SMS from thingspeak when temperature goes beyond some threshold using gsm module with aurduino
I do not get data on Thingspeak. The connections are correct. What can possibly be the problem?
Why do you require Arduino for DTH11 ? Why not directly interface DTH11 with the ESP8266 ?
I tried interfacing arduino with DHT 11 sensor. It is showing temperature but not humidity.
Can u tell the same way we will connect multiple temp sensor???