LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsFine dust (PM2.5) from sanding, cutting MDF or laser work stays in the air and reaches deep into the lungs. The SN-3002-PM-N01 is a wall-mount laser particle sensor with RS485 Modbus output. The ESP32 reads PM2.5 and PM10 and shows a simple level. A tiny MP1584 buck converter steps the sensor's 12 V supply down to 5 V for the ESP32, so one adapter powers everything. RS485 sensors from different makers use different default addresses, baud rates and register numbers. The values in the sketch are typical defaults; check them against the manual that came with your sensor before you rely on the readings.
A monitor does not protect you; use dust extraction and a proper mask for sanding and cutting.
Tick anything you already have and the total updates.
SN-3002-PM-N01 RS485 PM sensor
Follow the colours: red is power, dark grey is ground, blue is a signal.
12 V adapter; the MP1584 makes 5 V for the ESP32 (set it with a meter first).
rs485_pm.inoVerify & upload in Electrolark#include <ModbusMaster.h>
#include <Adafruit_SSD1306.h>
// From the sensor's manual: address, baud and the register to read
const uint8_t ADDR = 1;
const long BAUD = 4800;
const uint16_t REG = 0x0000; // PM2.5 and PM10 in ug/m3; check which registers your manual lists
const float SCALE = 1;
ModbusMaster node;
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
const int DE_RE = 4;
void preTx() { digitalWrite(DE_RE, HIGH); }
void postTx() { digitalWrite(DE_RE, LOW); }
void setup() {
Serial.begin(115200);
Serial2.begin(BAUD, SERIAL_8N1, 16, 17); // RX, TX to the MAX3485
pinMode(DE_RE, OUTPUT); postTx();
node.begin(ADDR, Serial2);
node.preTransmission(preTx);
node.postTransmission(postTx);
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C);
}
void loop() {
uint8_t r = node.readHoldingRegisters(REG, 10);
oled.clearDisplay(); oled.setTextColor(WHITE); oled.setTextSize(2); oled.setCursor(0, 10);
if (r == node.ku8MBSuccess) {
int pm25 = node.getResponseBuffer(4), pm10 = node.getResponseBuffer(9); // positions from the manual
oled.print("2.5:"); oled.println(pm25);
oled.print("10: "); oled.println(pm10);
oled.setTextSize(1); oled.print(pm25 < 60 ? "OK" : pm25 < 120 ? "Open the door" : "Mask on, extract dust");
} else {
oled.setTextSize(1); oled.print("No reply, code "); oled.print(r, HEX);
}
oled.display();
delay(2000);
}
Check the address, baud and A/B wires; swapping A and B is the most common fix.
Timeout or bad frame: the baud rate is wrong or DE/RE is not wired to GPIO4.
Your sensor keeps PM2.5 in a different register; print the whole buffer and compare with the manual.
India's 24-hour PM2.5 standard is 60 ug/m3; short peaks while sanding can go far higher.
No, it measures fine particles; big chips fall out of the air quickly.
It is tiny and efficient; any 5 V buck converter that handles 12 V in works.
8 parts: SN-3002-PM-N01 (485) Air Quality Detector Sensor, Wall-Mount, 0-2000 µg/m³ Range – RS485/4-20mA/0-10V Output, MAX3485 TTL to RS485 Converter Module – 3.3V Logic, ESP32-WROOM-32 38-Pin Development Board, 0.96" OLED Display 128x64, Mini Buck Converter (MP1584 / Mini360), 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 (rs485_pm.ino).
About ₹4,819 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
What PM2.5 and PM10 mean; Reading several Modbus registers in one request; Using an adjustable mini buck converter.
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.