What's up
The project is all about an integration effort of an ESP32-connected weight detection machinery to an online service to unlock possibilities like remote monitoring and alerting. To elucidate, think of remotely monitoring your gas cylinder's fuel level and getting alerted whenever the level drops below a custom-defined threshold.
The project consists of 3 independent network-connected modules:
- ESP32 Module: Consists of a weight measurement component (HX711); thereby collects the weight information at regular intervals and publishes them to the remote server through an API
- Server and Data Module: Responsible for persisting data in a database and processing them upon CRUD requests. Exposes an API to which the ESP32 and the application connect.
- Application Modules: Essentially a client application (Android, iOS, web or whatever) which allows for user input, monitoring and alerting. Provides interfaces for initializing tracking of a new fuel container, setting a custom condition-based alert, displays level information, receives push notifications upon condition being satisfied.
How do you measure the weight
A load cell is a simple piezo-electric device which is designed to measure pressure (or more precisely changes in pressure) through it's bend ratio. Upon change of weight of the payload, the bend change is captured in terms of changes in the electrical signal proportionally. Therefore once we calibrate the load cell to find its "factor" against a standard weight, any weight within the manufacture range can be quite precisely measured applying simple ratios. Now, HX711 is a simple amplifier magnifying this electrical input from this load cell thereby making it available to boards to interpret and process it furthur. We experimented with collecting the results on both Arduino Uno and ESP32.
Connection of load cell โ HX711 โ Arduino
Connection of load cell โ HX711 โ ESP32
Hardware Setup
Load Cell Configuration
The load call would support a weight plate on one of its ends perpendicular to its length; while other end would be fixed to a base.
Complete picture - with Arduino Uno
Complete picture - with ESP32
HX711 โ ESP32 Connection Diagram

Application Mock Screens
Template Designs
Functionality Details
How do you set up a new gas cylinder device?
To start monitoring the newly fitted ESP32-connected gas cylinder, we need to help that ESP32 connect the network (obviously through WiFi). To help it connect to WiFi, we have one obvious option:
Hardcode the WiFi SSID and password into the ESP32 source code (stupid)- Send it over some medium from the client to the ESP32
And, to accomplish this, we use Bluetooth Low Energy (BLE) to establish the connectivity between the client (say the phone here) and ESP32. So we come quite closer to the ESP32 (maximum range of BLE is 100m). This is a beautiful part in itself as the ESP32 then helps us see which all wireless networks it can see. And then we choose the network and send the SSID and password serially to the ESP32 which should next remember them in its flash memory (some boilerplate code here). So, the ESP32 now can connect the network ๐.
What's the logic of level-based alerting?
The app provides the interface to input a custom level at which the user wants to be alerted - could be say 75% or 33% or 1%. We need to address multiple challenges here:
- A user might have set up multiple gas cylinders against a single account, and we'd have to send the notification of each of the owned devices to the same phone
- How frequently should the modules poll amongst each other? How closely should the ESP32 update the remote server about the weight measured? How soon should the app check back from the server whether it has crossed the threshold or not?
- Based on this frequency of polling, how do we ensure that the level doesn't get missed from being recorded (say the level falls too rapidly), also how do we maintain a state of whether a custom alert notification has been successfully delivered or not?
What are some possibilities and optimizations to look at?
- Potentially building a logic to make sure the server and ESP32 learns how frequently to poll for data. This helps optimize scale to a judicious API callout.
- How do we handle reads (load cell or HX711 misbehaving) or stale data (ESP32 offline)?
- Building a marketplace around the concept, what if the app could automatically book a refill from a local vendor!










