LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsA galvanic oxygen sensor is a small battery: oxygen reacting inside it produces a voltage in proportion to the oxygen level, about 10-15 mV in normal air. That is too small for the Nano's ADC, so an ADS1115 reads it with 16-bit resolution at its most sensitive range. Calibrate it in fresh outdoor air as 20.9% and the meter scales every reading from there.
Not a certified safety monitor; do not rely on it for confined-space entry.
Tick anything you already have and the total updates.
Asair AO-03 oxygen sensor
Follow the colours: red is power, dark grey is ground, blue is a signal.
USB or a power bank. The oxygen cell needs no power.
oxygen_meter.inoVerify & upload in Electrolark#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
#include <Adafruit_ADS1X15.h>
#include <EEPROM.h>
Adafruit_ADS1115 ads;
float mvAtAir = 12.0; // replaced by calibration
void setup() {
pinMode(2, INPUT_PULLUP); pinMode(5, OUTPUT);
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C); oled.setTextColor(WHITE);
ads.begin();
ads.setGain(GAIN_SIXTEEN); // +-0.256 V, 7.8 uV per count
float saved; EEPROM.get(0, saved);
if (saved > 3 && saved < 30) mvAtAir = saved;
}
void loop() {
long sum = 0; for (int i = 0; i < 16; i++) sum += ads.readADC_Differential_0_1();
float mv = sum / 16.0 * 0.0078125;
if (digitalRead(2) == LOW) { mvAtAir = mv; EEPROM.put(0, mvAtAir); }
float o2 = mv / mvAtAir * 20.9;
digitalWrite(5, o2 < 19.5);
oled.clearDisplay();
oled.setTextSize(1); oled.setCursor(0, 0); oled.print("Oxygen");
oled.setTextSize(3); oled.setCursor(0, 14); oled.print(o2, 1); oled.setTextSize(2); oled.print("%");
oled.setTextSize(1); oled.setCursor(0, 54); oled.print(mv, 2); oled.print(" mV");
oled.display();
delay(500);
}
The cell leads are swapped; swap A0 and A1.
Average more samples and keep the wires short and twisted.
Galvanic cells wear out; recalibrate monthly and change the cell after its rated life.
Galvanic cells usually last about two years in air; they work all the time, powered or not.
No, it is a learning project; use a certified oxygen monitor for safety.
It is the common lower limit for safe breathing air at work.
8 parts: Asair AO-03 Oxygen Sensor Module – 1-25% Vol. Linear Output, ADS1115 16-Bit 4-Channel ADC Module, Generic Nano CH340 Development Board (Soldered), 0.96" OLED Display 128x64, Buzzer Module 3.3–5V, Tactile Push Button Switch, 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.
No. This page has the complete, tested code (oxygen_meter.ino).
About ₹1,843 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
How galvanic oxygen cells work; Measuring millivolts with a 16-bit ADC; One-point calibration.
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.