LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsThe IR module shines invisible infrared light forward and watches for its reflection. When an object comes within range (about 2 to 30 cm, set by the trimmer) its DO pin goes LOW. The Arduino reads that on D2 and lights the LED on D8. Robot cars use the same sensor to stop before a wall.
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, LOW when an object is near
330 ohm resistor pack: limits the LED current
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_17_obstacle_detector.inoVerify & upload in Electrolark// Spark Kit 17: obstacle detector
int ir = 2; // LOW when an object is near
int led = 8;
void setup() {
pinMode(ir, INPUT);
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, digitalRead(ir) == LOW ? HIGH : 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.
Bright sunlight blinds the sensor, or the range is set too far. Test indoors and turn the trimmer back.
Black surfaces reflect little infrared. Expect a shorter range on them.
About 2 to 30 cm, set by the trimmer and the colour of the object.
No, it only says near or not near. An ultrasonic sensor measures distance in cm.
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.
8 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, Through-Hole LED Pack (Pack of 10), Carbon Film Resistor 1/4W 5% (Pack of 10), Solderless Breadboard, 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 6 steps.
No. This page has the complete, tested code (spark_kit_17_obstacle_detector.ino).
About ₹453 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Object sensing; Reflective IR sensors; Active-low outputs.
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.