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
  • ESP8266-01 module
  • DHT11 sensor
  • 10K ohm resistor – 2nos
  • Small breadboard
  • Connecting wires

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 (Download it from HERE).
  • 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.esp8266 thingspeak data

Circuit diagram: Follow the circuit diagram below the table and make the connection correctly.

esp thingspeak data circuit diagram

Connection of ESP8266-01 with Arduino:

ESP8266-01Arduino 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
Vcc3.3V
GNDGND

 

Connection of DHT11 with Arduino:

DHT11Arduino UNO
PIN2 (OUT)A0
PIN1 (Vcc)5v
PIN3NC
PIN4 (GND)GND

ThingSpeak Details:

  • 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. To read more click here.thingspeak setup
  • 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 channel.thingspeak setup
  • STEP 4: Click the save button to save the channel.thingspeak setup step4
  • STEP 5: Go to my channel and click on the recently reacted channel.thingspeak setup 5
  • 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.thingspeak setup6
  • STEP FINAL: Again click on private view to see the data on graph.thingspeak setup final display

Full Project source code: Download


 YouTube video tutorial: