An introduction to electronic weighing
Weighing In
Create your own weighing device with easily available components and open source software.
In this article, I discuss the design of a compact and portable workshop balance for various single-load-cell weighing applications constructed with a small load cell, an instrumentation amplifier, an excitation supply, a microcontroller, a display, and a serial port for debugging. Throughout, I used Linux and open source software, and I provide code samples, with directions for finding the complete code online.
History
Ancient civilizations used simple balances to compare weights for trading in precious metals, spices, salt, and the like. Today's civilization is no less dependent on knowing the weight of objects. It is hard to imagine a day in which the knowledge of weight does not take part: from the morning visit to the bathroom scales, a trip to the supermarket, baking a cake, to weighing baggage at the airport – the list of times weight plays a part in our lives seems endless. Today, we've moved away from mechanical balances, for the most part, obviating the need for ready reference weights.
Today's weighing equipment is usually based on electronic signals from strain gauges. These sensors are thin-film resistors whose resistance varies in response to tension or compression. When bonded to a mechanical structure subject to the force of an applied mass, the resistance of a strain gauge will change proportionally in response. Practical weighing systems use more than one strain gauge, and these are generally bonded to a metallic billet in a controlled manner to form a more complex electrical circuit designed to eliminate nonlinearities and temperature effects. These billets are known as load cells and are available commercially with working ranges from a few grams to hundreds of tonnes.
Load cells (Figure 1) are built into the structures of complete weighing systems such as scales, weighbridges, hoists, and counting scales in such a way that they can be replaced easily should the need arise. Although load cells are transducers with no moving parts, of course they do deflect slightly under load, and that allows mechanical endstops to be used to limit the deflection and protect the cell from overload. It should be noted that larger weighing machines such as weighbridges will employ more than one load cell, a typical arrangement being a rectangular platform with a load cell at each corner. The signals from each load cell are summed electronically to provide a total weight. Often, a range of load cells of different capacities will share the same basic billet, machined in different ways.
Load Cell Operation
In most load cells, four strain gauges are employed – two in tension and two in compression – in a symmetrical manner to eliminate temperature effects (Figure 2). The strain gauges are arranged into a Wheatstone bridge (Figure 3).
A strain gauge is a sensor whose resistance varies with applied force, so that if you can measure resistance, you can measure that force. The conducting material (often constantan) is deposited onto an insulating substrate such as polyimide. The conductor is designed in a serpentine shape (Figure 4) such that extension by applied force in the longitudinal direction is much higher than that in the lateral direction. This arrangement reduces sensitivity to off-axis load. Pads are provided at the ends of the conductor so that lead-out wires may be soldered or otherwise bonded to them.
The Wheatstone bridge requires a voltage across it to provide an output, and that voltage is called the excitation voltage. The output of the bridge is a differential, which slightly complicates the electronics, as you will see later. At zero load, the difference between the two outputs should be zero, and as load is applied, one arm will go positive while the other goes negative. The differential output at full scale is measured in millivolts per volt (mV/V) (i.e., a ratio of output versus the excitation voltage). Excitation voltages are generally in the range of 5V to 20V, and a typical load cell might have an output of 2mV/V, making 20mV output at full scale for 10V excitation. From this, it can be seen that you are dealing with very small voltages, especially when you require high precision. The upside of this arrangement is that much the same electronics can be applied to a wide variety of different weighing applications, because the load cell's maximum output will be similar in all cases.
The nominal resistance of the strain gauges is on the order of a few hundred ohms, so a bridge made up of four 400-ohm gauges will have a resistance (R) of 400 ohms, as seen by the excitation supply; thus, it can be see that some power is required to excite the load cell, which can be a challenge for battery-operated systems. In this case, lowering the excitation voltage saves power at the expense of full-scale output and, ultimately, precision. Although increasing the excitation voltage might seem attractive from the point of view of increasing load cell output, there comes a point when the strain gauges will self-heat, causing local expansion of the load cell billet and the attendant inaccuracy.
In a little more detail, the output of the load cell can be calculated in the following manner: V-=R2/(R1+R2) x Vex, whereas V+=R3/(R3+R4) x Vex, so the differential output voltage is:
Tare and Span: Calibration
One factor that must be considered when choosing a load cell for an application is tare, which refers to the weight of any structure supported by the load cell before any object to be weighed is placed on it. This tare might be the mixing bowl on a kitchen scale before ingredients are added or the platform required to support a multitonne truck on a weighbridge. Tare can represent a large portion of the ultimate full-scale range of a system and must be taken into account at the design stage.
Further removal of tare is sometimes required during normal operation: Again, using the example of a weighbridge on which a truck is to be loaded with goods, the initial zero point would be with the weighbridge empty. Once an empty truck is driven onto the weighbridge, it is convenient to again "zero" the weight display so that as goods are added to the truck, the display reflects what has been added, without the complication of the truck's tare. In the case of a weighing system designed to dispense ingredients in a fixed ratio (batch weighing) into a vessel (e.g., flour, water, yeast, and sugar in a bakery), the tare may be reset several times as the batch is assembled with the different ingredients.
"Span" is the term used to describe the full range of a weighing machine. The desired span is application dependent, and the load cell(s) must be chosen to have sufficient capacity for the required span plus tare, as described above. The stated output of the load cell at full scale is generally a nominal figure only, meaning the instrument must be calibrated before use at intervals during its operational life because of various mechanical and temperature effects. For a small instrument, this is a simple undertaking, reference weights being readily available at varying levels of precision from commercial sources [2], some of which can be traced back to national and international standards bodies.
For larger systems, calibration can be a complex and expensive exercise because you have no way to avoid the use of dead weights for calibration, and moving such weights around is time consuming and expensive.
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
-
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.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.