LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsThe PT-928 is a submersible level transmitter: it sits at the bottom of a tank or well and measures water pressure, which rises 1 bar every 10 m. It sends the reading as a 4-20 mA current, the industrial standard that survives long cables. The WIN-IO-4AIM module reads up to four current or voltage inputs and makes them available over Modbus RTU on RS485. A USB to RS485 adapter connects that to a PC, where Python reads the register and converts it to metres.
Use a transmitter rated for drinking water if the tank holds drinking water.
Tick anything you already have and the total updates.
OULD PT-928 submersible level transmitter, 4-20 mA
WIN-IO-4AIM 4-channel analog to Modbus RS485
Follow the colours: red is power, dark grey is ground, blue is a signal.
One DC adapter powers the module and the current loop; keep within both parts' ranges.
tank_level.pyimport time
from pymodbus.client import ModbusSerialClient
PORT, BAUD, UNIT = "/dev/ttyUSB0", 9600, 1
REG = 0 # channel 1 register: check the WIN-IO-4AIM manual
RAW_4MA, RAW_20MA = 800, 4000 # register values at 4 and 20 mA: from the manual or measured
FULL_M = 5.0 # transmitter full scale in metres
c = ModbusSerialClient(port=PORT, baudrate=BAUD, parity="N", stopbits=1, bytesize=8, timeout=1)
c.connect()
while True:
r = c.read_holding_registers(REG, count=1, slave=UNIT)
if r.isError():
print("no reply:", r)
else:
raw = r.registers[0]
level = max(0.0, (raw - RAW_4MA) / (RAW_20MA - RAW_4MA) * FULL_M)
print(time.strftime("%H:%M:%S"), f"raw {raw} level {level:.2f} m")
time.sleep(2)
Swap A and B, and check address and baud rate.
The loop is open; measure the loop current with a multimeter in series.
The cable's vent tube is blocked or wet; keep its end dry and open.
A live zero at 4 mA shows the difference between empty and a broken wire.
Up to about a kilometre with twisted pair at 9600 baud.
Yes, with an RS485 module and a Modbus library, or skip Modbus with a 4-20 mA to 0-5 V board.
4 parts: OULD PT-928 Submersible Pressure Level Transmitter (0-10m Cable) – 4-20mA Output, Wittelb WIN-IO-4AIM 4-Port Analog Input to Modbus RS485 Converter (12-Bit), USB to RS485 Converter Adapter and DC Power Adapter (5.5x2.1mm). Tools: Digital Multimeter. On this page you can tick the parts you already have and add only the rest to your cart.
No. This page has the complete, tested code (tank_level.py).
About ₹12,345 for the parts at the prices on this page, plus tools if you do not have them. Quantity price breaks lower the cost when you build several.
How 4-20 mA loops work; Modbus RTU registers over RS485; Turning pressure into depth.
Use a transmitter rated for drinking water if the tank holds drinking 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.