ESP32-Based Environmental Monitoring System with I2C Multiplexing
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates an ESP32 microcontroller with multiple peripherals, including an Adafruit TCA9548A I2C multiplexer, a DHT11 temperature and humidity sensor, an MQ-5 gas sensor, and several 5-pin relimate connectors. The ESP32 serves as the central processing unit, interfacing with the sensors and the I2C multiplexer to collect data and possibly control other devices. The I2C multiplexer expands the number of I2C devices that can be connected to the ESP32 by providing additional I2C bus channels. The relimate connectors are used for easy and modular connection of I2C devices or other peripherals. The circuit is designed to operate on a 3.3V power supply, with common ground connections throughout.
Component List
ESP32 (30 pin)
- Description: A 30-pin ESP32 microcontroller module with a variety of GPIOs, analog inputs, and communication interfaces.
- 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
Adafruit TCA9548A
- Description: An I2C multiplexer that allows multiple I2C devices to be connected to a single I2C bus without address conflicts.
- Pins: 2SDA, 2SCL, 3SDA, 3SCL, 4SDA, 4SCL, 5SDA, 5SCL, 6SDA, 6SCL, 7SDA, 7SCL, VCC, GND, INPUTSDA, INPUTSCL, RESET, A0, A1, A2, 0SDA, 0SCL, 1SDA, 1SCL
5 pin relimate connector
- Description: A connector used for making quick and easy connections to the circuit, typically for I2C communication.
- Pins: vcc, GND, SDA, SCL, ADDR
DHT11
- Description: A basic, low-cost digital temperature and humidity sensor.
- Pins: 5V, S, GND
MQ-5
- Description: A gas sensor used for detecting LPG, natural gas, and coal gas.
- Pins: VCC, GND, Digi Out, Analog out
Wiring Details
ESP32 (30 pin)
- D32 connected to MQ-5 Analog out
- GND connected to common ground net
- D22 (I2C SCL) connected to Adafruit TCA9548A INPUTSCL
- D21 (I2C SDA) connected to Adafruit TCA9548A INPUTSDA
- D4 connected to DHT11 S
- 3V3 connected to common VCC net
Adafruit TCA9548A
- INPUTSDA connected to ESP32 D21
- INPUTSCL connected to ESP32 D22
- VCC connected to common VCC net
- GND connected to common ground net
- A0, A1, A2 connected to common ground net (address pins set to 0)
- 2SDA, 2SCL to 7SDA, 7SCL connected to corresponding SDA and SCL pins on 5 pin relimate connectors
5 pin relimate connectors
- vcc connected to common VCC net
- GND connected to common ground net
- SDA and SCL connected to corresponding SDA and SCL pins on Adafruit TCA9548A
DHT11
- 5V connected to ESP32 3V3 (Note: Ensure DHT11 is compatible with 3.3V)
- S connected to ESP32 D4
- GND connected to common ground net
MQ-5
- VCC connected to ESP32 3V3
- GND connected to common ground net
- Analog out connected to ESP32 D32
Documented Code
No code has been provided for the microcontrollers in the circuit. The documentation of the code would typically include descriptions of the functionality implemented, setup and loop functions for Arduino-based microcontrollers, and any libraries or external dependencies required for the code to run. It would also include comments within the code to explain the purpose of different sections and functions.