ESP32-Based Environmental Monitoring System with Gas Sensors and OLED Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an ESP32 microcontroller, various sensors, and an OLED display. The circuit is designed to interface with multiple sensors to collect environmental data and display it on an OLED screen. The sensors include gas sensors (MQ-7 and MQ135), a combined ENS160 and AHT21 sensor module, and a KY-037 microphone. The ESP32 microcontroller serves as the central processing unit, handling data acquisition and communication with the sensors and display.
Component List
ESP32 (30 pin)
- Description: A powerful microcontroller with built-in Wi-Fi and Bluetooth capabilities.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, Vin, D23, D22, TX0, RX0, D21, D19, D18, D5, TX2, RX2, D4, D2, D15, 3V3
ENS160+AHT21
- Description: A combined sensor module that includes an air quality sensor (ENS160) and a temperature and humidity sensor (AHT21).
- Pins: VIN, 3V3, GND, SCL, SDA, ADD, CS, INT
MQ-7 Breakout
- Description: A gas sensor module for detecting carbon monoxide (CO).
- Pins: VCC, GND, DO, AO
MQ135
- Description: A gas sensor module for detecting air quality.
- Pins: VCC, GND, A0, D0
OLED 1.3"
- Description: A 1.3-inch OLED display for visual output.
- Pins: GND, VCC, SCL, SDA
KY-037 Microphone
- Description: A microphone module for sound detection.
- Pins: Analog output, Ground, VCC, Digital output
Wiring Details
ESP32 (30 pin)
- D14 connected to MQ135 A0
- D12 connected to MQ-7 Breakout AO
- GND connected to MQ-7 Breakout GND, KY-037 Microphone Ground, MQ135 GND, ENS160+AHT21 GND, OLED 1.3" GND
- D22 connected to ENS160+AHT21 SCL, OLED 1.3" SCL
- D21 connected to ENS160+AHT21 SDA, OLED 1.3" SDA
- D18 connected to KY-037 Microphone Analog output
- 3V3 connected to MQ-7 Breakout VCC, KY-037 Microphone VCC, ENS160+AHT21 3V3, OLED 1.3" VCC, MQ135 VCC
ENS160+AHT21
- SCL connected to ESP32 D22, OLED 1.3" SCL
- SDA connected to ESP32 D21, OLED 1.3" SDA
- GND connected to ESP32 GND, OLED 1.3" GND
- 3V3 connected to ESP32 3V3
MQ-7 Breakout
- AO connected to ESP32 D12
- GND connected to ESP32 GND, KY-037 Microphone Ground, MQ135 GND
- VCC connected to ESP32 3V3
MQ135
- A0 connected to ESP32 D14
- GND connected to ESP32 GND, MQ-7 Breakout GND, KY-037 Microphone Ground
- VCC connected to ESP32 3V3
OLED 1.3"
- SCL connected to ESP32 D22, ENS160+AHT21 SCL
- SDA connected to ESP32 D21, ENS160+AHT21 SDA
- GND connected to ESP32 GND, ENS160+AHT21 GND
- VCC connected to ESP32 3V3
KY-037 Microphone
- Analog output connected to ESP32 D18
- Ground connected to ESP32 GND, MQ-7 Breakout GND, MQ135 GND
- VCC connected to ESP32 3V3
Code
No code is provided for this circuit.
This document provides a comprehensive overview of the circuit, including a summary, component list, wiring details, and code (if available). This should serve as a useful reference for understanding and replicating the circuit.