An introduction to electronic weighing
Precision
Precision of a weigh scale is often quoted in "counts." For example, in a machine designed to weigh up to 10kg at 10,000 count precision, the least significant digit would represent 1g. In reality, precision at this level is difficult to achieve and often not required. If the load cell in such a machine has an output of 10mV at full scale, one count is represented by 1µV. Such low-level signal changes can be difficult to detect, especially in the presence of electrical noise and, indeed, vibration from the surrounding environment, which can render the weight signal unstable to begin with. Long-term stability of the load cell itself (known as creep), temperature effects, and tiny voltages generated between dissimilar metals in the wiring between the load cell and the amplifier can all contribute to errors in measurement and mandate regular calibration of the machine, especially if it is used at a point of sale. In these cases, various regulatory bodies [3] enforce calibration intervals to ensure customers get what they pay for.
Workshop Weighing System
As an example design, I wanted to produce something compact and portable that might prove useful in my workshop. I found a small load cell, freely available on eBay.com or other online sources, with a capacity of 100g (3.5oz) at low cost. The load cell is physically quite small (5x1x0.6cm) and easy to mount, and at such low capacity, it is easy to assemble into a plastic enclosure to produce a practical instrument. The load cell is one of a family of force transducers, so it would be easy to adapt the design to weigh heavier items for different applications.
The electronic design comprises four basic elements: an instrumentation amplifier, an excitation supply, a microcontroller, and a display.
Analog Front End
A number of application-specific integrated circuits are available for weigh scale applications that comprise a differential instrumentation amplifier and a 24-bit sigma-delta analog-to-digital converter (ADC). Some of these integrate other functions, such as an excitation regulator, but in essence, they perform the same task.
One of the most popular of these ADCs for weigh scales is the HX711 [4] from Avia Semiconductor, a Chinese company. It is readily available from Alliexpress.com and eBay.com, both as a bare chip and mounted on a simple printed circuit board (PCB). I assume this chip forms the basis of many of the kitchen scales and the like manufactured in China. I did some initial prototyping with this chip, and it seems very capable. Certainly, if you want to hook up a load cell to an Arduino or a Raspberry Pi, the datasheet provides example drivers in C and assembler, and you can get something up and running in a few minutes.
An alternative part from a more established manufacturer is the ADS1232 [5] from Texas Instruments. This part is available through more traditional distribution, such as mouser.com and digikey.com. The datasheet (and associated application notes) is somewhat more detailed, with an application circuit provided for a weigh scale. The ADS1232 lacks the excitation regulator of the HX711, but that in itself has some limitations, and a separate excitation regulator is not difficult to implement and is more flexible and potentially more stable. Interestingly, both of these chips have a very similar digital interface, suggesting they share a common heritage.
My choice for this design was the somewhat more expensive ADS1232 with a separate excitation regulator implemented with a REF5040 [6] (also from Texas Instruments), a high-stability reference supply chip capable of supplying 4V at 10mA directly to the load cell.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Linux Kernel 6.13 Offers Improvements for AMD/Apple Users
The latest Linux kernel is now available, and it includes plenty of improvements, especially for those who use AMD or Apple-based systems.
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.