Skip to content

2K-GH/ETx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ETx (Environmental Telemetry Experimental)

ETx is a robust, high-availability monitoring node designed for long-term environmental data logging and real-time laboratory supervision. Built on the ESP32 platform, it utilizes a dual-bus I2C architecture to ensure that a single sensor failure or bus hang cannot disrupt the entire system.


🛠 Hardware Architecture & Design Notes

The system features a decoupled I2C configuration to isolate the display and sensor buses.

⚡ The VCC Mismatch Challenge

A key design requirement for this project was the separation of I2C buses due to voltage logic levels. The BME280 operates on 3.3V, while the LCD 1602 requires 5V for optimal contrast and operation. Sharing a single I2C bus often leads to communication errors or hardware instability due to this VCC mismatch. ETx solves this by utilizing the ESP32's dual-bus capability to isolate 3.3V and 5V logic.

BME280 Sensor LCD 1602 with I2C Backpack

🔋 Power Management

  • Field Tested: Currently powered by a stripped 10,000 mAh Li-ion cell from an old powerbank, which has been verified to run continuously for 2-3 days.
  • Scalability: To extend operation time, the design supports 18650 cells or integration with a Solar PV charging circuit for off-grid deployment.

📌 Pin Mapping

Refer to the pinout diagram below for the ESP-WROOM-32 configuration used in this project:

ESP32 Pinout Diagram

Component Function ESP32 GPIO Voltage
LCD 1602 SDA / SCL (Bus 0) GPIO 21 / 22 5V (VIN)
BME280 SDA / SCL (Bus 1) GPIO 16 / 17 3.3V
Button Interaction GPIO 13 Internal Pullup
Buzzer Signal / Alarm GPIO 25 ---
Status LED System Health GPIO 2 Internal

🧠 Engineering Highlights

1. Boot Management & Self-Diagnostics

ETx utilizes a non-blocking boot sequence. Upon power-on, the system performs a hardware self-test and displays a 3-second splash screen ("Hello World! Initializing..."). This allows the ESP32 to initiate the background WiFi and NTP handshake without freezing the UI.

Self Test Splash Screen

2. Visual & Audible Diagnostics (LED & Buzzer)

To provide real-time status without keeping the LCD active, ETx uses a multi-state LED and buzzer system:

  • WiFi Disconnected: The LED remains Solid HIGH (ON) to indicate a lack of network connectivity.
  • WiFi Connected: The LED performs a Double-Blink Heartbeat every second, signaling a healthy network state and active NTP sync.
  • Hardware Alarm: If the LCD or BME280 pins are disconnected (common in breadboard setups), the LED flashes rapidly and the buzzer emits a continuous 800Hz tone until the connection is restored.

3. I2C Bus Recovery Protocol (cleanBus)

Standard I2C implementations often hang if a slave device holds the SDA line LOW. ETx implements a Recursive Recovery Protocol that manually clocks the SCL line 9 times to clear the bus during initialization and failure states.

4. Smart Interaction Logic

To maximize battery life, the display remains off until the user interacts with the system button.

1st Press (Environmental Phase)

The display cycles through raw telemetry and processed comfort data:

  • 0-2.5s: Raw Telemetry (Temperature, Humidity, Pressure).
  • 2.5-5s: Comfort Index (Calculated Heat Index). If $H > 75%$, the UI flags the environment as "Sticky/Humid"; otherwise, it confirms "Comfortable".

Telemetry Display Comfort Index Display

2nd Press (Time Phase)

  • Displays real-time NTP-synchronized date and time.
  • WiFi States: During connection attempts, the UI provides real-time status updates ("Searching WiFi..." or "Syncing Time...") to ensure the user is aware of the network handshake process.

NTP Sync Display

5. Predictive Weather Trending

Instead of static data, ETx performs Barometric Pressure Analysis. By comparing hourly pressure differentials ($\Delta P < -1.33$ hPa), the system can predict incoming storms and automatically trigger a visual/audible "Weather Alert".


🚀 Deployment

  1. Source Code: Refer to the ETx.ino file for the implementation.
  2. WiFi Config: Update the ssid and password variables with your credentials.
  3. Libraries: Requires Adafruit_BME280 and LiquidCrystal_I2C.

⚖ License

Distributed under the MIT License.

About

High-availability ESP32 Environmental Telemetry Station with recursive I2C recovery, NTP synchronization, and predictive storm alerting.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages