Monitoring data from sensors using ESP 8266 and arduino

ANGELIN JOHN
3 min readJan 19, 2017

--

Internet of Things(IOT) is one of the major buzzwords in the current technological world.Devices which have the ability to act intelligently and can respond to the requests we make are becoming increasingly prominent.This involves a wide array of sensors which monitor various parameters and provide real-time data analytics.

Consider a smart oven. Assume the consumer wants to know the temperature inside the oven at periodic intervals of time.This can be considered as a very small application of IoT in daily life.

In this article i will show how to implement this using the arduino microcontroller , ESP 8266 wifi module and the thingspeak IoT platform for visualising the data.I truly believe this can be a kickstarter for those who wish to try out things in the IoT space.

Things required :

  1. ARDUINO UNO

2. ESP 8266 WIFI MODULE

3. TEMPERATURE SENSOR-LM 35(for this project,can be replaced with any sensor according to your need)

4. Breadboard and wires

The ESP 8266 is available in the market very cheaply.Make sure you have proper internet connectivity(either wifi or a mobile hotspot) before you start.

Come on, lets dirty our hands…

The pin diagram of LM 35 and ESP 8266 is shown below:

Temperature sensor
ESP 8266 pin diagram

1.Connect the sensor and the wifi module to the arduino as shown in the wiring diagram below :

WIRING DIAGRAM

2.Open the IoT analytics platform thingspeak.Sign up an create an account.

3.Go to channels->Create a channel

4.Go to My channels and select the particular channel.

5.We can see the plot of temperature for various times in the private view tab.Now go to the API KEY tab.There will be a unique key for a particular channel.Copy the write API key of your channel into the arduino code shown below.For e.g. The API key for the channel i have created in the screenshot below is F51VSF3MUOE6UYHM.

6. Open the arduino IDE and build the code attached.Make sure to follow the comments and change the SSID and password to that of your internet connection.Also paste your API key in the code.The meaning of each line in the code is given in comments.

7.On executing make sure the baud rate of the serial monitor is set to 11520 and you will get the plot on thingspeak like this:

Hope this was useful….requesting your feedback and suggestions for improvement.

--

--

ANGELIN JOHN

Passionate coder...Living to inspire and motivate everyone to lead a meaningful life...