LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsCapacitive soil sensors measure moisture without exposed metal, so they do not corrode like the older two-prong probes. The Nano maps the reading between your own dry and wet calibration points, shows a percentage on the OLED and blinks an LED when the soil is dry. A touch pad wakes the screen so it is not on all night.
Keep the electronics above the pot; water and USB ports do not mix.
Tick anything you already have and the total updates.
Capacitive soil moisture sensor
Touch module that wakes the screen
Classic two-prong probe: compare how fast it corrodes
Another touch button module
Brix refractometer: check how sweet your fruit or vegetables are at harvest
Follow the colours: red is power, dark grey is ground, blue is a signal.
plant_reminder.inoVerify & upload in Electrolark#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
const int SOIL = A0, TOUCH = 2, LED = 3;
int DRY = 600, WET = 270; // your calibration readings
int DRY_PCT = 30; // water below this
unsigned long screenUntil = 0;
void setup() {
Serial.begin(115200);
pinMode(TOUCH, INPUT); pinMode(LED, OUTPUT);
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C);
}
void loop() {
int raw = analogRead(SOIL);
int pct = constrain(map(raw, DRY, WET, 0, 100), 0, 100);
Serial.print(raw); Serial.print(" -> "); Serial.print(pct); Serial.println(" %");
bool dry = pct < DRY_PCT;
digitalWrite(LED, dry && (millis() / 500) % 2); // blink when dry
if (digitalRead(TOUCH) == HIGH) screenUntil = millis() + 10000UL;
oled.clearDisplay();
if (millis() < screenUntil) {
oled.setTextColor(WHITE); oled.setTextSize(3); oled.setCursor(10, 10);
oled.print(pct); oled.print("%");
oled.setTextSize(1); oled.setCursor(10, 48); oled.print(dry ? "Water me!" : "All good");
}
oled.display();
delay(200);
}
The sketch above runs here on a simulated Arduino Nano. Move the sliders for the sensors and buttons it reads, and watch the Serial monitor, display and outputs change.
Recalibrate DRY and WET; the values change with the probe and the cable length.
Soil type changes the reading. Calibrate in the pot's own soil for best results.
Some touch modules are toggle mode; set the module to momentary or read the change instead.
Yes, add a relay and a small 5 V pump; see the garden timer project.
Saving power matters on batteries, and a dark screen is nicer at night.
Up to the printed line only; the electronics above it must stay dry.
11 parts: Nano CH340 Development Board (Soldered), Capacitive Soil Moisture Sensor – 3.3V/5V Analog Output, PH2.54-3P Interface, HS-S43A Touch Sensing Sensor Module – PH2.0 Terminal, Switch/Button Mode, 0.96" OLED Display 128x64, Through-Hole LED Pack (Pack of 10), Resistor Assortment Kit (30 Values), Generic Soil Moisture Sensor Hygrometer Module – Analog/Digital Output, Generic HS-S43P Touch Button Module – Capacitive Touch Sensor, PH2.0 Connector, Generic Portable Handheld 0-32% Brix Refractometer with Plastic Box – Dual Scale (Brix & Wort SG), Solderless Breadboard, plus 1 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 1 hour. The build on this page has 5 steps.
No. This page has the complete, tested code (plant_reminder.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 ₹1,458 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Calibrating an analog sensor to percent; Why capacitive probes last longer than resistive ones; Using a touch module as a button.
Keep the electronics above the pot; water and USB ports do not mix.
Ideas that reuse this build: Raspberry Pi relay HAT garden timer. 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.
308 -> 88 % 306 -> 89 % 307 -> 88 % 307 -> 88 % 307 -> 88 % 308 -> 88 % 306 -> 89 % 307 -> 88 % 308 -> 88 %
A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.