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
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.