ESP32 LoRa Sensor Monitoring With Embedded Web Server

by make2explore in Circuits > Arduino

1931 Views, 3 Favorites, 0 Comments

ESP32 LoRa Sensor Monitoring With Embedded Web Server

ESP32-Lora-EWS-make2explore.png

In this project, we’ve build a sensor monitoring system using a TTGO LoRa32 SX1276 OLED board that sends temperature, humidity and pressure readings via LoRa radio to two different receivers, one is TTGO ESP32 LoRa receiver1 and second is Arduino's MKR WAN 1300 LoRa Development Board . The receiver1 displays the latest sensor readings on a web server. Before starting implementation of the project let us see brief introduction about LoRa Technology.

Supplies

We'll require following hardware components to assemble the circuitry

Parts Required

1. Arduino LoRa MKR WAN1300

2. TTGO LoRa ESP32 OLED Development Boards – 2 Nos

3. BMP280 – Temperature and Atmospheric Pressure Sensor module

4. DHT22 - Temperature and Humidity Sensor 5. 0.96” OLED Display module

What Is LoRa ?

what-is-lora-1.png
[Part I] ESP32 LoRa Sensor monitoring with Embedded Web Server

LoRa (short for Long Range) is a spread spectrum modulation technique derived from chirp spread spectrum (CSS) technology.

We have explained in detailed about LoRa Technology and its Features in above video, you can check that out

Functional Block Diagram of Project

what-is-lora-7.png
  • LoRa Sender reads Sensors (BMP280 and DHT22) readings of (Temperature, Humidity and pressure), converts them in LoRa Packet format and send via LoRa radio every 10 seconds.
  • We’ve used two different types of receiver nodes - LoRa Receiver node 1 - with TTGO ESP32 and LoRa Receiver node 2 - Arduino MKR WAN 1300.
  • The LoRa Receiver node 1 has webserver deployed on it. It gets incoming LoRa packets and displays the received readings on an asynchronous web server also on OLED display. Besides the sensor readings, we also display the last time those readings were received and the RSSI (received signal strength indicator).
  • The LoRa Receiver node 2 is simple receiver node with Arduino MKR WAN 1300 board It gets incoming LoRa packets and displays the received readings on OLED display.

Software - Setup IDE

How to Install ESP8266 & ESP32 Dev Boards in an Arduino IDE
How to Install SPIFFS uploader Plugin in an Arduino IDE

To program the TTGO LoRa32 SX1276 OLED boards we’ll use Arduino IDE. We're going to deploy web sever on one of the receiver node i.e on Receiver Node 1 (TTGO LoRa32 Board).

To upload the web server files into the ESP32 filesystem, we’ll use the ESP32 filesystem uploader plugin.

So, before proceeding, you need to install the ESP32 package and the ESP32 filesystem uploader plugin in your Arduino IDE.

You can check out above videos for that, there we have explained in detail about how to install ESP boards into an Arduino IDE and how to install SPIFFS uploader plugin.

Software : Installing Libraries

For this project you need to install several libraries.

==> LoRa, BMP280 and OLED Libraries

The following libraries can be installed through the Arduino Library Manager. Go to Sketch > Include Library> Manage Libraries and search for the library name.

==> Asynchronous Web Server Libraries

To build the asynchronous web server, you also need to install the following libraries:

These libraries are not available to install through the Library Manager. So, you need to unzip the libraries and move them to the Arduino IDE installation libraries folder.
Alternatively, you can go to Arduino IDE Sketch > Include Library > Add .ZIP library… and select the libraries you’ve just downloaded.

Code of the Project

Link for Code of the project is given below, or you can also our GitHub Repo for code, schematics and libraries.

Demonstration

[Part II] ESP32 LoRa Sensor monitoring with Embedded Web Server

Check out above video where we have explained detailed working of this project, its block diagram, schematics and Implementation of web server. Finally you can also see the working demo of this project.

Source Code + Schematics + Libraries

You'll find all the information about this project on make2explore Github Repository