ESP32-Based Digital Weighing Scale Using 50kg Load Cell, HX711 Module and 16x2 LCD Display

ESP32 Digital Weighing Scale | 50kg Load Cell + HX711 Tutorial – MakeMindz
⚖️ IoT Project Tutorial

ESP32 Digital Weighing Scale
50kg Load Cell + HX711 + LCD

Build a compact, battery-powered smart scale with real-time LCD display and optional Wi-Fi IoT monitoring. Covers wiring, calibration, and Arduino code.

ESP32-WROOM-32 HX711 24-bit ADC I2C LCD 16×2 18650 Battery Intermediate Level

1Project Overview & How It Works

This smart weighing system uses the ESP32-WROOM-32 microcontroller paired with the precision HX711 24-bit ADC to read measurements from a 50kg load cell and display real-time weight values on a 16×2 I2C LCD — all powered by a single 18650 Li-ion battery.

① Load Detection
50kg load cell converts mechanical force into a millivolt-level analog signal using strain gauges.
② Amplify & Convert
HX711 amplifies the signal and converts it to 24-bit digital data sent over a 2-wire protocol.
③ Process (ESP32)
ESP32 reads digital values, applies calibration factor, converts to kg/g units.
④ Display Output
16×2 LCD via I2C shows live weight and status messages with only 2 data wires.

2Components Required

🔲
ESP32-WROOM-32
1× Development Board
⚖️
50kg Load Cell
1× Strain Gauge Sensor
🔬
HX711 Module
1× 24-bit ADC Amplifier
🖥️
16×2 LCD + I2C
1× with PCF8574 adapter
🔋
18650 Li-ion Battery
1× 3.7V Cell
🔌
Rocker Switch
1× Power ON/OFF
🔩
Resistors
10kΩ × 2, 1kΩ × 2
🔗
Jumper Wires
Male-to-Male set
💡
Make sure your 16×2 LCD already has the I2C backpack module (PCF8574) soldered on. This reduces wiring from 6+ pins to just 4 (VCC, GND, SDA, SCL).

3Circuit Diagram & Wiring

🔌 Full Circuit Diagram — ESP32 + HX711 + Load Cell + I2C LCD
ESP32 DIGITAL WEIGHING SCALE — CIRCUIT DIAGRAM 50kg LOAD CELL E+ E− A+ A− Strain Gauge HX711 MODULE E+ E− A+ A− VCC GND DT SCK HX711 24-bit ADC ESP32-WROOM-32 Wi-Fi + BLE Xtensa LX6 240MHz 520KB SRAM 3.3V GND GPIO4 GPIO5 GPIO21 GPIO22 VIN GND 3.3V GND DT→GPIO4 SCK→GPIO5 16×2 LCD (I2C) SDA · SCL · VCC · GND SDA SCL SDA SCL POWER 18650 3.7V Rocker SW WIRE LEGEND Load Cell Excitation+ Load Cell Excitation− Signal+ / SCL Signal− / SDA Power (3.3V / VIN)

📊 Wiring Reference Table

ModulePinESP32 / TargetWire Color
Load CellE+HX711 E+ Red
Load CellE−HX711 E− Black
Load CellA+HX711 A+ Green
Load CellA−HX711 A− White
HX711VCCESP32 3.3V Red
HX711GNDESP32 GND Black
HX711DT (Data)GPIO 4 Blue
HX711SCK (Clock)GPIO 5 Purple
I2C LCDVCCESP32 3.3V Red
I2C LCDGNDESP32 GND Black
I2C LCDSDAGPIO 21 Cyan
I2C LCDSCLGPIO 22 Green
Battery+ PositiveRocker Switch → VIN Red
Battery− NegativeESP32 GND Black

4Step-by-Step Assembly Guide

1

Mount the Load Cell

Secure the 50kg load cell to a rigid base plate. The cell must be fixed at one end (load side) and mounted at the other end. Ensure it is horizontal and level for accurate readings.

2

Connect Load Cell to HX711

Wire the four load cell leads to HX711: Red → E+, Black → E−, Green → A+, White/Yellow → A−. These are the excitation and signal lines for the Wheatstone bridge.

3

Wire HX711 to ESP32

Connect HX711 VCC to 3.3V, GND to GND, DT to GPIO4, and SCK to GPIO5. The HX711 uses a custom 2-wire serial protocol, not standard SPI or I2C.

4

Connect I2C LCD Display

Wire the 16×2 LCD (with I2C backpack): VCC → 3.3V, GND → GND, SDA → GPIO21, SCL → GPIO22. Note the default I2C address for PCF8574 is 0x27 or 0x3F.

5

Add Power Circuit

Connect the 18650 battery positive terminal through the rocker switch to ESP32 VIN. Connect the battery negative to GND. The rocker switch provides safe ON/OFF control.

6

Upload and Calibrate

Upload the sketch below. Open Serial Monitor at 115200 baud. Place a known weight on the scale, note the raw HX711 value, then calculate and set your calibration factor: calibration_factor = raw_reading / known_weight_kg.

7

Test and Verify

Power on with the rocker switch. The LCD should show "Initializing..." then display live weight in kg. Test with known weights (500g, 1kg, 5kg) to verify accuracy. Adjust calibration factor if needed.

⚠️
Calibration Note: Always perform a tare (zero) calibration with an empty scale before measuring. The calibration factor varies per load cell unit — always calibrate with a known reference weight.

5Arduino Code

📦
Install these libraries via Arduino IDE → Library Manager: HX711 by bogde, LiquidCrystal_I2C by Frank de Brabander.
C++ / Arduino · esp32_weighing_scale.ino
/* * ESP32 Digital Weighing Scale * MakeMindz.com — makemindz.com/2026/02/esp32-based-digital-weighing-scale.html * * Hardware: ESP32-WROOM-32, HX711, 50kg Load Cell, * 16x2 I2C LCD, 18650 Battery, Rocker Switch * * Connections: * HX711 DT → GPIO4 | HX711 SCK → GPIO5 * LCD SDA → GPIO21 | LCD SCL → GPIO22 */ #include <HX711.h> #include <Wire.h> #include <LiquidCrystal_I2C.h> // ── Pin Definitions ────────────────────────────────────────── #define HX711_DT_PIN 4 // HX711 Data pin #define HX711_SCK_PIN 5 // HX711 Clock pin #define LCD_I2C_ADDR 0x27 // Try 0x3F if display is blank #define LCD_COLS 16 #define LCD_ROWS 2 // ── Calibration ────────────────────────────────────────────── // Adjust this factor for your specific load cell. // Formula: calibration_factor = raw_value / actual_weight_kg float calibration_factor = -7050.0; // ── Object Instances ────────────────────────────────────────── HX711 scale; LiquidCrystal_I2C lcd(LCD_I2C_ADDR, LCD_COLS, LCD_ROWS); // ── Setup ──────────────────────────────────────────────────── void setup() { Serial.begin(115200); Serial.println("ESP32 Digital Weighing Scale — MakeMindz"); // Initialize LCD lcd.init(); lcd.backlight(); lcd.setCursor(0, 0); lcd.print("MakeMindz Scale"); lcd.setCursor(0, 1); lcd.print("Initializing..."); // Initialize HX711 scale.begin(HX711_DT_PIN, HX711_SCK_PIN); scale.set_scale(calibration_factor); scale.tare(); // Reset scale to zero delay(2000); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Weight:"); Serial.println("Scale ready. Place object on platform."); } // ── Main Loop ──────────────────────────────────────────────── void loop() { if (scale.is_ready()) { float weight_kg = scale.get_units(5); // Average of 5 readings // Clamp negative noise to zero if (weight_kg < 0) weight_kg = 0; // Display on LCD lcd.setCursor(0, 1); lcd.print(" "); // Clear line 2 lcd.setCursor(0, 1); if (weight_kg < 1.0) { // Show grams if under 1kg lcd.print((int)(weight_kg * 1000)); lcd.print(" g"); } else { lcd.print(weight_kg, 3); lcd.print(" kg"); } // Serial output for calibration Serial.print("Weight: "); Serial.print(weight_kg, 3); Serial.println(" kg"); } else { Serial.println("HX711 not found. Check wiring."); lcd.setCursor(0, 1); lcd.print("Sensor Error!"); } delay(500); } // ── Calibration Helper (run once, then comment out) ────────── void calibrate() { Serial.println("Starting calibration mode..."); scale.set_scale(); scale.tare(); Serial.println("Tare done. Add 1kg and wait..."); delay(5000); long raw = scale.get_value(20); Serial.print("Raw reading: "); Serial.println(raw); Serial.print("Set calibration_factor = "); Serial.println(raw / 1.0); // Divide by weight in kg }

7Simulation Links

Run and test this project online before building hardware. Use the links below for interactive circuit simulation:

ℹ️
How to use: Copy the diagram.json above → Open CirkitDesigner → New Project → Import JSON → Run simulation. The HX711 simulation allows you to manually input weight values to test LCD output.

8Possible Enhancements

☁️
Wi-Fi Cloud Upload
Send weight data to ThingSpeak, Blynk, or your own MQTT broker via ESP32 Wi-Fi.
📱
Mobile App Monitoring
Use Blynk or MIT App Inventor to build a custom mobile dashboard for live weight tracking.
🔋
Battery Level Display
Use ESP32 ADC to monitor 18650 voltage and show battery % on the second LCD row.
💾
SD Card Logging
Log timestamped weight readings to a microSD card using the SPI interface for data analysis.
🔔
Weight Threshold Alert
Add a buzzer or LED that triggers when weight exceeds a set limit — great for safety systems.
😴
Deep Sleep Mode
Use ESP32 deep sleep between measurements to extend battery life from hours to days.

© 2026 MakeMindz.com — Electronics & IoT Tutorials. All rights reserved.

ESP32 · Arduino · IoT · Robotics · Sensors · LoRa

Comments

try for free