IoTIntermediatePRJ-145

IoT Smart LPG Cylinder Booking Alert Using ESP8266

Weighs your gas cylinder and alerts your phone when it is time to book a refill.

Built and tested by Drisya K S · Industrial Robotics Institute

ESP8266 NodeMCU

Arduino IDE, Blynk IoT app, HX711 library (bogde)

LevelIntermediate
Build time3–4 hours
BoardESP8266 NodeMCU
Parts8 components

What is the IoT Smart LPG Cylinder Booking Alert?

A smart LPG monitor that prevents running out of gas. The cylinder stands on a load cell; the ESP8266 reads its weight through an HX711 amplifier and sends it to the Blynk app. When the weight drops below the threshold, the buzzer and LED turn on and the app shows "Gas Low – Book Cylinder".

How it works

  1. The load cell under the cylinder measures its weight via the HX711 amplifier.
  2. The ESP8266 sends the weight to Blynk V1 every second.
  3. If the weight is below the threshold, the buzzer and LED turn on.
  4. The status "Gas Low – Book Cylinder" or "Gas Level Normal" is sent to V2.

Parts list

ComponentQty
ESP8266 NodeMCU1
Load Cell (weight sensor)1
HX711 Load Cell Amplifier1
Buzzer1
LED (optional)1
Resistor 220Ω1
Jumper Wires / BreadboardAs needed
Power Supply1

Software

  • Arduino IDE
  • Blynk IoT app
  • HX711 library (bogde)

Wiring and connections

FromConnect to
Load cell wiresHX711 E+/E−/A+/A−
HX711 VCC5V (VIN)
HX711 GNDGND
HX711 DTD2
HX711 SCKD3
Buzzer +D5
Buzzer −GND
LED + (via resistor)D6
LED −GND

How to build the IoT Smart LPG Cylinder Booking Alert

  1. Mount the load cell between two plates so the cylinder can stand on it.
  2. Connect the load cell to the HX711, and the HX711 DT/SCK to D2/D3.
  3. Connect the buzzer to D5 and the LED to D6.
  4. Calibrate: weigh a known object and set the scale factor in set_scale().
  5. In Blynk, create datastreams V1 (weight) and V2 (status) with a gauge and a label.
  6. Add your Blynk details and Wi-Fi, set the threshold for your cylinder, and upload.

IoT Smart LPG Cylinder Booking Alert code

Complete, tested Arduino C++ code for this project. Copy it into Arduino IDE and upload it to the ESP8266 NodeMCU.

#define BLYNK_TEMPLATE_ID "YourTemplateID"
#define BLYNK_TEMPLATE_NAME "LPG Monitor"
#define BLYNK_AUTH_TOKEN "YourAuthToken"

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include "HX711.h"

char ssid[] = "YourWiFiName";
char pass[] = "YourWiFiPassword";

#define DT  D2
#define SCK D3

HX711 scale;

int buzzer = D5;
int led = D6;

float weight;
float threshold = 5000;          // grams; adjust for your cylinder
float calibration_factor = 1.0;  // set after calibrating with a known weight

void setup() {
  Serial.begin(9600);

  scale.begin(DT, SCK);
  scale.set_scale(calibration_factor);
  scale.tare();                  // empty platform = zero

  pinMode(buzzer, OUTPUT);
  pinMode(led, OUTPUT);

  Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
}

void loop() {
  weight = scale.get_units(5);
  Blynk.virtualWrite(V1, weight);

  if (weight < threshold) {
    digitalWrite(buzzer, HIGH);
    digitalWrite(led, HIGH);
    Blynk.virtualWrite(V2, "Gas Low - Book Cylinder");
  } else {
    digitalWrite(buzzer, LOW);
    digitalWrite(led, LOW);
    Blynk.virtualWrite(V2, "Gas Level Normal");
  }

  Blynk.run();
  delay(1000);
}

Real-world uses

  • Home kitchens
  • Hotels and restaurants
  • Hostels and canteens
  • Learning load cells

Frequently asked questions

What is a IoT Smart LPG Cylinder Booking Alert?

A smart LPG monitor that prevents running out of gas. The cylinder stands on a load cell; the ESP8266 reads its weight through an HX711 amplifier and sends it to the Blynk app.

What components are needed for the IoT Smart LPG Cylinder Booking Alert?

You need: ESP8266 NodeMCU (1), Load Cell (weight sensor) (1), HX711 Load Cell Amplifier (1), Buzzer (1), LED (optional) (1), Resistor 220Ω (1), Jumper Wires / Breadboard, Power Supply (1). Software: Arduino IDE, Blynk IoT app, HX711 library (bogde).

Is the IoT Smart LPG Cylinder Booking Alert project good for beginners?

It is rated intermediate and takes about 3–4 hours to build, using the ESP8266 NodeMCU. The guide on this page explains every connection and step.

Where can I get the code for the IoT Smart LPG Cylinder Booking Alert?

The complete, tested Arduino C++ code is free on this page. Copy it into Arduino IDE and upload it to the board.

Can I buy a kit for the IoT Smart LPG Cylinder Booking Alert?

Yes. IRI sells a kit with the parts for this project (PRJ-145). Message IRI on WhatsApp at +91 86060 82634 for the kit price and delivery details.

Industrial Robotics Institute
Logo