Load Cell (weight) questions

I have a project that is need of some 'help' :slight_smile: Long story short.. I made my own version of a 'barbot' (automate drink maker). After converting AWAY from the CO2 pressurized approach (worked well but had some long term/end user issues... so things have been converted over to 'pumps').

Issue with the pumps is:

  • not each pump has consistent output based on same timing intervals

  • I noticed that the pumps to NOT keep the lines full/primed,and that it will over time leak back into the pump and then back into the ingredient/liquid container

    I initially though a simple check valve would work (havent been able to find one that is not pressurized output, just a simple 'gravity' swing gate type that was small enough for use with 3/8" x 1/4" silicone tubing)

    looked into using a flow sensor to log flow/output.. but upon reading that are not very 'accurate', and can be inaccurate based on flow rate, pressure..etc. (also wasnt sure how I'd get all 8 lines into '1' line for the flow meter output portion)

    In the end it seems that 'weighing' is the most accurate path to pursue here... hence the load cell end point (right now) :slight_smile:

I have never used or played with these 'load cells' before.. Most I see if these 'long bar' types? (seems like it might be just 'too' big for it be under a cup (that moves around getting filled)

My current test is thing one:

but not sure if I try to source a 1kg one vs this 5kg one? I am looking to measure things down to .25oz (at the very least)

Then I started to fall down the path of single point..bending, compression versions? (lost me)

I then stumbled upon these type of load cells? (different physical design)

they caught my eye because of the physical design (size) DIFFERENCE.. which I thought my be better to suit my project (hide this under the (moving) cup holder)..

I am looking for some feedback on using load cells in general (accuracy? worth it?) How close of of the 2kg, 5kg, 20kg versions should you get to your max load/weight? (does it matter if I use a 2okg one? vs a 1kg or 5kg? will I still be able to weigh things down to a .25 oz limit?)

I'm also not clear on the physical aspects on things? overall size? use with a cup-holder?

Anyone use these alternative ones? Size? thoughts on it working with a cup holder to measure the current output of liquid?

Side question: I -think- (I'll have to revisit things to be 100%).. I only have 2 pins available as well? Can the HX711 board be used with only:
D18/A4 - [Analog 4] (I2C: SDA)
D19/A5 - [Analog 5] (I2C: SCL)

as digital pins then?

complete new area for me this load cell stuff.. so any/all feedback is appreciated. Tips to be aware of.. things to avoid..etc.

If anyone has used one of the disk type ones.. please post some feedback on it.. better? worse? size? no difference?

Thanks

bump.. anyone? :slight_smile:

Edit: seems the half-bridge ones daisy chain together.. and still only use the same '2' I/O pins.. -if- I need more than one?

Do you need more than one button/disk or half-bridge type of sensor??

I suppose/wonder if I could in fact use '2' half-bridge ones under a cup? roughly 1.33" each.. 2.5+ inches in width -might- work/fit under a cup holder/base.

A disk/button would physically be better.. but not very affordable if I need more than one. (and if 'two' separate disk/buttons are needed, that would be separate I.O pins for each? or can the button/disk ones be daisy chained like the half-bridge ones?

Which board?

Most (not all) HX711 boards are 5volt-logic only, and no, they are not I2C.
(Almost) any pin can be used for a HX711.
Leo..

Hi Wawa-

Thanks for the reply.

Geez.. sorry I didnt even realize I didnt post the amp/board. (been so focused on the load sensor portion, never even though any other boards were used..since first time doing this, and only see HX711 in ...everything) :slight_smile:
So yes. HX711 is the board I am using,. (came in the single load bar 'kit')

At this point, I am sooo lost. Seems like I had to reverse the pins in the example code? I only get negative values? Felt like a complete noob running the calibration script? Things seem 'noisy' as I see small value changes.. when nothing is even happening?

Its clear the single bar approach wont work... not sure if a SINGLE button/disk type load cell will work? (not even sure if more than one can be used...unless they can be daisy chained like the half-bridge ones??)

I am using A4/A5 (as digital pins)..

Just lost right now.. and dont really have a direction on:

  • best physical load cell to use (with my restrictions of: only 2 (maybe '3' I/O pins available) and the physical size/space I have (base of a cup-holder)...

Maybe I can go buy a $12 weigh scale as harbor freight? and hack it?

The metal plate/size/portion seems like a perfect 'area' for my need.. so I'm guessing some load cells in there are small? (but who knows if it can only use one set of I/O pins?)

Any suggestions/help is truly appreciated here.

Thanks!

You didn't tell us which Arduino you're using.

There are two types of HX711 board.
One with a single 5volt supply, meant for 5volt-logic Arduinos.
And one with two suppy connections, designed for 3.3volt-logic processors.
The ones that come with a kit are almost certainly 5volt-only.

You can use multiple HX711 boards on a single Arduino.
If you use the HX-711-multi library, then you can share the clock lines.

If values go negative with weight, then swap A+ and A-
Is the load cell bridge in ballance. You should measure less than a few mV across A+ and A-
Leo..

1 Like

I am testing with an UNO (clone).. but will be connected to a NANO in the end. (whats running the current project).

This is the exact pre-assembled kit I have:
https://www.amazon.com/dp/B07GQPV6C4?ref=ppx_yo2ov_dt_b_product_details&th=1

You are correct it the single/+5v version of the HX711 board.

I only have -2- I/O pins available A4/A5,.. (want to make sure single 'Arduino' means the 1 -set- (2) of I/O pins that all would run off)

OK.. so if I -do- use more than one, I should use the mulit-library (thanks, didnt know it existed)

but I guess, thats also getting to more of no experience/asking for help here.. do I -have- to use more than one sensor?

The current 'bar' sensor I am using (just for testing), physically will not work for this project.

  • my number 1 preferred option would be to find a nice/small button/disk type. (but not very cheap for this physical style, and not 100% sure if using only '1' would give a decent/reliable measure. I would like to be able to go at least as low as .25oz, which relates to 70.8738grams and is: 0.0708738kg in the end.
  • is using only -2- half bridge sensors valid to do? not sure if I have enough room for '3'. (I have not viewed any wiring examples/code that used only '3' half bridges.

Thanks.. I will remove the hot glue and swap the white and green wires (A+/A-)

In balance? As in ...level? The kit came pre-assembled, it looks flat/level, and is sitting my desk. I stood a nickle up on it, an it did not roll or fall.

You then have to make up the other half of the bridge with resistors, which could introduce temp dependency. A full bridge load cell should be temp compensated.

No, electrically balanced. Close to zero volt between A= and A-
Leo..

Two half bridges can be configured as a full wheatstone bridge. The trick is to wire them so as the load on the cells increases, the signal on one half-bridge moves negative while the signal on the other moves positive, so the balance across the middle of the wheatstone bridge becomes more unbalanced. If it's a cheap three-wire cell with black and white for excitation, and red for the signal, you wire the white of one to the black of the other, and vice versa, apply the excitation to those junctions, and read the signal on the middle.

4 half bridges are also possible, but you have to take care to wire them up so they unbalance the center correctly. Here's a schematic for 4 half-bridge cells, each with the excitation leads as white & black, and the signal lead as red:

image

For 3 half-bridges, you could use the 4-half bridge configuration, and leave one of the half-bridges unloaded, or just replace it with a matching pair of resistors.

1 Like

The long-bar types are what is used inside the cheap pocket-size "jewelry" scales, such as that harbor freight scale.

The long bar makes for an easier mount than the multiple buttons.

1 Like

thank you for confirming that those half-bridge one can be wired up the same.. regardless of, 2, 3, or complete 4.

My first path would of course being a 'single' sensor (of some kind). :slight_smile: can single button/disk cell ones be used for my attempted use do you think?

side note:
that harbor freight digital scale is much (much smaller) that the 'bar' sensor kit I linked to above.
the bar sensor alone is 'thicker' that the whole height of the scale. (include housing and the metal plate/area you place stuff)

It must be a 'very' small single bar one.. (which I never saw on-line?)

I am going to take one apart now. :slight_smile:
That might work.. and have a nice built in 'platform' too I can possible 'hack' *(for a smaller single/load bar set-up, which would fit my current cup-holder size/available area, and a quick mounting set p as well.)


update:
ok so I took apart one of those scales linked above. Basically I just jumped the gun. :frowning: it was a perfect fit, (as far as the single bar size, and the platform/case I could utilize) but it max's out at 1000g it says on the box (should have read it first [DOH!]) bummer.

It would -probably- only work if I used plastic cups then. :frowning: (which is actually used most of the time, but dont want to limit it to just those I guess?) I put a plastic cup full of ice, and weighed it out.. almost 7oz (I was thinking it would be much more?)..
That would limit me to roughly 28oz of recipe/liquid limit then as well. :frowning: (grrr)

I could use '3' of the half-bridge ones possibly? (space wise).. wold that give me more weight limit?

1 Like

They make the pocket-size scales with larger capacities: 2000x0.1 search.

And it might be the case that the same physical bar in the one you own is used for different ranges, but with different amplifications/scaling.

Finally back to insane part of the project again (sigh).

Without seeing any of those 'pocket jewelry scales' in hand.. I wouldnt be able to decide if they would fit in the current allocated open space.

At this point.. (more or less) there has been no advancement.

I guess I learned: (not 100% because no direct yes or no answers)

  • you -can- use any load scale sensor count 1-4 (or more?) with a single (2-pin) connection to an Arduino, as long as it is wired in the wheatstone way.. DOESNT HAVE TO BE ALL 4, you can use 2 or 3 scales.) not sure if this is only for half-bridge sensors or what?
  • how that is done after wiring (code wise) no clue.. apparently you need to use a different library for multi sensors?

At this point.. motivation is dead I guess. Never thought it would be that difficult to get some direction on how to have a 'smallish' scale weigh a cup of liquid.

In the end.. (although pitched as the most accurate way to measure liquid output).. it seems like its not very easy, accurate.. or practical unless you want to use a full blown human scale size sensors. Flow meter seems just as 'inaccurate' of a solution now.

I'm sorry if I killed your motivation.

I think there's a good chance that you could use the beam in the scale you have to measure 0-2000g. If you can put 2000g on it temporarily, and then after you remove the overload, it measures within the 0-1000 range reliably, then the physics of the beam is probably fine, and the 0-1000 is a software limitation.

I don't have your scale in hand, but I'd bet the beam in the scale in hand has 4 strain gauges wired in a wheatstone configuration, and the way forward would be to wire it to your HX711 and the HX711 library examples should just work. I can't give a direct 100% answer

The fleshing out the 1-2-3 or 4 load cells to full wheatstone bridges works with the half-bridge cells. And it could work with single strain gauges, but it is a lot more fiddly to place the single gauges. The trick with the Wheatstone bridge is used to turn small changes in resistance (~0.001%-0.1%) into a detectable signal by differencing two voltage dividers. Before amplifier tech was common, they used sensitive ammeters to detect the current through the bridge, increasing the excitation voltage to increase the signal. Nowadays we amplify the millivolt differences across the bridge into something we can shove into an ADC. Adding further half-bridge cells by electrically connecting strain gauges in parallel or serial to make a millivolt wheatstone bridge difference signal might work, but it complicates the math, and really wouldn't increase the sensitivity of the system. It would be better to have four active strain gauges applied to a mechanical structure that bends and stretches linearly with your expected loads.

1 Like

its not you!.. (or anyone in particular).

Just overwhelming (for some reason? I have done tons of Arduino based hobby projects.. but this just seems/feels like no direct answers/path to follow)

The scale (load sensor 'bar') from Harbor freight...currently (which is much physically smaller than the load sensor bar that came with the complete Amazon kit) seems to max out at 1kg?

I 100% agree that the HF scale is set-up the same way (wheatstone wired).. but in its current set-up it caps at 1kg

Unfortunately.. I just dont think I physically have the 'room' for '4' of.... anything. Hence seeking valid/straight answer if 2, or 3 sensors can be used.

Still not clear if button or disk cells can be used in 2 or 3 counts? (effectively?) Or this only pertains to the 'half-bridge' style sensors?

In a perfect world.. a simple/single sensors (disk/button style) with a plate (with center hole) on top.. would be the ideal solution. but if that a valid 'idea' to pursue? Seems like... no? But not solid answer.

Perhaps I'll waste another $12 on another HF scale.. cut the 'lcd/circuit' board half of the scale (and housing) off.. leaving me the physical housing of the metal plate on top.. the physical housing/connection to the load cell 'bar'.. and wire it up to my HX711 amp board.

Q: Knowing this is a 1KG limit scale.... is this worth the effort/waste?
Q: Any other issues to take account for before following this odd solution?

Pros: (to me)

  • physical size seems 'acceptable'
  • having the scale 'casing' and the 'metal plate' already part of the set-up makes it easier to implement/use

Cons: (so far?)

  • knowing the scale itself limits to 1kg seems to be saying: "dont be an idiot, you already know it wont work!" (yet I keep the comment of adjusting any code to adjust this might work?)

Converting from CO2 to pumps in my project (in my mind) was going to be somewhat easy!. Never took into account the accuracy/precision of 'pump output' (sigh) LOL

** still wonders how bad/off flow meters really are?

How did you determine this?

The box, the internet, and putting a cup of water with extra weight to see if it goes above 1kg

1000g cap

1000g = 35.274oz

As soon as I hit a little above 35.xx grams.. screens says: O_LD (clearly over weight limit in current scale/set-up)

Kinda in a conundrum here..LOL.. I need a physically small load cell/sensor.. but need roughly 2kg min I believe? So the 'bar' styles dont really work for me here I guess?

bar sensor from Amazon kit is too big physically, bar sensor from scale physically works. (but cant cover up to 2kg, only 1kg) (sigh)

button/disk sensor would physically work.. but not sure how to physically create the rest? (top/bottom plates, ..etc for button/disk types) I do have a laser cutter and metal mill/lathe..etc..

But no plans/files..or even a visual ref on how the disk stuff/ones are set up? Again. (as a friendly reminder). Need to fit in the base/bottom of a cup-holder (more or less).. so multiple LARGE sensors do not work.

if I 'forced' my end project to now only use plastic cups (which is mainly does anyways).. the 1kg would work then, but I am not eager to limit the end use of the project at this point.

*(thinking back, the CO2 approach probably wasnt as bad! lol) :slight_smile:

I'd take it out of the box, hook it up to an HX711, and see what happens a la @DaveX test suggestion.

ETA: after it is out of the box, look for a physical "stop" that prevents overload - my American Weigh Scale pocket scales (which I incorporated into a project) had them. If yours does, keep an eye on the stop as you load it up.

1 Like

Challenge accepted :slight_smile:

I was hoping to keep this one so I could actually measure my output and check for accuracy, but I guess I can buy another one. (another $12.00 for R&D!) hehe..

  • if I use the HF scale (as is), and say load it to 33oz, and then tare it out.. as soon as I add another 2_oz.. it again 'O_LD's' out on the screen.

Also this Amazon listed 2kg one:

Is the same size as my '5kg kit' one. (which is bigger physically bigger than the one in the HF scale. So the stance is it can still be used for more than 1kg weighing?)

I can will:

  • take apart the original 5kg kit (assembled with acrylic top/bottom plates).. to use the HX711 board
  • I will take apart the HF scale, to disassemble the load cell 'bar' sensor, and connect it recently free'd HX711 board from the above step.

What is the goal here? (so I'm clear)

  • to see if it can be use to weigh more than 1kg? (being this physically small?)

Update:

  • before digging in.. I swapped my A+/A- wires on the HX711 board..

I then some HX711 library (HX711_ADC) Calibration script.

It now seems to displaying positive numbers instead of negative numbers.

However, seeing this on the serial output:

void calibrate() {
  Serial.println("***");
  Serial.println("Start calibration:");
  Serial.println("It is assumed that the mcu was started with no load applied to the load cell.");
  Serial.println("Now, place your known mass on the loadcell,");
  Serial.println("then send the weight of this mass (i.e. 100.0) from serial monitor.");

what type of weight/measurement is this then? grams? oz? lbs? (it doesnt say in the sketch anywhere?)

Anyways.. step 2.. is to now swap out the HF scale board with the HX711 board..,,,

and then what? (what script? how can I calibrate if it doesnt state what format the weight it wants entered in to calibrate?.. I am using a 'nickle'.. which is a global 5g weight... which translate to: 0.17637oz. And oz is the format I would like to use in the end. (so not sure how to set that up?)

I would graph the raw count vs weight, real time, starting with no weight and gradually adding weight to you desired max. Then gradually decrease, plotting those points, too. Then do y=mx+b

While increasing weight, if the line starts to become nonlinear, then you've probably exceeded the capacity.