Next Builder
Published © CC BY-NC-SA

DIY Nirmal Weight Scale for Kitchen

The DIY Nirmal Weight Scale is a compact and accurate kitchen tool designed in Fusion 360. Perfect for smart, DIY-style cooking!

IntermediateFull instructions provided2 hours509
DIY Nirmal Weight Scale for Kitchen

Things used in this project

Hardware components

DFRobot FireBettle ESP32-C6
×1
DFRobot HX711 With Weight Sensor
×1
DFRobot 1602 LCD Display
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×1
Rocker Switch, VISI-ROCKER
Rocker Switch, VISI-ROCKER
×1
Polymer Lithium Ion Battery - 2200mAh 3.7V
Seeed Studio Polymer Lithium Ion Battery - 2200mAh 3.7V
×1

Software apps and online services

Arduino IDE
Arduino IDE
Fusion
Autodesk Fusion

Hand tools and fabrication machines

DFRobot TS80P Soldering Iron

Story

Read more

Custom parts and enclosures

Base

Sketchfab still processing.

Pan

Sketchfab still processing.

Bottom Cover

Sketchfab still processing.

Schematics

Connection Of HX711 with Load Cell

Code

Code

C/C++
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <HX711.h>
#include <EEPROM.h>

#define DT 2  // HX711 Data Pin (A1)
#define SCK 3 // HX711 Clock Pin (A2)
#define CALIBRATION_BUTTON 4 // D3 (Calibration)
#define TARE_BUTTON 5 // D9 (Tare)

HX711 scale;
LiquidCrystal_I2C lcd(0x27, 16, 2);

float calibrationFactor;
bool isCalibrating = false;

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

    pinMode(CALIBRATION_BUTTON, INPUT_PULLUP);
    pinMode(TARE_BUTTON, INPUT_PULLUP);

    scale.begin(DT, SCK);
    while (!scale.is_ready()) {
        Serial.println("HX711 not detected, retrying...");
        delay(1000);
    }

    // Load calibration factor from EEPROM
    EEPROM.get(0, calibrationFactor);
    if (calibrationFactor == 0 || calibrationFactor == 255) {
        calibrationFactor = 2280.0;  // Default value, change based on testing
    }
    scale.set_scale(calibrationFactor);
    scale.tare();  // Reset to zero

    lcd.begin();
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Weight Scale");
    delay(2000);
    lcd.clear();
}

void loop() {
    if (digitalRead(CALIBRATION_BUTTON) == LOW) {
        calibrateScale();
    }

    if (digitalRead(TARE_BUTTON) == LOW) {
        scale.tare();
        Serial.println("Tare set to zero");
        lcd.clear();
        lcd.setCursor(0, 0);
        lcd.print("Tared!");
        delay(1000);
        lcd.clear();
    }

    float weight = scale.get_units(5);
    lcd.setCursor(0, 0);
    lcd.print("Weight: ");
    lcd.print(weight, 2);
    lcd.print(" g");

    delay(500);
}

// Calibration Function
void calibrateScale() {
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Calibrating...");
    delay(2000);

    Serial.println("Place 500g weight on scale...");
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Put 500g & wait");

    delay(5000); // Wait for user to place 500g weight

    float rawValue = scale.get_units(10);
    calibrationFactor = rawValue / 500.0; // Compute new factor
    EEPROM.put(0, calibrationFactor); // Save in EEPROM
    scale.set_scale(calibrationFactor);

    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Calibration Done!");
    delay(2000);
    lcd.clear();
}

Credits

Next Builder
13 projects • 20 followers
Student

Comments