Arduino and ESP8266-Based Smart Gas Detection System with GPS and LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino UNO, an ESP8266 NodeMCU, various sensors, LEDs, a buzzer, and a 16x2 I2C LCD. The Arduino UNO serves as the main microcontroller, interfacing with the LEDs, buzzer, and LCD. The ESP8266 NodeMCU is used for Wi-Fi connectivity and interfaces with the GPS module and MQ2 gas sensor. The circuit is powered through the Arduino UNO and ESP8266 NodeMCU.
Component List
Arduino UNO
- Description: Main microcontroller
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
LED: Two Pin (red)
- Description: Red LED
- Pins: cathode, anode
LED: Two Pin (green)
- Description: Green LED
- Pins: cathode, anode
Resistor (10 Ohms)
- Description: Resistor with 10 Ohms resistance
- Pins: pin1, pin2
Resistor (20 Ohms)
- Description: Resistor with 20 Ohms resistance
- Pins: pin1, pin2
ESP8266 NodeMCU
- Description: Wi-Fi microcontroller
- Pins: D0, D1, D2, D3, D4, 3V3, GND, D5, D6, D7, D8, RX, TX, A0, RSV, SD3, SD2, SD1, CMD, SD0, CLK, EN, RST, VIN
Buzzer
- Description: Buzzer for sound output
- Pins: PIN, GND
GPS NEO 6M
- Description: GPS module
- Pins: VCC, RX, TX, GND
16x2 I2C LCD
- Description: 16x2 character LCD with I2C interface
- Pins: GND, VCC, SDA, SCL
MQ2
- Description: Gas sensor
- Pins: VCC, GND, AOUT, DOUT
Wiring Details
Arduino UNO
- GND: Connected to the cathode of the green LED, cathode of the red LED, GND of MQ2, GND of 16x2 I2C LCD, and GND of the buzzer.
- D6: Connected to the anode of the green LED.
- D7: Connected to the anode of the red LED.
- 5V: Connected to pin1 of the 20 Ohms resistor, VCC of MQ2, and VCC of 16x2 I2C LCD.
- A0: Connected to pin2 of the 10 Ohms resistor and AOUT of MQ2.
- A4: Connected to SDA of 16x2 I2C LCD.
- A5: Connected to SCL of 16x2 I2C LCD.
- D3: Connected to PIN of the buzzer.
LED: Two Pin (red)
- cathode: Connected to GND of Arduino UNO.
- anode: Connected to D7 of Arduino UNO.
LED: Two Pin (green)
- cathode: Connected to GND of Arduino UNO.
- anode: Connected to D6 of Arduino UNO.
Resistor (10 Ohms)
- pin1: Connected to pin2 of the 20 Ohms resistor.
- pin2: Connected to A0 of Arduino UNO and AOUT of MQ2.
Resistor (20 Ohms)
- pin1: Connected to 5V of Arduino UNO, VCC of MQ2, and VCC of 16x2 I2C LCD.
- pin2: Connected to pin1 of the 10 Ohms resistor and A0 of ESP8266 NodeMCU.
ESP8266 NodeMCU
- GND: Connected to pin1 of the 20 Ohms resistor and GND of GPS NEO 6M.
- A0: Connected to pin2 of the 10 Ohms resistor.
- D5: Connected to TX of GPS NEO 6M.
- D6: Connected to RX of GPS NEO 6M.
- 3V3: Connected to VCC of GPS NEO 6M.
Buzzer
- GND: Connected to GND of Arduino UNO.
- PIN: Connected to D3 of Arduino UNO.
GPS NEO 6M
- TX: Connected to D5 of ESP8266 NodeMCU.
- RX: Connected to D6 of ESP8266 NodeMCU.
- GND: Connected to GND of ESP8266 NodeMCU.
- VCC: Connected to 3V3 of ESP8266 NodeMCU.
16x2 I2C LCD
- GND: Connected to GND of Arduino UNO.
- VCC: Connected to 5V of Arduino UNO.
- SDA: Connected to A4 of Arduino UNO.
- SCL: Connected to A5 of Arduino UNO.
MQ2
- GND: Connected to GND of Arduino UNO.
- VCC: Connected to pin1 of the 20 Ohms resistor.
- AOUT: Connected to pin2 of the 10 Ohms resistor and A0 of Arduino UNO.
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Documentation (documentation.txt)
This documentation provides a comprehensive overview of the circuit, including a summary, detailed component list, wiring details, and the code used in the microcontrollers.