LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsAn LDR's resistance falls as light rises. The module turns that into a voltage between 0 and 5 V, and analogRead() on A0 turns the voltage into a number from 0 to 1023. Printing it every half second shows how the Arduino's ADC sees the world: cover the sensor, shine a phone torch on it, and note the two numbers. Project 11 uses them as its threshold.
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
LDR light sensor module with analog output
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_10_light_detector.inoVerify & upload in Electrolark// Spark Kit 10: light detector
int ldr = A0;
void setup() {
Serial.begin(9600);
}
void loop() {
int value = analogRead(ldr); // 0..1023
Serial.print("Light level: ");
Serial.println(value);
delay(500);
}
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 output wire is on the wrong pin or the module is not powered. Check VCC, GND and A0.
Normal for some modules: it depends on which side the LDR sits in the divider. Note both readings for project 11.
Tools > Serial Monitor in the Arduino IDE. Set it to 9600 baud to match Serial.begin(9600).
The UNO's ADC has 10 bits, which gives 1024 steps between 0 V and 5 V.
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.
5 parts: Uno R3 CH340G ATmega328p Compatible Development Board, Arduino USB-A to USB-B Data Cable for UNO/MEGA, Generic Photosensitive Resistor Sensor Module for Arduino – Light Dependent Resistor (LDR), 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 4 steps.
No. This page has the complete, tested code (spark_kit_10_light_detector.ino).
About ₹413 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Analog inputs; Analog-to-digital conversion (ADC); Monitoring sensor data on the Serial Monitor.
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.