ESP32-Based Environmental Monitoring System with LoRa Connectivity
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates various sensors and communication modules with an ESP32 Devkit V1 microcontroller. The ESP32 serves as the central processing unit, interfacing with an Adafruit BME680 environmental sensor, an MKE-S08 MQ-2 gas sensor, a LoRa Ra-02 SX1278 module for long-range communication, a rain sensor, and a wind vane. Power management is handled by a solar charger power bank, which supplies power to the ESP32 and other components. The circuit is designed for environmental monitoring and data communication applications.
Component List
ESP32 Devkit V1
- Microcontroller with WiFi and Bluetooth capabilities.
- Pins: 3V3, GND, D15, D2, D4, RX2, TX2, D5, D18, D19, D21, RX0, TX0, D22, D23, EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, VIN.
Adafruit BME680
- Environmental sensor measuring temperature, humidity, barometric pressure, and VOC gas.
- Pins: VCC, 3.3V, GND, SCK/SCL, SDO/ADR, SDI/SDA, CS.
MKE-S08 MQ-2 Sensor
- Gas sensor for detecting LPG, propane, hydrogen, and other combustible gases.
- Pins: GND, 5V, SIG.
LoRa Ra-02 SX1278
- Long-range communication module based on the SX1278 chip.
- Pins: GND, NSS, MOSI, MISO, SCK, D105, DI04, 3.3V, RST, DI00, DI01, D102, DI03.
RAIN SENSOR
- Sensor for detecting rainfall.
- Pins: AO, DO, GRD, VCC.
Wind Vane
- Sensor for detecting wind direction.
- Pins: A0, VCC, GND.
Solar Charger Power Bank
- Power management module for charging and supplying power to the circuit.
- Pins: +, -.
Wiring Details
ESP32 Devkit V1
- 3V3: Connected to Adafruit BME680 (3.3V), LoRa Ra-02 SX1278 (3.3V).
- GND: Common ground with Adafruit BME680, LoRa Ra-02 SX1278, RAIN SENSOR, MKE-S08 MQ-2 Sensor, Solar Charger Power Bank.
- D2: Connected to Adafruit BME680 (SDI/SDA).
- D4: Connected to Adafruit BME680 (CS).
- D5: Connected to Adafruit BME680 (SDO/ADR).
- D18: Connected to LoRa Ra-02 SX1278 (MISO).
- D21: Connected to LoRa Ra-02 SX1278 (SCK).
- D23: Connected to LoRa Ra-02 SX1278 (MOSI).
- D35: Connected to LoRa Ra-02 SX1278 (NSS).
- D33: Connected to LoRa Ra-02 SX1278 (RST).
- D25: Connected to RAIN SENSOR (AO).
- D27: Connected to MKE-S08 MQ-2 Sensor (SIG).
- D12: Connected to Adafruit BME680 (SCK/SCL).
- VIN: Connected to Wind Vane (VCC), RAIN SENSOR (VCC), MKE-S08 MQ-2 Sensor (5V), Solar Charger Power Bank (+).
Adafruit BME680
- 3.3V: Powered by ESP32 Devkit V1 (3V3).
- GND: Common ground with ESP32 Devkit V1.
- SCK/SCL: Connected to ESP32 Devkit V1 (D12).
- SDO/ADR: Connected to ESP32 Devkit V1 (D5).
- SDI/SDA: Connected to ESP32 Devkit V1 (D2).
- CS: Connected to ESP32 Devkit V1 (D4).
MKE-S08 MQ-2 Sensor
- GND: Common ground with ESP32 Devkit V1.
- 5V: Powered by Solar Charger Power Bank (+) through ESP32 Devkit V1 (VIN).
- SIG: Connected to ESP32 Devkit V1 (D27).
LoRa Ra-02 SX1278
- GND: Common ground with ESP32 Devkit V1.
- NSS: Connected to ESP32 Devkit V1 (D35).
- MOSI: Connected to ESP32 Devkit V1 (D23).
- MISO: Connected to ESP32 Devkit V1 (D18).
- SCK: Connected to ESP32 Devkit V1 (D21).
- 3.3V: Powered by ESP32 Devkit V1 (3V3).
- RST: Connected to ESP32 Devkit V1 (D33).
RAIN SENSOR
- AO: Connected to ESP32 Devkit V1 (D25).
- GRD: Common ground with ESP32 Devkit V1.
- VCC: Powered by Solar Charger Power Bank (+) through ESP32 Devkit V1 (VIN).
Wind Vane
- A0: Not connected in the provided net list.
- VCC: Powered by Solar Charger Power Bank (+) through ESP32 Devkit V1 (VIN).
- GND: Not connected in the provided net list.
Solar Charger Power Bank
- +: Supplies power to ESP32 Devkit V1 (VIN), RAIN SENSOR (VCC), MKE-S08 MQ-2 Sensor (5V), Wind Vane (VCC).
- -: Common ground with ESP32 Devkit V1.
Documented Code
No code has been provided for the microcontrollers in the circuit. When code is available, it should be documented here with explanations for each function and routine, including setup and loop functions, interrupt service routines, and any communication protocol implementations.