LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsGarmin's LIDAR-Lite v4 LED measures distance up to about 10 m by timing pulses of infrared light, with centimetre resolution and a fast update rate. It talks I2C and has Qwiic connectors; SparkFun's library reads it in one call. Mounted on the wall at bumper height, it measures the distance to the car. The ESP32 lights green while far, amber when close and red at the stop distance, and the buzzer beeps faster as you get closer.
Drive slowly; this is an aid, so still watch where you park.
Tick anything you already have and the total updates.
Garmin LIDAR-Lite v4 LED distance sensor (Qwiic)
Follow the colours: red is power, dark grey is ground, blue is a signal.
5 V USB supply into the ESP32; the sensor takes 5 V from VIN.
parking.inoVerify & upload in Electrolark#include <Wire.h>
#include <LIDARLite_v4LED.h>
LIDARLite_v4LED lidar;
const int G = 25, A = 26, R = 27, BUZ = 32;
const int STOP_CM = 40, NEAR_CM = 120, FAR_CM = 300;
void setup() {
Serial.begin(115200);
Wire.begin(21, 22);
pinMode(G, OUTPUT); pinMode(A, OUTPUT); pinMode(R, OUTPUT); pinMode(BUZ, OUTPUT);
while (!lidar.begin()) { Serial.println("LIDAR-Lite not found"); delay(1000); }
}
void loop() {
float cm = lidar.getDistance();
Serial.println(cm);
bool parked = cm < STOP_CM, near = cm < NEAR_CM, active = cm < FAR_CM;
digitalWrite(R, parked); digitalWrite(A, near && !parked); digitalWrite(G, active && !near);
if (parked) { digitalWrite(BUZ, HIGH); delay(100); }
else if (near) {
int gap = map(cm, STOP_CM, NEAR_CM, 60, 500);
digitalWrite(BUZ, HIGH); delay(40); digitalWrite(BUZ, LOW); delay(gap);
} else { digitalWrite(BUZ, LOW); delay(100); }
}
Check 5 V power and the SDA and SCL wires.
Aim at a flat part such as the number plate, not glass.
Something else is in range; lower FAR_CM.
Yes, it uses its own infrared light.
Strong sun reduces range; a garage is ideal.
Yes, stop the buzzer after a few seconds in the red zone.
8 parts: Garmin LIDAR-Lite v4 LED Distance Measurement Sensor (Qwiic), ESP32-WROOM-32 38-Pin Development Board, 3 × 5mm LED by Colour (Pack of 10), Resistor Assortment Kit (30 Values), Buzzer Module 3.3–5V, Step-Down Converter to 5V USB / 5V 3A, 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 beginner project and takes about 2 hours. The build on this page has 6 steps.
No. This page has the complete, tested code (parking.ino).
About ₹16,223 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
How LED time-of-flight ranging works; Turning a distance into zones; Using an I2C distance sensor.
Drive slowly; this is an aid, so still watch where you park.
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.