Monitoring Sensor’s Data Over Internet

Once upon a time, we used to see the data of our sensor on a 16×2 LCD. So whenever we need to monitor the readings, we need to see on that LCD and need to stay near to it. But now world has changed and so we need to. Now lets see how we can monitor sensor’s reading on any internet enabled devices.

OK!!!!!!!!!!! it was too filmy.

So now in this article, ,we will be learning how we can upload our sensor’s data to internet and observe it in graphical manner with the help of a great platform for our IoT projects called Thingspeak.com.

PROCESS

Process of this project goes something like this.

5

So, first of all the data from DHT11 sensor will be given to Arduino Board. This board will process the data and will giving the signal to ESP8266 for uploading it to Thingspeak.com. This website, after receiving the data will automatically plot the graph of Data vs Time.

DHT11 SENSOR

DHT11 is a sensor for measurement of temperature and humidity. Looking inside, it consists of two parts,
i) A microcontroller

microcontroller
ii) Sensor
sens
This sensor acts like a capacitor whose capacitance changes along with Temperature and Humidity. This raw data is given to the inbuilt microcontroller who will process this analog data and will convert it into a 40 bit digital Serial packet of data. And that 40 bit consists of,
40bits

Hence decoding of this serial stream of data in done in Arduino. For that, we are using one library by Adafruit, which you can download it form here.

After that, you need to interface ESP8266 with arduino in order to transfer data to Thingspeak.com

THINGSPEAK

thingspeak

Thingspeak.com is a perfect companion of you IoT projects.It provides you a platform, which you can use for different applications. As I have used it to create APIs for my project “Fetching Data from Any Website” In this project, we are creating channels in this for plotting graphs.
For that first make an account in this website, then go to channel and then into my channel. In one single channel you can plot upto 8 graphs or we can say 8 fields. You need to give name of each field. As we are plotting graph of Temperature and Humidity, I have named the fields accordingly.
fields
After that, you need to copy the API keys from the API key button on the website. We will copy Write API key as we need to write data on to the graph.
api

CODE

In the code, we are first reading data from the sensor, than connecting ESP8266 to the router whose host name and password we have already entered in the code. Than we will establish a TCP connection at port 80 as to communicate with Thigspeak.com. After that we will be updating the values from sensor to thingspeak.com. We will be providing 15 s delay hence we will be able to observer new value on the graph every 15 s.
algo0
You can download the code from here.
After that, you are ready to monitor data from your phone, laptop and any other internet enabled device just log in to your thingspeak.com account. The graph will be something like this.
graph
I have made tutorial videos for this project in both Hindi and English Languages. So if you still didn’t get what to do, just have a look to the videos.
HINDI

 

ENGLISH

#techiesms
explore | learn | share

Leave a Reply

Your email address will not be published. Required fields are marked *