Introduction: Internet Monitoring of Room Temperature FromThingSpeak Using ESP8266

The project is about sending office/room temperature data to Thingspeak. The temperature data would be used to observe the performance of Air conditioning and take appropriate measures if temperature variation is far from acceptable. This project utilizes Thingspeak library function to send data from Arduino. This makes the coding easy and concise.

The components used are:

1. ESP8266-12 development board- Wemos D1 R2 mini

2. LM35 Temperature sensor

3. Jumperwires

4. USB cable

5. Breadboard

Step 1: Connect the Circuit As Shown

The circuit connection is easy. Data pin of LM35 is to be connected to analog pin of ESP8266. In case of Wemos board, it is A0 pin also known as pin 17 in ESP8266. The other two pins of LM35 are to be connected to 3.3V and GND pins of Wemos board respectively.

Step 2: Program in Arduino IDE and Upload to ESP8266

The program was written in Arduino IDE. The program uses ThingSpeak.h library to send to the data to Thingspeak.

Before writing the program, a channel was created in Thingspeak to store temperature data. The channel number and write API key are used in the program to send data to Thingspeak. Please check the attached file for the code. Inlcuded libraries are ThingSpeak.h and ESP8266WiFi.h . Program was uploaded to Wemos D1 R2 ESP8266 board using USB. The factor of 0.322 was used to convert analog reading of LM35 to convert to temp in degrees centigrade since sensor was connected to 3.3V of ESP8266. For clarification on this calculation, one can refer to

https://www.instructables.com/id/ARDUINO-TEMPERATURE-SENSOR-LM35/ and discussions.

Step 3: Monitor Room Temperature in ThingSpeak From Anywhere

Once the program was loaded, ESP8266 was on the job. Temperature data was sent to ThingSpeak. The data can also be observed on serial monitor.

Sudden spike in temperature in the attached screen is explained by positioning the sensor near laptop cooler fan blow which is hot.

IoT Builders Contest

Participated in the
IoT Builders Contest