Sends Sensor Real Time Data to Arduino using ESP8266

Published Jul 21, 2022
 5 hours to build
 Beginner

Using DHT11 Humidity and Temperature sensor we can collect the data of humidity and temperature. These data sends to Google Firebase cloud using ESP8266. Then we created one app using MIT App Inventor. Through this app we can see real time value of humidity and temperature each and every minute.

display image

Components Used

NodeMCU
NodeMCUNodeMCU
1
DHT11
DHT11 is a single wire digital humidity and temperature sensor, which gives relative humidity in percentage and temperature in degree Celsius.
1
Breadboard
Breadboard
1
Connecting Wire Jumper Wires
Connecting Wire Breadboard wires
1
Micro USB Cable
USB Cables / IEEE 1394 Cables 3FT STRONG MCROUSB-B/USBACBL
1
Google Firebase
Google firebase is a cloud platform. We can connect these cloud to our project and see real time data anywhere in the world.
1
MIT app inventer
MIT App Inventor is a web application interfaced
1
Description

This is an IoT based " Send Sensor Data to Arduino using ESP8266" using firebase cloud, MIT app inventor and ESP8266. We can collect humidity and temperature data anywhere in the world. The advancement of IoT removes limitations of remote controlling and other limitations.

Nodemcu is an open-source Lua based firmware and development board specially targeted for IoT based Applications. This nodemcu programmed with Arduino IDE. Nodemcu connected with DHT 11 sensor. This sensor collects humidity and temperature data of surroundings. For circuit connection we need Arduino IDE software, ESP8266 board, DHT-11 sensor, USB cable and connecting wires. 

NodeMCU - Wikipedia

 

DHT-11 sensor is commonly used for sensing temperature and humidity of the environment. The sensor operated in 3.5 v to 5.5 volt and 0.3mA. The sensor temperature is 0°C to 50°C and humidity range is 20% to 90%. If it exceeds the above range, the sensor will not detect. The sensor will give the output in form of serial data. This value will displayed in serial monitor, firebase cloud and mobile app which can be created using MIT app inventor. 

DHT11–Temperature and Humidity Sensor

 

CIRCUIT CONNECTIONS: 

VCC - Power supply 3.5 to 5.5 V

Ground - connected to ground of nodemcu

Data - D2 pin of nodemcu 

1. First install the required libraries for the code.

2. Install the following libraries: 

  •  ArduinoJSON Library
  •  Google FirebaseExtended Library
  •   DHT11 Library 

3.  Go to library manager and search those library and install. Then setup firebase cloud.  

Google Firebase is a open souce cloud platform. First go to google firebase cloud. Then add project in this platform. After, go to project settings and database secrets. Then copy the secrete code from that. Then paste the firebase auth in the code. After go to database and create humidity and temperature parameter. After making all changes these look like, 

 

 

MIT App Inventor was used to creating app and to control robot's motion. First we should design an android app and send sensor data to this app using nodemcu and firebase cloud. 

Steps for creating android app: 

  • First, go to MIT app inventor web page. 
  • Secondly, create layout and labels. 
  • Place the components which we want to use. 
  • Then, go to block diagram page and create blocks. 
  • After copy the firebase URL and paste it in the programming code. 
  • Finally, download the firebase '.aia' file.

This android app shows the sensor values each and every minute. So, we can see the weather report any where in the world. Using firebse cloud also we can see the data send by the sensor. 

In coding part first install the necessary libraries for this project. Afterwards, paste the firebase authentication key. For sending data we should connect wifi network. For this give Wifi SSID and password. After making all this setup, compile and upload the code. The serial monitor also displays temperature and humidity data.

 

Mobile App

 

https://www.youtube.com/shorts/S8WzYJgGFJI

Codes

Downloads

APP Download
firebase cloud Download
SERIAL_MONITOR Download
CIRCUIT Download

Institute / Organization

BANNARI AMMAN INSTITUTE OF TECHNOLOGY, SATHYAMANGALAM
Comments
Ad