Tekko BDSimSimulatorProjects

এলপিজি লিক অটো-কাটঅফ — গ্যাস ধরলেই ভালভ বন্ধLPG Leak Auto-Cutoff

MQ-2 নাকের আগেই গ্যাস ধরে ফেলে। মাপ পার হলেই রিলে নেমে সলিনয়েড ভালভ বন্ধ হয়ে যায়, আর গ্যাস সরলেও বন্ধই থাকে — লিক থাকতে থাকতে কেউ লাইন খোলার সাহস করে না।

The MQ-2 smells gas long before your nose does. At the limit the relay drops, the solenoid valve slams shut and it STAYS shut even if the gas drifts away — nobody reopens a line while a leak is live.

▶ ফ্রি চালিয়ে দেখো / Run it free Parts অর্ডার করো (WhatsApp)

সার্কিট ডায়াগ্রাম · Circuit diagram

LPG Leak Auto-Cutoff circuit diagram — Arduino Uno R3, Gas & smoke sensor (MQ-2), Relay module (5V, 1 channel), Solenoid door lock (12 V), Buzzer (5 V), Resistor 330Ω, LED (red), Jumper wires

যা যা লাগবে · Parts you need

তার লাগানো · Wiring

Gas & smoke sensor (MQ-2) VCC→Arduino Uno R3 5V
Gas & smoke sensor (MQ-2) GND→Arduino Uno R3 GND
Gas & smoke sensor (MQ-2) AO→Arduino Uno R3 A0
Relay module (5V, 1 channel) VCC→Arduino Uno R3 5V
Relay module (5V, 1 channel) GND→Arduino Uno R3 GND
Relay module (5V, 1 channel) IN→Arduino Uno R3 D7
Relay module (5V, 1 channel) COM→Arduino Uno R3 5V
Relay module (5V, 1 channel) NO→Solenoid door lock (12 V) +
Solenoid door lock (12 V) -→Arduino Uno R3 GND.3
Buzzer (5 V) +→Arduino Uno R3 D8
Buzzer (5 V) -→Arduino Uno R3 GND.3
Arduino Uno R3 D13→Resistor a
Resistor b→LED A
LED K→Arduino Uno R3 GND.3

Code (Arduino C++)

// LPG pipeline auto-cutoff: the MQ-2 smells gas long before your nose does.
// While the air is clean the solenoid valve stays energised (open) and the
// kitchen cooks. The moment gas passes the limit the relay drops, the valve
// slams shut, the red lamp and buzzer take over — and it stays shut even if
// the gas drifts away, until the power cycle resets it. That latch is the
// whole point: nobody reopens a gas line while the leak is still live.
void setup() {
  Serial.begin(9600);
  pinMode(7, OUTPUT); pinMode(8, OUTPUT); pinMode(13, OUTPUT);
}

void loop() {
  int raw = analogRead(A0);
  static bool leak = false;
  if (raw > 300) leak = true;
  bool safe = !leak;
  digitalWrite(7, safe ? HIGH : LOW);       // relay holds the valve open
  digitalWrite(8, leak ? HIGH : LOW);
  digitalWrite(13, leak ? HIGH : LOW);
  Serial.print("Gas: "); Serial.print(raw);
  Serial.print(" | Valve: "); Serial.println(leak ? "CLOSED (leak)" : "open");
  delay(300);
}

আরো project · More projects