Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an MQ-2 gas sensor, an HC-SR04 ultrasonic sensor, an ESP32-WROOM microcontroller, and a 16x2 I2C LCD display. The ESP32-WROOM serves as the central microcontroller, interfacing with the sensors and the display to perform various functions.
Component List
MQ-2 Gas Sensor
- Description: A gas sensor used to detect levels of various gases such as LPG, smoke, alcohol, propane, hydrogen, methane, and carbon monoxide.
- Pins: GND, VCC, ANALOG, Digital
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic sensor used for distance measurement.
- Pins: VCC, TRIG, ECHO, GND
ESP32-WROOM
- Description: A powerful microcontroller with built-in Wi-Fi and Bluetooth capabilities.
- Pins: 3V3, EN, SP, SN, 34, 35, 32, 33, 25, 26, 27, 14, 12, GND, 13, 23, 22, TX0, RX0, 21, 19, 18, 5, 17, 16, 4, 0, 2, 15, SD1, SD0, CLK, 5V, CMD, SD3, SD2, USB
16x2 I2C LCD
- Description: A 16x2 character LCD display with I2C interface.
- Pins: GND, VCC, SDA, SCL
Wiring Details
MQ-2 Gas Sensor
- GND: Connected to GND of ESP32-WROOM and HC-SR04 Ultrasonic Sensor
- VCC: Connected to VCC of 16x2 I2C LCD and 3V3 of ESP32-WROOM
- ANALOG: Connected to pin 34 of ESP32-WROOM
HC-SR04 Ultrasonic Sensor
- GND: Connected to GND of MQ-2 Gas Sensor and ESP32-WROOM
- VCC: Connected to 5V of ESP32-WROOM
- TRIG: Connected to pin 5 of ESP32-WROOM
- ECHO: Connected to pin 18 of ESP32-WROOM
ESP32-WROOM
- GND: Connected to GND of MQ-2 Gas Sensor, HC-SR04 Ultrasonic Sensor, and 16x2 I2C LCD
- 3V3: Connected to VCC of MQ-2 Gas Sensor and 16x2 I2C LCD
- 5V: Connected to VCC of HC-SR04 Ultrasonic Sensor
- Pin 34: Connected to ANALOG of MQ-2 Gas Sensor
- Pin 5: Connected to TRIG of HC-SR04 Ultrasonic Sensor
- Pin 18: Connected to ECHO of HC-SR04 Ultrasonic Sensor
- Pin 22: Connected to SCL of 16x2 I2C LCD
- Pin 21: Connected to SDA of 16x2 I2C LCD
16x2 I2C LCD
- GND: Connected to GND of ESP32-WROOM
- VCC: Connected to VCC of MQ-2 Gas Sensor and 3V3 of ESP32-WROOM
- SCL: Connected to pin 22 of ESP32-WROOM
- SDA: Connected to pin 21 of ESP32-WROOM
Code
No code is provided for this circuit.
This document provides a comprehensive overview of the components and their interconnections in the circuit. For further details or modifications, please refer to the specific datasheets of each component.
