Skip to content

guustavomc/ESP32-Home-Monitoring-Hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ESP32 Home Monitoring Hub

The ESP32 Home Monitoring Hub is a versatile IoT project that leverages the ESP32 microcontroller to monitor environmental parameters such as temperature, humidity, pressure, and light intensity. It integrates multiple sensors and a display to provide real-time data visualization, making it ideal for home automation, environmental monitoring, or educational purposes.

Table of Contents

Features

  • Real-time monitoring of temperature, humidity, atmospheric pressure, and light intensity.
  • Visual display of sensor data on an ST7735 TFT screen.
  • Easy-to-use interface for home monitoring applications.
  • Modular design supporting multiple sensors.
  • Low-power operation suitable for continuous monitoring.

Hardware Requirements

  • ESP32 Development Board (e.g., ESP32-WROOM-32)
  • DHT Sensor (e.g., DHT11 or DHT22 for temperature and humidity)
  • BMP280 Sensor (for atmospheric pressure and temperature)
  • BH1750 Sensor (for light intensity)
  • ST7789 TFT Display (1.8" SPI TFT display)
  • Jumper wires
  • Breadboard or custom PCB
  • USB cable for programming and power

Software Requirements

  • Arduino IDE or PlatformIO for programming the ESP32
  • ESP32 board support package installed in the Arduino IDE
  • Required libraries (listed below)

Installation

  1. Set up the Arduino IDE:

  2. Install the required libraries:

    • Open the Arduino IDE Library Manager and install the following libraries:
      • Adafruit_Sensor
      • DHT sensor library
      • Adafruit_BMP280_Library
      • BH1750
      • Adafruit_ST7735_Library
    • Alternatively, download them from the links in the Libraries Used section and add them manually.
  3. Clone the repository:

    git clone https://github.com/guustavomc/ESP32-Home-Monitoring-Hub.git
  4. Upload the code:

    • Open the main sketch (e.g., ESP32_Home_Monitoring_Hub.ino) in the Arduino IDE.
    • Connect your ESP32 to your computer via USB.
    • Select the appropriate board and port in the Arduino IDE.
    • Upload the code to the ESP32.

Wiring

Below is a general wiring guide for connecting the sensors and display to the ESP32. Adjust pin assignments based on your specific code configuration.

Breadboard Circuit

Component ESP32 Pin Notes
DHT11/DHT22 GPIO 4 Data pin
BMP280 (SDA) GPIO 21 I2C SDA
BMP280 (SCL) GPIO 22 I2C SCL
BH1750 (SDA) GPIO 21 I2C SDA (shared I2C bus)
BH1750 (SCL) GPIO 22 I2C SCL (shared I2C bus)
ST7789 (TFT_CS) GPIO 5 Chip Select
ST7789 (DC) GPIO 2 Data/Command
ST7789 (RST) GPIO 15 Reset
ST7789 (SCL) GPIO 18 SPI Clock
ST7789 (SDA) GPIO 23 SPI MOSI

Notes:

  • Ensure a common ground (GND) for all components.
  • Power the sensors and display with 3.3V or 5V as per their specifications.
  • Verify pin assignments in the code before wiring.

Usage

  1. Power the ESP32 via USB or an external power source.
  2. The ST7735 display will show real-time data from the connected sensors:
    • Temperature and Humidity from the DHT sensor.
    • Atmospheric Pressure (and optional temperature) from the BMP280.
    • Light Intensity (in lux) from the BH1750.
  3. Customize the display output or data logging by modifying the Arduino sketch as needed.

Libraries Used

The project relies on the following open-source libraries:

Code Examples

The project used as a base multiple example projects from the community, examples used for each component:

Next Steps

The following features are planned to enhance the ESP32 Home Monitoring Hub:

  • Display Improvement: adding button to turn on display, option to navigate on specific display details.
  • Sharing Sensor Data to a Separate Server: Enable Wi-Fi connectivity to send sensor data to a remote server or cloud platform for real-time monitoring and data visualization. Using https://github.com/plapointe6/EspMQTTClient

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Make your changes and commit (git commit -m "Add your feature").
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a Pull Request.

Please ensure your code follows the project's coding style and includes appropriate documentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages