LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsSwap project 17's LED for the active buzzer and you have a doorway alarm. Point the IR sensor across a door or a drawer opening; when someone breaks the beam, DO on D2 goes LOW and the buzzer on D8 sounds. A short hold time keeps the alarm going for a second after each detection so it is easy to hear.
Every part for this build comes in the Geekobot Spark Kit box, a Geekobot exclusive, together with the parts for all 24 projects, from a first blinking LED to a smart fan and a reaction game. The wiring below is the kit's own wiring.
Tick anything you already have and the total updates.
The brain of every Spark Kit project
IR obstacle sensor
Female-to-female or male-to-female leads for the modules
Sensor Shield v5.0 from the kit: every pin has its own G, V, S header, so modules plug in with female jumpers
Follow the colours: red is power, dark grey is ground, blue is a signal.
spark_kit_18_intruder_alarm.inoVerify & upload in Electrolark// Spark Kit 18: intruder alarm
int ir = 2;
int buzzer = 8;
void setup() {
pinMode(ir, INPUT);
pinMode(buzzer, OUTPUT);
}
void loop() {
if (digitalRead(ir) == LOW) { // something detected
digitalWrite(buzzer, HIGH);
delay(1000); // hold the alarm for 1 second
} else {
digitalWrite(buzzer, LOW);
}
}
Use the kit's USB cable (some phone cables carry power only), install the CH340 driver on Windows if the port does not appear, and pick Tools > Board > Arduino Uno.
The sensor sees the far wall. Turn the trimmer to shorten its range.
Remove the delay and use millis() to hold the alarm instead, so the sensor is read all the time.
No, it watches a narrow line about 30 cm long. A PIR motion sensor covers a room.
Yes: add the red and blue LEDs from project 06 and flash them while the buzzer sounds.
Yes. It is one of the 24 projects in the Geekobot Spark Kit, and every part on the list comes in the kit box. You can also buy the parts one by one from the list above.
No. Every Spark Kit project is wired on the breadboard or the Sensor Shield with jumper wires.
6 parts: Uno R3 CH340G ATmega328p Compatible Development Board, Arduino USB-A to USB-B Data Cable for UNO/MEGA, Generic Infrared Obstacle Avoidance Sensor Module (Active Low) – LM393 Comparator, 2-30cm Range, PCB Mounted Active Buzzer Module, Dupont Jumper Wires (40 pcs) and Arduino Sensor Shield V5 Expansion Board. On this page you can tick the parts you already have and add only the rest to your cart.
It is a beginner project and takes about 20 minutes. The build on this page has 5 steps.
No. This page has the complete, tested code (spark_kit_18_intruder_alarm.ino).
About ₹449 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Security system logic; Detection with a hold time; Reusing a sensor for a new job.
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.