Skip to the content
PCBKitNew board
2 layers100 × 100 mmGasGuard, the printed circuit board in 3D

IoT and ML-based LPG monitoring system with ESP32 leak detection, automatic valve shutoff, real-time mobile alerts and refill prediction. Built with React Native, Firebase and Python.

Size
100 × 100 mm
Copper layers
2
Thickness
1.6 mm
Parts
14
Nets
37
Pads
78
Tracks, vias
178, 40
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
15 Jun 2026
Updated
16 Oct 2026

Overview

GasGuard is an open-source printed circuit board by pasinduh2002, from the pasinduh2002/GasGuard repository on GitHub, published under the MIT licence. It is a 2-layer board of 100 × 100 mm with 14 parts on 37 nets, routed with 178 tracks and 40 vias.

It is built around the AM2302. Its parts include 8 connectors, 3 ICs and 2 resistors. It belongs with the home automation and IoT boards of this library.

Main components

1

README

README.md

🔥 GasGuard

IoT & Machine Learning-Based LPG Monitoring and Safety System

Individual Design Project · 2026

ESP32 Arduino React Native Firebase Python scikit-learn

GasGuard Prototype   GasGuard Mobile App

Smart Monitoring · Early Detection · Safer LPG Usage

GitHub · Watch Demo


📌 Overview

GasGuard combines ESP32 sensors, automatic valve control, Firebase, and a React Native app to monitor LPG usage, detect leaks, and predict refill dates.

✨ Features

Safety & MonitoringMobile & Delivery
Live LPG weight and percentageCustomer and supplier dashboards
Gas leak detection and alertsUsage and cost tracking
Automatic valve shutoffML-based refill prediction
Temperature and humidityRefill ordering and order tracking
Local LCD and buzzer alertsMaps, location sharing, and chat

🏗️ Architecture

text
Sensors → ESP32 → Firebase → React Native App
             ↓                        ↑
      Alarm + Valve Control     ML Predictions

Leak detection and valve control operate locally without internet.

🧰 Technology Stack

ESP32 C++ Arduino

React Native JavaScript Android Google Maps

Firebase Python NumPy Pandas scikit-learn

🔌 Hardware

ComponentConnection
ESP32 DevKit V1Main controller
MQ-5GPIO 34
DHT22GPIO 27
20 kg Load Cell + HX711DT: 25 · SCK: 26
16×2 I²C LCDSDA: 21 · SCL: 22
MG995 ServoGPIO 13
BuzzerGPIO 19
Green / Red LEDsGPIO 23 / 32
LM2596Voltage regulation

Servo: separate regulated power line with common ground.

🚨 Leak Response

text
Gas Detected
     ↓
Red LED + Buzzer + LCD Warning
     ↓
Servo Closes Valve
     ↓
Firebase Event + Mobile Alert

🤖 Depletion Prediction

ItemResult
ModelMultiple Linear Regression
Dataset180 records · 5 kg cylinder
Inputs9 engineered features
Train / Test80% / 20%
Test R²0.9883
MAE1.618 days
RMSE1.877 days
5-Fold CV R²0.9316 ± 0.1093

Inputs include LPG weight, usage rate, rolling consumption, and refill history.

Limited dataset; performance across other households and cylinder sizes is not established.

📂 Repository

text
GasGuard/
├── assets/
├── Database/
├── GasGuard_App/
├── GasGuard_App Apk/
├── GasGuard_Diagnostics_Tools/
├── GasGuard_ML/
├── NewFullcode/
├── Testing_Codes/
├── LICENSE
└── README.md

🚀 Quick Start

Firmware

Open NewFullcode/ in Arduino IDE, install dependencies, configure Wi-Fi/Firebase, and upload to ESP32.

Mobile App

bash
cd GasGuard_App
npm install
npx react-native run-android

Configure Firebase and Google Maps before running.

Machine Learning

bash
cd GasGuard_ML
pip install numpy pandas scikit-learn matplotlib
python gasguard_model_training.py

📸 Gallery

Prototype Mobile Alert Project Exhibition

🔮 Next Steps

  • Larger datasets and multiple cylinder sizes
  • Battery backup and improved weight filtering
  • Valve-fault monitoring
  • Stronger authentication and Firebase App Check
  • Long-term testing and delivery tracking

🔐 Security

Keep credentials out of Git. Configure Firebase Authentication, database rules, and API-key restrictions.

⚠️ Safety

Educational prototype - not a certified LPG safety system. Do not use it as a replacement for certified detectors, approved valves, or professional inspections.

👨‍💻 Developer

WALP Harsha
Electronics & Telecommunication Engineering Undergraduate
General Sir John Kotelawala Defence University · Sri Lanka 🇱🇰

📄 License

See LICENSE.


🔥 GasGuard · Smart Monitoring. Early Detection. Safer LPG Usage.

Parts

14
QtyValueFootprintReferences
210KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR3, R4
2Conn_01x02Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ3, J4
1AM2302Sensor:ASAIR_AM2302_P2.54mm_VerticalU3
1BuzzerBuzzer_Beeper:Buzzer_12x9.5RM7.6BZ1
1Conn_01x04Connector:FanPinHeader_1x04_P2.54mm_VerticalJ7
1Green LEDConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ8
1I2cConnector:FanPinHeader_1x04_P2.54mm_VerticalJ5
1MQ5Connector:FanPinHeader_1x04_P2.54mm_VerticalJ10
1RED LEDConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ9
1ServoConnector:FanPinHeader_1x03_P2.54mm_VerticalJ6
1YAAJ_DCDC_StepDown_LM2596chinese:YAAJ_DCDC_StepDown_LM2596U2
1~30pin:ESP32_30pinU4

Questions

How big is the GasGuard PCB?

It measures 100 × 100 mm and has 2 copper layers, 1.6 mm thick.

What parts does the GasGuard use?

14 parts, built around the AM2302. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the GasGuard KiCad files?

From the pasinduh2002/GasGuard repository on GitHub, at the commit this page was made from: the board is GasGuard_KiCAD_Files/GasGuard.kicad_pcb and its schematic GasGuard_KiCAD_Files/GasGuard.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the GasGuard design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 4 layers101.6 × 141.7 mmPiPtr, the printed circuit board in 3D

    PiPtr

    jmlzone/PiPtr

    Repeater controller

    388 parts8
  • 2 layers46.5 × 38.1 mmMainboard smd, the printed circuit board in 3D

    Mainboard smd

    OpenHumidistat/hardware

    KiCAD design files for PCBs for the OpenHumidistat humidity controller

    30 parts4
  • 2 layersMars rover navigation system, the printed circuit board in 3D

    Mars rover navigation system

    tjiuce/rover

    Rover Navigation Optimization System (R-NOS): An ESP32-powered autonomous robotic prototype designed for real-time environmental monitoring.

    4 parts4
  • 2 layersWeather balloon V1.0, the printed circuit board in 3D

    Weather balloon V1.0

    Launchpad-Incubator/weather-balloon

    The research repository for Launchpad's flat-packed weather balloons.

    3 parts2
  • 2 layersPriject 2 ESP32 build, the printed circuit board in 3D

    Priject 2 ESP32 build

    Aanuoluwap/555blinker

    This repository contains electronics design projects created using KiCad.

    12 parts1MIT
  • 2 layers125 × 68 mmLights, the printed circuit board in 3D

    Lights

    aarusso-nyx/Luce

    ESP32 firmware project built with PlatformIO + ESP-IDF.

    27 parts
  • 2 layers94 × 68.5 mmWireless temp sensor, the printed circuit board in 3D

    Wireless temp sensor

    Akilesh-10/Wireless_Temperature_Sensor

    This is pcb project

    21 parts