กลับไปหน้ารวมไฟล์
electronic-weighing-machine-96f635-en.md

I want to know about the electronic components weight. So I decided to do my own weighing machine :)

To do that you have to download some libraries which are listed below

LiquidCrystal_PCF8574

Wire

HX711

Micro-Voltage Physics: Electronic Weighing Machine

If you attach a piece of metal to an Arduino analog pin, you get nothing. When you place a 1-pound weight on a block of Aluminum, the metal physically bends by an invisible fraction of a millimeter. The Electronic Weighing Machine project uses strain-gauges to literally measure that microscopic atomic stretching! Because the voltage change is barely 0.0001 Volts, it requires the legendary HX711 24-Bit ADC to rip the reading into the digital realm!

The HX711 24-Bit Amplifier Engine

The Arduino's internal 10-bit ADC is a complete joke for this task (it only sees 1024 steps). The HX711 sees 16 Million Steps!

  1. The Load Cell uses 4 wires (usually Red, Black, White, Green), comprising a physical Wheatstone bridge.
  2. The Arduino connects to the HX711 via two distinct pins: DT (Data) and SCK (Clock).
  3. The <HX711.h> library abstracts the terrifying synchronous serial timing arrays.
scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
scale.set_scale(2280.f); // The required mathematical calibration factor!
scale.tare();            // Zero out the scale, resetting the EEPROM weight!

float currentWeight = scale.get_units(10); // Take exactly 10 high-speed averaged readings!

Connect all components as per the circuit diagram.

Metrology Base Components

  • Arduino Uno/Nano (Standard architecture).
  • HX711 Load Cell Amplifier Board (Do not swap data pins, the protocol is extremely strict).
  • Aluminum Bar Load Cell (1kg, 5kg, or 20kg variants. You must bolt it physically between two rigid wooden boards in a 'Z' shape, or it will not bend and the readings will stay at zero!).
  • I2C 16x2 LCD for displaying the fractional gram readouts!

Programming part is critical

1. Calibration

Calibrating the Aluminum Physics

A brand new Load Cell does not output "Grams." It outputs massive, chaotic raw vector integers like -845601.

  • The Calibration Sequence:
  • You must write a specific "Calibration Sketch" first. Place exactly 100 grams of known dead-weight on the sensor.
  • The Serial Monitor reads 500000. You mathematically divide 500000 / 100 = 5000.
  • The number 5000 becomes your permanent calibration_factor! Without this exact mathematical constant, your scale is a random number generator!

In Calibration open the calibration sketch upload with out any load on the tray. Then put some known weight element then open serial port increment or decremented the calibration factor util you see the known value.

For example if you put 250gram weight, on first time it will give 400 gram or 1kg before calibration.. You use a, s, d, f or z, x, c, v keys to correct the calibration level until you get 250 grams from 400gram or 1kg. Then just note down the calibration factor.

2. Actual Sketch

Put the calibrated value xxxxxxx on this line and upload thats all....

scale.set_scale(xxxxxxx);

3. To reset the tare value I use one push button.

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x Arduino IDE"
author: "boaz"
category: "Sensors & Environment"
components:
  - "1x Standard LCD - 16x2 White on Blue"
  - "1x I2C LCD Module"
  - "1x 3Kg Load Cell"
  - "1x Arduino UNO"
description: "Micro-gram kinematic distortion arrays! Extract terrifyingly microscopic voltage differences from physical Wheatstone-bridge aluminum load cells using the HX711 24-bit amplifier to build absolute precision analytical scales."
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles:
  - "https://projects.arduinocontent.cc/5466ce32-b166-43de-b0ba-1cb07af40b1e.ino"
encryptedPayload: "U2FsdGVkX1/l5l/4yuLYFhxORr1G5ezTgSsbrXR61IjE7DA30Ae/rRbuAGO3bXbrY9Gb5zkYSOPpVZr7mVu8WoOGMJ61i4zJ+jwZsSlbCKQ="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/electronic-weighing-machine-96f635_cover.jpg"
lang: "en"
likes: 26
passwordHash: "1613e52d1aef287280a0eb21c40ae05201db288bc98570051811b7fe08634af0"
price: 1120
seoDescription: "Build an Electronic Weighing Machine using Arduino Uno and a 3 kg 5-wire Load Cell. Accurate DIY weighing scale project guide."
tags:
  - "embedded"
  - "smart appliances"
  - "transportation"
title: "Electronic Weighing Machine"
tools: []
videoLinks:
  - "https://www.youtube.com/embed/zIHzsi0_1bE"
views: 42474