This project is a gas leakage and environmental monitoring system using Arduino Nano, MQ2 gas sensor, I2C LCD, and RTC module. It is designed to detect LPG, CO, and smoke levels in its environment and provide time-stamped alerts if a gas leak is detected.
- Arduino Nano
- Male to Male and Male to Female connection wires.
- MQ2 Gas Sensor
- I2C LCD (16x2)
- RTC_DS3231 Module
- Breadboard.
- Buzzer and a small Exhaust fan(optional)
The code performs the following functions:
- Initializes the LCD and RTC modules.
- Reads real time gas levels and temperature by collecting data from the sensors at regular intervals.
- Displays data on the LCD.
- Logs gas leakage events with timestamps.
- Connect the components as shown in the photo.
- Upload the
GasLeakageDetection.inosketch to your Arduino Nano. - Monitor the Serial Monitor for debugging information and the LCD for real-time data.
The device will display temperature and gas levels on the LCD. It will alert if a gas leak is detected, showing a warning message and logging the event with the date and time.Scaled more, it can be used for:
- Industrial Safety
- Residential Security
- Laboratory Safety
- Environmental Monitoring

