LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsThe Figaro TGS2600 is a metal-can metal-oxide sensor for air contaminants like hydrogen and ethanol from odours and sprays. Unlike modules, you wire it yourself: 5 V across its heater pins, and 5 V through the sensing element into a load resistor. The voltage across the load resistor rises when the air gets worse. The Nano learns the clean level and switches a relay for the fan when it rises.
The metal can gets warm; do not touch it while powered.
Mains fan wiring must be done by an electrician.
Tick anything you already have and the total updates.
Figaro TGS2600 air quality sensor
5 V USB supply (heater draws about 42 mA)
Follow the colours: red is power, dark grey is ground, blue is a signal.
5 V USB supply.
bathroom_fan.inoVerify & upload in Electrolarkint baseline = 0;
unsigned long fanUntil = 0;
const float RATIO = 1.5; // reading 50% above clean air
void setup() {
pinMode(7, OUTPUT);
Serial.begin(9600);
delay(180000); // warm-up
long s = 0; for (int i = 0; i < 50; i++) { s += analogRead(A0); delay(100); }
baseline = max(1L, s / 50);
}
void loop() {
int v = analogRead(A0);
Serial.println(v);
if (v > baseline * RATIO) fanUntil = millis() + 600000UL; // 10 minutes
digitalWrite(7, millis() < fanUntil);
if (millis() > fanUntil && v < baseline) baseline = (baseline * 9 + v) / 10;
delay(1000);
}
The heater or sensor pins are swapped; check the pin numbers.
The load resistor is missing; the output floats high.
Humidity also affects it; raise RATIO a little.
It shows how gas sensors really work; a module only adds the same resistor and a comparator.
Anything from about 1k to 20k works; 10k suits normal room air.
It reacts to odour gases, not to people being in the room.
7 parts: Figaro Engineering TGS 2600 Air Quality Sensor – MOS Type, TO-5 Metal Can, Generic Nano CH340 Development Board (Soldered), Resistor Assortment Kit (30 Values), 5V Relay Module with Optocoupler, Official Raspberry Pi 4 USB-C Power Supply – 15.3W, Solderless Breadboard and Dupont Jumper Wires (40 pcs). On this page you can tick the parts you already have and add only the rest to your cart.
It is a intermediate project and takes about 2 hours. The build on this page has 7 steps.
No. This page has the complete, tested code (bathroom_fan.ino).
About ₹1,617 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Wiring a bare gas sensor; Load resistor and voltage divider; Timed fan control.
The metal can gets warm; do not touch it while powered. Mains fan wiring must be done by an electrician.
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
See the smoke level live on a crisp screen and get a loud warning when it spikes.
An infrared eye that spots an open flame and raises the alarm.
Walk into the room and it sounds the alarm: the classic first security build.
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Learning project. Check every circuit and the datasheet of each part before you power it up.