LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsA bar load cell bends a tiny amount under weight, and the HX711 24-bit amplifier turns that into a reading you can calibrate in grams. A force-sensitive resistor (FSR) is the opposite: cheap and fast but not accurate, which makes it great for games and pressure buttons. This project builds both on one Uno and shows them on a 4-digit display.
Do not overload the cell beyond its rating; it can bend permanently.
Tick anything you already have and the total updates.
HX711 24-bit load cell amplifier
Thin-film force sensitive resistor
SparkFun HX711 breakout, a well-documented alternative amplifier
Voltage conversion module that makes an FSR easier to read
Large membrane pressure plate for a foot-stomp game
Industrial rotary torque sensor for motor test benches (0-10 V and RS485 output)
Follow the colours: red is power, dark grey is ground, blue is a signal.
scale_fsr.inoVerify & upload in Electrolark#include <HX711.h>
#include <TM1637Display.h>
HX711 scale;
TM1637Display disp(5, 6);
float SCALE = 420.0; // set from your calibration
unsigned long scoreUntil = 0, pressStart = 0;
void setup() {
Serial.begin(115200);
scale.begin(2, 3);
scale.set_scale(SCALE);
scale.tare();
disp.setBrightness(5);
}
void loop() {
int f = analogRead(A0);
if (f > 900) { // long hard press = tare
if (!pressStart) pressStart = millis();
if (millis() - pressStart > 1000) { scale.tare(); pressStart = 0; }
} else pressStart = 0;
if (f > 200 && f <= 900) { disp.showNumberDec(f); scoreUntil = millis() + 3000; }
if (millis() > scoreUntil) {
float g = scale.get_units(5);
Serial.println(g, 1);
disp.showNumberDec((int)round(g));
}
delay(50);
}
The sketch above runs here on a simulated Arduino Uno. Move the sliders for the sensors and buttons it reads, and watch the Serial monitor, display and outputs change.
Let it warm up for a minute and keep the cell away from drafts. Re-tare before each use.
Swap the A+ and A− wires, or use a negative SCALE.
Check DT and SCK are not swapped and that the platform is not touching the base.
Use a higher-rated cell, such as 10 kg, and calibrate again.
FSR readings change with temperature, position and time; they are only good for rough force.
No. Shops must use a scale verified under the Legal Metrology rules.
12 parts: Uno R3 CH340G ATmega328p Compatible Development Board, Generic HX711 Weighing Module Series 24-bit Precision AD Module with Shield & Header Pins, YZC-133 5kg Load Cell Sensor with Wires 80 x 12 x 12mm, Generic Force Sensitive Resistor RP-S5-ST (10g-1kg) – Thin Film Sensor, TM1637 4-Digit 7-Segment Display Module, Resistor Assortment Kit (30 Values), SparkFun Load Cell Amplifier – HX711 Breakout Board, Generic RFP Thin Film Pressure Sensor Resistance/Voltage Conversion Module for FSR4 Series, Generic Membrane Pressure Sensor Plate – Red Plate w/ 3-Pin Green Header, SOP SOPN-200 Dynamic Rotary Torque Sensor, 5N·m, 0~10V & RS485 Output, 24VDC, 8000RPM, plus 2 more. 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 (scale_fsr.ino).
Yes. The Run it panel under the code runs this exact sketch on a simulated board. Move the sliders or press the buttons for the sensors it reads, and the Serial monitor, display and outputs react as they will on the real build. It is a simulation, so real readings depend on your parts and wiring.
About ₹65,421 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Calibrating a load cell with a known weight; Tare and averaging; When to use an FSR and when to use a load cell.
Do not overload the cell beyond its rating; it can bend permanently.
Ideas that reuse this build: Water pipe pressure and tank level. They are listed under Take it further on this page.
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.
Learning project. Check every circuit and the datasheet of each part before you power it up.
A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.