Large cheap digital weight scale options and ideas - Page 1
Forum section: electronics / general

author: edy
author_rank: Super Contributor
timestamp: January 18, 2021, 03:56:07 am
content: I'm looking for a large digital weight scale, to be used for livestock and/or pet weight measurement. I've seen kits around where you have pressure sensors and build your own, which seems to be the cheapest way to go. So far I have been able to pick up an 80-90 lbs dog, step on a scale and subtract my weight. However, for larger sizes it is increasingly difficult to lift up the animal due to weight and the animal moving (and not allowing the digital scale to settle on a number).Is there some better method or inexpensive equipment I can buy or build that could accomplish this task? With a large scale bed I assume it would be easier to have the animal just stand on it. Can I convert a standard cheap scale into a large enough footprint for an animal to stand on? Could I get 4 cheaper lower-weight scales (e.g. max 50lb each) and place them under each foot of a 4-footed platform, and then add up the weights? Would this be accurate? Would that be cheaper than buying a digital pressure kit?I'm sure there are many ways to accomplish the task... some more practical than others, some using mechanical advantage (e.g. a class 1 lever with a crane scale), etc. If it wasn't for the fact that it was a live animal it would be much easier. Any ideas would be appreciated. This is just a project for fun. I was hoping there are very cheap pressure sensors that vary their resistance with pressure. I could get a platform, put one on each corner, then tie all 4 of them up in series and measure overall resistance calibrating them to known weights, then just plot a graph and then use the chart to estimate unknown weights.

author: bob91343
author_rank: Super Contributor
timestamp: January 18, 2021, 06:46:36 am
content: The idea of a platform with a few digital scales under it is a good one. However, this problem has been solved by the commercial scale manufaturers. You can contact them and ask.Building your own with pressure sensors and all seems the hard way to do this. There are factors you will discover when you test your design. I don't know what they are but certainly those problems always seem to arise. Such as dynamic readings - waiting for them to settle. And preventing the animal from moving for that time. And sometimes even getting the animal to get on the platform may be difficult. Taking the readings in four places at once is another issue.

author: edy
author_rank: Super Contributor
timestamp: January 18, 2021, 02:45:38 pm
content: Thanks. There is something like this available but too pricey and not worth my curiosity to buy just to know the weight of a dog:https://www.amazon.ca/dp/B07GL1TQMV/Then there is this kit which you can assemble once you have a base. The cost is better but the shipping is almost as much as the kit itself:https://www.ebay.com/itm/Livestock-Scale-Kit-for-Cattle-Hogs-Sheep-Goats-Pigs-Squeeze-Chutes-Pallet-scale/124186899047I think this is something I can afford to try out... If I can get my hands on 4 smaller strain gauge load cells, I can wire them up with an Arduino and get a reading that I can calibrate to give me the proper weight. This kit is cheap enough and has been used before... I see you can buy what essentially amounts to the components inside a regular bathroom scale, 4x50kg strain gauge load cells, for which the signal can be fed into an Arduino or RasPi. The components are cheap, but I have to come up with a physical platform to attach them to. It will allow up to 200 kg which is plenty:https://www.ebay.com/itm/4pcs-Weight-Sensor-50kg-Load-Cell-Half-bridge-Strain-HX711-AD-Amplifier-Module/182899653153Here is the Arduino instructable:https://www.instructables.com/Arduino-Bathroom-Scale-With-50-Kg-Load-Cells-and-H/I already have an Arduino, so all I need is this cheap $12.99 kit available to me in Canada:https://www.amazon.ca/CJRSLRB-Weighting-Arduino-Resistance-Half-Bridge/dp/B07RPLPVJT/[UPDATE:]Ordered the kit, meanwhile going to dust off my Arduino and get it running again, while I start looking around for a suitably rigid platform to build that I can attach the load cells to.I also found an old thread that may help:https://www.eevblog.com/forum/projects/using-multiple-strain-gauges-for-digital-scale/25/

author: bob91343
author_rank: Super Contributor
timestamp: January 18, 2021, 06:40:41 pm
content: How about using one of those ubiquitous pallets for loading merchandise?

author: RoGeorge
author_rank: Super Contributor
timestamp: January 18, 2021, 06:53:29 pm
content: Four (or maybe three) normal/kitchen weight scales under the corners of a cage/platform, with some food to make the livestock stay there long enough?

author: edy
author_rank: Super Contributor
timestamp: January 18, 2021, 07:15:21 pm
content: Thanks for the ideas. We have a dog crate, unfortunately it is now too small for the beast. He can't fit into there, although that would have been ideal. I have to get a large piece of firm plywood or a particle board or even a metal plate or platform from somewhere and build it around that, and settle the animal with some treats.I've been reading up on strain gauges and theory of operation and configurations. The kit I got has 4x half-bridge strain gauges, meaning each one has a common "input" wire (likely the RED) and then 2 other wires (BLACK/WHITE) which show opposite deflections of resistance (one is under compression, the other under tension). This provides 2x the nominal voltage difference across the divider (middle of the Wheatstone bridge) as compared to a single-strain sensor.The tutorials online and YouTube video below show how to wire 4 half-bridge sensors together without need for any other external resistors to a HX711 amplifier board to create the large voltage deflection required for an Arduino to read analog voltage changes.I'm trying to wrap my head around how exactly all of the strain gauges (8 of them distributed among the 4 half-bridges) along with all the wire connections (E+/E- input voltage and A+/A- sense voltage) actually work to create the proper voltage difference required so that they all work together to produce an overall weight/pressure sensor when they are mounted at the 4 corners of a platform.I found this YouTube video that explains the principle and the build:

author: bob91343
author_rank: Super Contributor
timestamp: January 18, 2021, 09:35:54 pm
content: I still think you are overthinking this project. Take one of those pallets and support it with three or four bathroom scales. Take a reading with the pallet on them and then coax the animal on to the pallet. Run around quickly and take the readings and then make the simple calculation to arrive at the answer.Repeat the process once or twice to get a feel for the likely error in the result.

author: David Hess
author_rank: Super Contributor
timestamp: January 19, 2021, 01:34:00 am
content: Quote from: edy on January 18, 2021, 03:56:07 amThat is essentially how large platform scale work. A summing network combines the signals from multiple load cells. The summing network has to compensate for the differing sensitivity of the load cells so it is not as simple as adding the signals together.QuoteI am not sure you can do this for less expense than a dedicated platform scale for livestock would cost. Platform scales for livestock are also designed for a harsh washdown environment.

author: edy
author_rank: Super Contributor
timestamp: January 19, 2021, 02:08:34 am
content: Quote from: David Hess on January 19, 2021, 01:34:00 amYes true, for livestock this wouldn't work. However, this project started out mainly as a desire to keep up with the weight gain of our "puppy" who is now 7.5 months old and weighs 100+ lbs. It is also a learning opportunity on how to use a cheap kit ($13 delivered) with my Arduino (which I already have) and some scrap boards with which I can make the platform. I can't justify buying an actual livestock scale just to weigh the dog, so this is an idea I thought may be worthwhile pursuing. If for whatever reason it fails miserably, I'm not losing much in terms of time and money and can maybe learn what I did wrong.I would be placing the scale somewhere in the kitchen or living room on a hard floor temporarily, have him (the dog) sit on the scale about once a week, just out of curiosity to know roughly his weight. I can calibrate the scale using my weight and several other members of my family (against a regular human scale we have) who are all in the 80 lb - 180 lb range. I also have various exercise weights, so we can get many data points to determine the scale reading to actual weight and compare it to a digital human weight scale we know is accurate.I previously was lifting the dog in my arms and stepping on the human scale and subtracting my weight. Unfortunately that is no longer possible, I reached my limit at 95 lbs. Not because I can't lift the dog, I can lift him up even now.... but he is physically too large to support and hold still for long enough to allow the scale to "settle". Also, depending on the way I hold him, he chooses to start licking and chewing on my face, which I still need.Therefore, the scale does not have to be "heavy duty". I will have to play with the Arduino coding and check out settings on the HX711 library so that I can get some kind of steady reading to compensate for movement. Even if the weight is off I don't care, as long as I am within 5 lbs I have some idea of where he is at. Maybe some kind of sample averaging is all I need.

author: ledtester
author_rank: Super Contributor
timestamp: January 19, 2021, 02:37:53 am
content: This video says you can weigh a cow "without any machine":https://youtu.be/55cgRQvjnbkIt's not in English, but if you zip through the video you'll see what measurements they are making. At about 3 minute mark they show the details of the calculation. It's something like:girth^2 * height / 660 = weight in kgwhere girth and height are in inches.It's not clear if they are assuming a spherical cow or not.

author: BlackICE
author_rank: Regular Contributor
timestamp: January 19, 2021, 03:16:41 am
content: I know this is electronics Forum but have a thinking out of the box and coming up with a mechanical solution. How about a rectangular platform supported on four corners by a rope attached to an overhead scale. Place the dog the platform in using a pulley system lift this platform off the ground. Take the weight reading. This is all predicated on the dog being able to stay still while the platform is slightly moved up.

author: edy
author_rank: Super Contributor
timestamp: January 19, 2021, 02:05:19 pm
content: I've thought of different ways to lift the dog but the simplest and safest will likely be to just build a platform big enough that he can walk up and sit on it when commanded to. That way if there is any movement or panic the dog simply walks off without causing any damage to himself, us, or the scale. It may take some training to get him to sit still and not fear the platform but that shouldn't be an issue as treat food usually does the trick.As far as the wiring of the sensors, I've studied the wiring setup in the video above and will try to draw out exactly what's happening. I'm wondering if it's better to pair up diagonal feet of the scale or adjacent, and if it makes a difference. When they measure resistance it is 2k ohm so it seems like the combination of sensors actually is first combining adjacent sensors in series to form half-bridges, then joining those into a full bridge configuration. Once I draw out fully all 8 strain sensors (and their corresponding direction... i.e. compression or elongation) then I'll know what is happening here.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: January 19, 2021, 04:06:02 pm
content: How about some luggage scales with hooks like this, and suspend your platform from one at each corner? They are very cheap and weigh up to 40kg each, so they would certainly do the job for most domestic pets.https://www.aliexpress.com/item/32996545905.html

author: edy
author_rank: Super Contributor
timestamp: January 20, 2021, 05:13:10 am
content: I received the sensor kit (4x 50kg half bridge sensors) with the Hx711. I confirmed all wires work as expected, red to black or red to white is 1000 ohm, whereas black to white is 2000 ohm (red wire bring common to both). I don't know if black is compression and white is expansion side but it doesn't matter as long as all sensors use the same setup.I tried to figure out if the resistance changed when I was pressing on a sensor and it didn't register anything. I'm assuming the level of change is so small it is beyond the sensitivity of my multimeter. Reading the document linked below it appears the amount of change is on the order of 0.1% in resistance even for a very high strain:http://elektron.pol.lublin.pl/elekp/ap_notes/NI_AN078_Strain_Gauge_Meas.pdfSo I'm not going to get much out of it until I hook it up in the properto Wheatstone bridge configuration and use the Hx711 to amplify the voltage difference to the Arduino (which cannot read it accurately on its own because the signal is so small, so it needs a low noise amplifier like the Hx711 specifically designed for this application:https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdf

author: faraday
author_rank: Regular Contributor
timestamp: January 20, 2021, 08:19:25 am
content: I'm working on similar project. Got this 200kg load cell's and HX711 from Aliexpress.

author: Ian.M
author_rank: Super Contributor
timestamp: January 20, 2021, 09:17:52 am
content: IMHO your load cells are seriously under-rated for the application.. Sparkfun have a very similar load cell with data:https://www.sparkfun.com/products/10245which has a 150% FSD overload capacity. Therefore its likely your nom. 50 Kg load cells will be damaged if the load exceeds 75 Kg, even transiently. If the approx 50 Kg dog jumps onto or off the platform near one corner, the load cell supporting that corner may transiently experiance a force of several times the weight of the dog. You may be able to alleviate the problem by fitting lightweight side fences on two opposite sides of the platform to constrain the dog's entry/exit from the platform to the middle third of the remaining side, which would result in a worst case 1/3:2/3 loading distribution between load cells, which would increase the safe point overload to 225% (FSD - base_platform_weight/4).For the platform itself, I'd suggest a fibreglass reinforced plastic pallet, skinned with Formica or similar easy-clean thin laminate sheet. You will need at least two adjustable feet and minimum two measurement channels each connected to the load cells at diagonally opposite corners, but ideally fully separate measurement channels for each corners so that you can adjust the feet so all the load cells are near equally sharing the load. The foot adjustments would need to be checked each time the platform is moved.You also probably need a 'transport lock' wedge system to avoid overloading the load cells while moving the platform, especially if you need to tip it up to store it.All-in, I think you'd be better off with a 100 Kg hanging scale attached to a chain hoist or shop crane supported from an overhead strong point and a rescue sling for large dogs. However you would need to train your dog to tolerate being lifted a few inches in the sling.

author: edy
author_rank: Super Contributor
timestamp: January 20, 2021, 02:34:51 pm
content: Yes, your points are all valid. Since this is my first time attempting such a project and budget and time constraints are a big factor, I understand that what I am attempting may run into all the problems you just mentioned. Thanks for bringing up the unequal load-bearing issue and care needed to not overload any of the cells. I will have to think about how to be very careful getting the dog up and down from the platform. As well, since the 4 corners are unlikely to be perfectly even and flat (a tripod configuration would have probably been better), the cells will receive unequal loading. This may not even be the fault of the platform and how I mount the cells, but the floor itself may be uneven.Using a stiff platform would compound this effect and require me to level out the feet even more. Perhaps using a base that is slightly more flexible will allow it to warp a bit and even out the pressure on all 4 corners? Again, due to budget constraints and what materials I have access to, I don't think I'm able to get very fancy with a platform. I was hoping some plywood would be sufficient or spare shelving/countertop laminated particle-board would do it.I still haven't solved the problem of how to best mount the sensor pads to the platform! I've seen a link to a 3d-printable mounting bracket but I have no access to a 3D-printer so I'll have to figure it out myself (some have epoxied it but I also want to be able to detach and reattach easily if I try a different platform).

author: Ian.M
author_rank: Super Contributor
timestamp: January 20, 2021, 03:30:09 pm
content: Quote from: edy on January 20, 2021, 02:34:51 pmHmmm. The outer 'ring' of that style of load cell must be fully supported, preferably clamped, and the load applied to the 'bump' on the bridge over the sensor. I'd cut two pieces of hardwood ply enough bigger than the 'ring' to allow for clamping screws, with cutouts to the inside size of the ring and clamp the load cell between them. It could then be screwed to a hardwood corner block inside a wooden frame, and a hex headed bolt could be fitted in a steel threaded insert epoxied into the corner of the platform to bear on the bump. Allow enough clearance between the platform and the block to get two spanners in to adjust the bolt then lock it in place with a nut against the insert. You'd need some way of retaining the platform in place without significantly loading it - maybe webbing stapled between the platform and the frame on each side near the corner, with a little slack in it.

author: edy
author_rank: Super Contributor
timestamp: January 20, 2021, 04:48:35 pm
content: I was thinking of a couple of options that may be easy and work. Here are the load cell gauges:One option is to drill a couple of holes on each side of the wider metal base (you can see at the top of each cell in the photos above on either side of the group of red/white/black wire bundle). The base is wide enough there that I can make holes to allow some screws to screw it into the platform. I could also stabilize the bottom thinner part of the base with a screwed-down washer that just overlaps the edge of it. This should keep the cell anchored firmly to the platform. I will have to "router" or chisel/cut out some relief in the platform under the central part of the load cell, as that needs to deflect inwards to register the strain. Or I can add another small washer under the load cell (or some other wooden or plastic cutout) to raise it up slightly so there is space for that central part to bend inwards.I could also get some plastic or wood blocks of sufficient size and epoxy the load cells to them, and then screw those to the platform. I've seen a number of ways online but they are using 3D printing or CNC machines to cut them out. I would need to do this by hand out of some wooden blocks. The main thing is to stabilize the outer rim and allow the central part some leeway to deflect inwards. Here are the dimensions of the cell and some things I've seen on the web to hold them:

author: Ian.M
author_rank: Super Contributor
timestamp: January 20, 2021, 06:24:57 pm
content: I wouldn't drill the wider portion as that will make it liable to twist due to the force from the 'beam' carrying the strain gauge, which will almost certainly severely reduce its overload capacity, possibly to below its rated load!

author: edy
author_rank: Super Contributor
timestamp: January 21, 2021, 07:01:06 pm
content: I'm thinking to buy a routing kit to use with my Dremel to cut something out of a few slabs of hard wood that is similar to the shapes you saw in the earlier post. I can make a deeper hole first to accommodate the central portion so it can flex in, then a shallower but larger cut that will accomodate insetting the load cell. Then I just screw the wood panel with the load cell to my platform. Here is the routing kit, it is cheap, but hopefully it does the job adequately for my purposes:https://www.ebay.com/itm/For-Dremel-Rotary-Multi-Tool-Cutting-Guide-Router-Drill-Bits-Set-Attachments-Kit/174300881879

author: Ian.M
author_rank: Super Contributor
timestamp: January 21, 2021, 07:15:42 pm
content: That should do a reasonable job of it if you make a template from thin foam board using a Stanley knife and a steel rule oversize by half the difference between the bit diameter and the base O.D. to guide it, and take it slow in several depth stages. For all except the final to depth cut, you may be better off if you make a narrow perimeter cut then hog out the center manually with a chisel. It will almost certainly be quicker, and is less likely to kill your Dremel or wear out your router bits.

author: David Hess
author_rank: Super Contributor
timestamp: January 22, 2021, 06:23:45 pm
content: Quote from: edy on January 19, 2021, 02:08:34 amIn that case the simplest solution will be to just use bathroom scales and have the "puppy" stand on both, and then add the readings together.

author: edy
author_rank: Super Contributor
timestamp: January 26, 2021, 04:07:45 pm
content: I've dug up my Arduino, installed the IDE and HX711 library and successfully have it working on my Linux (Ubuntu) machine. The major remaining step is making the hardware (basically a platform with 4 blocks in the corners to which I can mount the load cells). After that, soldering the leads according to the wiring diagram to the HX711 and Arduino is trivial.I'm going to use a 3x3 or 4x4 foot board, and use 4 blocks for the feet made out of a 2"x4" cut into 4" lengths (so they would be approx. 4x4x2 each). I would mount them with the 4x4 flat to the board so they will stick out about 2", so my platform is scale is raised about that much off the ground. I would mount each foot to each corner of the board. That's fairly easy. What will take me a bit of precise work would be using that Dremel routing kit which I ordered to make 2 sunken squares into each foot. One larger square I can press-fit the load cell into fully, and then a smaller square sunken even further (in the middle of the larger square) that allows the flexible part of the load cell to move in a bit more to measure strain.Basically something like the photos below cut into the surface of my wooden foot block, although it would be much thicker therefore it wouldn't cut deep enough to make a hole through the middle like this:This is an example of the first layer, made just slightly smaller than the load cell, so I can "press fit" it in. What you see missing in this photo below is that another smaller square in the middle would have to be cut out a bit deeper to allow the flexible part of the load cell to have room to flex a bit:This will be my first time using a Dremel router kit so will be a bit of a learning curve. Thankfully I have lots of scrap wood to practice on. I don't think I'll be using any "guides", it will be just eyeballing and following an outline I draw very slowly. I can chisel the edges flatter later if needed, and if I press fit the load cell that will also flatten out the edges so it doesn't have to be perfect. It may even help if there are irregularities as that will help retain the load cell when I compress the wood as I push it in.

author: Ian.M
author_rank: Super Contributor
timestamp: January 26, 2021, 04:44:21 pm
content: Unless its a very loose fingerpressure press fit, I wouldn't recommend doing it that way. A close drop-in fit retained by a washer and domed head woodscew just outside the two sides parallel to the sensing beam would be less likely to distort the load cells.You are getting decent results with the clone Dremel router accessory. However IMHO its still worth making a template, for ease of following the required outline with less concentration. It would only take a few minutes to create a suitable rounded rectangle in Inkscape or other 2D drawing/CAD package that permits numerical positioning, print it out, tape it to a foam sheet (or at a pinch, *thick* corrugated cardboard) and cut round the outline through the printout with an xacto knife.Are you going to connect the sensors to individual Arduino analog inputs, or combine them in pairs, or combine them all to a single input?

author: edy
author_rank: Super Contributor
timestamp: January 29, 2021, 05:26:09 am
content: This is the wiring diagram:Other variations:Another variation (same topology just drawn differently) is here:Here is the Instructables page:https://www.instructables.com/Arduino-Bathroom-Scale-With-50-Kg-Load-Cells-and-H/Essentially what is happening is RED is the common connection between the 2 strain sensors in each load cell. The white-red resistance is for "positive" strain, and black-red resistance is "negative strain". I'm not exactly sure what they mean by that, but in either case one should show higher resistance while the other should indicate lower resistance when the load cell is loaded. The way the wiring diagram is positioned is basically with 4 load cells (each containing 2 strain sensors on opposite sides) so that you are "coupling" up 2 sensors in each side of a Wheatstone bridge, essentially creating the following:You can see how based on the wiring diagram, and how the "whites" of adjacent load cells are joined and "blacks" of the adjacent load cells are joined, we are just summing up the resistors of adjacent load cells. So if one load cell had a resistance of 1k ohm along each strain sensor, we now should measure 2k ohm across each segment of our bridge. As long as all "white" wires are to strain sensors which are all on the same side of the load cell (e.g. "positive strain"). and all the "black" wires are hooked up to the strain sensors which are on the same and opposite side of each load cell (e.g. "negative strain") then we should see it work properly.Ultimately we are making a voltage/resistive divider along each side of the bridge. When load is applied, let's say the "black" wired resistors increase in ohm value, and the "white" wired ones decrease value. So we will shift the A+ voltage down and A- voltage up, making a greater difference to measure. Let's say for example E+/E- is 5V difference, and resistors are all 1 k ohm coupled (500 ohm each). Normally A+/A- would be 0V if all resistors matched exactly, because each side (left/right) of the Wheatstone bridge would divide the voltage in half to 2.5V at the A+ and 2.5V at A- points, making the difference 0V. Now if the resistors joined by the "black" wires increased to 1100 ohm, and the "white" resistors decreased to 900 ohm, we end up with A+ becoming Vout=Vin*(R2/R1+R2)=5*900/2000=2.25V, and A- becoming 5*1100/2000=2.75V, so A+/A- difference is 0.5V. In reality the difference is much smaller which is why we need to use the Hx711.So at that point the Hx711 is wired up to the Arduino 5V and GND for power (GND/VCC pins), and there are a couple of pins that will handle DATA and CLOCK signals from the Hx711 (since it is a precision ADC)... the DT/SCK. You basically set up Arduino code to read serial data in (just have to set appropriate baud rate in the code) and there is a library for the Hx711 that helps.

author: Ian.M
author_rank: Super Contributor
timestamp: January 30, 2021, 02:10:11 pm
content: Thank you for the clarified diagram showing how the somewhat convoluted four load sensor wiring actually implements a Wheatstone bridge.However I am still concerned that without separating the load sensors into diagonal pairs, it will be impossible to determine if they are sharing the load evenly, with a consequent risk of overload, and as three points are sufficient to define a plane, you may even get a breakpoint in the sensor output vs load characteristic as load comes onto the fourth sensor.Looking at theHX711datasheet, its apparent that it supports two load cell bridges by multiplexing between them. I therefore strongly recommend that rather than combining all four load sensors into a single bridge. you connect the load sensors simply as two bridges: end wires to the + & - excitation and center wires to A+, A- B+, & B- respectively, taking care to pair A and B diagonally, and apply opposite excitation to sensors feeding + and - inputs. You can then include a test mode that in addition to displaying the total weight, displays the two diagonals and the difference between them, for ease of adjustment to equalize them.

author: edy
author_rank: Super Contributor
timestamp: February 01, 2021, 04:29:41 am
content: Thanks for the advice. I found this Github thread that goes into trying to read both A and B inputs at the Arduino:https://github.com/bogde/HX711/issues/12This is the wiring diagram I think you were mentioning, making 2 Wheatstone bridges out of the 4 sensors by using E+/E- to excite both, but then breaking up the sense wires to A+/A- and B+/B- for each bridge (rather than combining resistors sort of in "serial" like the previous wiring showed):Reading that thread, there are some sample codes (see copy below) but it also seems they were having trouble getting channel B to work. Nobody seems to think channel B is defective yet looking at the thread it seems there was trouble using channel B (even if they didn't use A at all and just tried B only). It seems the idea is to set a variable to either 64 or 128 (for channel A) or 32 (for channel B) using this:scale.set_gain(128); // to select channel A of the HX711 ADCscale.set_gain(32); // to select channel B of the HX711 ADCI'm not sure exactly how this is supposed to work. Why would it be called "gain" to get values from A or B read separately? Are they somehow combined in the data stream and this is some kind of bit-shift operation to get the appropriate bits for the channel read? Like most-significant and least-significant digits? Or do these channels operate at different voltage ranges and so need different gains to match up? (The answer is YES to all... see below). Anyways, there are lots of resources online I will have to pour through to figure out how to use channel B properly... some mention clock signals, e.g. 25~27 (see datasheet below and table) which is used to shift Data Out, using 26 to get channel B (25 and 27 for Channel A at different gains). Seems they CANNOT be read simultaneously as they are multiplexed and you would have to switch back and forth to read A/B sequentially. What I gather so far is that the reason everyone is "cheating" and using only channel A is probably because the Hx711 library is programmed to use A which is easiest and meant to be sensitive enough to be hooked up directly to the load sensors (has maximum gain) and combining up the sensors in that strange way I showed previously to make one giant Wheatstone bridge (even if it is not the best practice) seems to be "good enough" for most applications.Here's the datasheet:https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdfIt says:Analog InputsChannel A differential input is designed to interface directly with a bridge sensor’s differential output. It can be programmed with a gain of 128 or 64. The large gains are needed to accommodate the small output signal from the sensor. When 5V supply is used at the AVDD pin, these gains correspond to a full-scale differential input voltage of ±20mV or ±40mV respectively.Channel B differential input has a fixed gain of 32. The full-scale input voltage range is ±80mV, when 5V supply is used at the AVDD pin.The datasheet also discussed clock signals and selecting A/B data. Nevertheless, if it was easy and worked people would be just applying the code below with no problem. But apparently many are still having problems getting reliable data so something else must be going on.Here's some sample code:Code://Start code#include "HX711.h"// HX711.DOUT - pin #A1// HX711.PD_SCK - pin #A0HX711 scale(A1, A0); // parameter "gain" is ommited; the default value 128 is used by the libraryvoid setup(){Serial.begin(9600);}void loop(){scale.set_gain(128);Serial.print("Loadcell A > ");Serial.print((scale.read())); // print a raw reading from the ADC channel Bscale.set_gain(32);Serial.print(" Loadcell B > ");Serial.println((scale.read())); // print a raw reading from the ADC channel A}

author: Ian.M
author_rank: Super Contributor
timestamp: February 01, 2021, 05:47:24 am
content: The two channel wiring diagram looks reasonable.However the HX711 internal MUX implementation is fugly. I hadn't delved into it far enough to realize it has separate gains for A and B and that the B channel is low gain only. The gain and mux selection is determined by the number of PD_SCLK pulses it receives per sample. It needs 25 to shift out the sample then 0 to 2 more to select the two channel A gains or channel B (datasheet fig. 2), hence your scale.set_gain() confusion. scale.set_gain() must set an internal count in the library that gets used for the clock count for following calls to scale.read(), so it doesn't effect the result till the *SECOND* scale.read() after the changed scale.set_gain().Probably the best option short of using a second HX711 breakout board, would be to use an external mux and only use channel A of the HX711, which allows gains of x128 and x64. A74HC4053, controlled by an I/O pin, with its third channel grounded should do nicely. At a pinch you could use a74HC4016wired as a DPDT switch, which would need an inverted signal for two of its enable inputs. Either do this in hardware or use two I/Os driven to opposite states.

author: edy
author_rank: Super Contributor
timestamp: February 01, 2021, 04:29:51 pm
content: Thanks for the suggestion. So basically I would place the demuxer between my load cells and the Hx711 and alternate reading between the 2 Wheatstone bridge A+/A- voltages being produced. I would need the Arduino to select input 1 on the demuxer, then read the output of the Hx711, then select input 2 on the demuxer, read the output of Hx711, and so forth, many times per second. Essentially the Hx711 would be alternating it's A+/A- between the 2 Wheatstone bridges rather than using the B+/B- inputs at all... and my Arduino code would have to do the work of flipping between them (by telling the demuxer which input to select before every read of the Hx711). Then in software I will need to average out all the readings. I'll try to come up with a wiring diagram and post it.I even found such a beast at my local electronics shop:https://secure.sayal.com/STORE2/View_SHOP.php?SKU=147532

author: Ian.M
author_rank: Super Contributor
timestamp: February 01, 2021, 05:17:09 pm
content: Yes. Deliberately put your levelling out of adjustment so there's considerably more weight on one diagonal pair of sensor than the other, put a test weight on the platform and read ONE diagonal repeatedly to get a good average. Do the same for the other one.Then you can start trying to get it to alternate using the external MUX.Compare the results with your averages for each diagonal *WITHOUT* moving the weight or the platform. You *MAY* find that it doesn't read the correct value immediately after switching so you need to discard one sample after switching the MUX, (i.e. take two samples discarding the first then switch), or it may be fine switching after every sample.Once you've got reliable results you can readjust the levelling to get the diagonals as equal as possible, then start thinking about how to combine the diagonals, do some type of a moving average, and convert the raw numbers to weight.As you are MUXing it, you'll probably find it beneficial to cut the rate jumper for a higher max readout rate at the expense of higher noise.Calibration hint: A straight sided (but not necessarily parallel sided) round container is easy to calculate the volume of for any fill height if you know its top and bottom interior diameters and the interior depth (formula:volume of a conical frustrum). The density of chilled pure water is 1g/ml, dropping with temperature, but under 40 deg C the error wil be less than 1%. Obviously you have to add a bit for dissolved solids, but the EPA limit for drinking water is 500 PPM, equivalent to 0.5% density increase.

author: deadsy
author_rank: Newbie
timestamp: June 20, 2021, 11:53:07 pm
content: Late to this thread, but whatever...I've been curious as to how 4 load cells, each with +v/-ve strain gauges in them could produce an overall differential output that is proportional to the sum of the 4 individual loads on them.Answer - they don't, but it is pretty close.Here's some analysis:#!/usr/bin/python3"""Analysis for a 4 load cells (2 strain gauges each) wired to give a single differential output.https://www.eevblog.com/forum/reviews/large-cheap-weight-digital-scale-options/"""def deltav(V, R, r0, r1, r2, r3):"""return the differential output voltage for the 4x load cell"""i0 = V / (4.0 * R + r0 - r3)i1 = V / (4.0 * R - r0 + r3)va = i0 * (2.0 * R - r1 - r3)vb = i1 * (2.0 * R + r2 + r3)return va - vbdef main():Ve = 5.0Rn = 1000.0x = deltav(Ve, Rn, 1, 1, 1, 1)print(x)x = deltav(Ve, Rn, 0, 0, 0, 4)print(x)x = deltav(Ve, Rn, 0, 0, 2, 2)print(x)x = deltav(Ve, Rn, 0, 2, 2, 0)print(x)x = deltav(Ve, Rn, 0, 1, 3, 0)print(x)x = deltav(Ve, Rn, 0, 0, 3, 1)print(x)x = deltav(Ve, Rn, 1, 0, 0, 3)print(x)main()jasonh@eccles:~/work/bmon/analysis$ ./loadcell.py-0.004999999999999893-0.005000005000005192-0.0049987512496882935-0.004999999999999893-0.004999999999999893-0.004999062812441224-0.005000001250000441So yes - there will be some differences depending on how the load is distributed to the load cells, but it's probably not enough to care about.

author: David Hess
author_rank: Super Contributor
timestamp: June 21, 2021, 01:57:45 am
content: Scales with multiple load cells use summing networks to combine the outputs in such a way that the load is independent of position; it is not as simple as paralleling the outputs. Single load cells may also be calibrated to do the same thing.