LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsPeristaltic pumps squeeze a soft tube, so the liquid never touches the motor and each second of running moves almost the same volume. An analog TDS probe measures dissolved nutrients in the reservoir. When it falls below your target, the ESP32 runs pump A and then pump B for a few seconds through MOSFET modules, waits ten minutes for mixing, and checks again.
Keep electronics above the water line and use a GFCI-protected socket near water.
Tick anything you already have and the total updates.
Analog TDS sensor with probe
Follow the colours: red is power, dark grey is ground, blue is a signal.
12 V adapter into the buck (set to 6 V) for the pumps; ESP32 on USB or a 5 V buck.
nutrient_doser.inoVerify & upload in Electrolarkconst int TDS_PIN = 34, PUMP_A = 26, PUMP_B = 27;
const float TARGET_PPM = 700, ML_PER_S = 1.0, DOSE_ML = 5;
const unsigned long MIX_WAIT = 600000UL; // 10 minutes
unsigned long lastDose = 0;
float readTds(float tempC = 25.0) {
long sum = 0;
for (int i = 0; i < 30; i++) { sum += analogRead(TDS_PIN); delay(20); }
float v = (sum / 30.0) * 3.3 / 4095.0;
float comp = v / (1.0 + 0.02 * (tempC - 25.0));
return (133.42 * comp * comp * comp - 255.86 * comp * comp + 857.39 * comp) * 0.5;
}
void pump(int pin, float ml) {
digitalWrite(pin, HIGH);
delay((unsigned long)(ml / ML_PER_S * 1000));
digitalWrite(pin, LOW);
}
void setup() {
Serial.begin(115200);
pinMode(PUMP_A, OUTPUT); pinMode(PUMP_B, OUTPUT);
analogSetAttenuation(ADC_11db);
}
void loop() {
float ppm = readTds();
Serial.printf("TDS %.0f ppm\n", ppm);
if (ppm < TARGET_PPM * 0.95 && millis() - lastDose > MIX_WAIT) {
pump(PUMP_A, DOSE_ML);
delay(30000); // let A mix before B
pump(PUMP_B, DOSE_ML);
lastDose = millis();
}
delay(10000);
}
Calibrate by scaling the result to match a TDS pen in the same water.
Check the diode direction and that the MOSFET module's output goes to the pump's minus lead.
Increase MIX_WAIT or reduce DOSE_ML; circulation must mix the tank first.
Concentrated A and B nutrients react if mixed together; dose them apart.
The formula assumes 25 °C; add a DS18B20 for real compensation.
Yes, add a pH probe and a third pump for pH down, with the same wait logic.
9 parts: ESP32-WROOM-32 38-Pin Development Board, 2 × Peristaltic Dosing Pump 6V, Generic Analog TDS Sensor Module – 0-2.3V Output, Waterproof Probe, 2 × MOSFET Switch Module, Relay Replacement (D4184 / LR7843), Diodes (Pack of 10), XL4015 Adjustable Buck Converter 5A, DC Power Adapter (5.5x2.1mm), 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 intermediate project and takes about 3 hours. The build on this page has 7 steps.
No. This page has the complete, tested code (nutrient_doser.ino).
About ₹1,793 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Calibrating a peristaltic pump in ml per second; Reading an analog TDS sensor; Dosing with a wait for mixing.
Keep electronics above the water line and use a GFCI-protected socket near water.
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.