Table of Contents
Introduction
Here we will use the ESP8266 WIFI module to send data over the internet to the server. ESP8266 is a small WIFI module that allows any microcontroller to connect to any WIFI network with SSID and PASSWORD and can make TCP/IP connections to connect to a server. So, for this purpose, we are using the ESP8266-01 module which is having 1MiB of flash memory and allow us to program and build a single-chip device that can connect to WIFI. But here we are using AT COMMANDS to communicate with the ESP8266 module and Arduino UNO board.
Hardware Requirements
- Arduino UNO (HERE)
- ESP8266-01 module (HERE)
- DHT11 sensor (HERE)
- 10K ohm resistor – 2nos
- Small breadboard (HERE)
- Connecting wires (HERE)
External Power Supply
- Transformer 9-0-9, 2amp – 1no
- 1N4007 bridge diode – 4nos
- 1000uF capacitor, 35v – 1no
- 7809 Voltage regulator – 1no
- 5mm RED LED – 1no
- 1K ohm resistor – 1no
Software Requirements
- Arduino IDE (You can download it from HERE).
- DHT Library.
- Software Serial Library (Inbuilt within the IDE)
Block diagram
Following the block diagram you can understand that it is very simple and easy to make the setup.
Circuit diagram
Follow the circuit diagram below the table and make the connection correctly.
Connection of ESP8266-01 with Arduino
ESP8266-01 | Arduino UNO |
PIN8 (TXD) | PIN2 (Rx) Software serial Rx pin |
PIN4 (RXD) | PIN3 (Tx) Software serial Tx pin |
PIN6 (RST) | 3.3V through a 10K ohm resistor |
PIN7 (CH_PD) | 3.3V through a 10K ohm resistor |
VCC | 3.3V |
GND | GND |
Connection of DHT11 with Arduino
DHT11 | Arduino UNO |
PIN2 (OUT) | A0 |
PIN1 (Vcc) | 5v |
PIN3 | NC |
PIN4 (GND) | GND |
Create account on ThingSpeak
- Go to thingspeak website.
- Create a new account or log in to your account and follow the steps.
- STEP 1: Click on channels on the menu bar and then click on my channels
- STEP 2: Click on New Channel you will be redirected to a new page.
- STEP 3: Fill in the name and description. Here we are using the DHT11 sensor and want to display only two sensor data temperature and humidity. Click on the check box and write the sensor data name and scroll down to the bottom of the page for step 4 and click on save the channel.
- STEP 4: Click the save button to save the channel.
- STEP 5: Go to my channel and click on the recently reacted channel.
- STEP 6: Click on the API keys tab to get the API key. We will use this key in our program to send the data to the server.
- STEP FINAL: Again click on private view to see the data on the graph.
Video Tutorial
Download Source Code
Download the complete source code: click here