Can I better stabilize HX711 output with load cell?

Thread Starter

ballsystemlord

Joined Nov 19, 2018
150
Hello,
I have a 200KG load cell soldered to an HX711 module. The HX711 is attached to an arduino which is powered and controlled via a USB->TTL adapter plugged into my tower PC. The schematic is attached. I've been getting readings of +/- 50g with occasional higher and lower spikes from the load cell at 10 SPS both loaded and unloaded. Knowing that I have 24bits of resolution (with the hx711 ADC), it seems to me I should be able to get a more stable result. On the SW side, I'm using HX_grocery_scale.ino from https://github.com/RobTillaart/HX711 . It prints out about 4 results per second in grams (250ms delay per reading).
I asked on the arduino discord, and it was suggested that I add a capacitor to stabilize the output. The gentlemen couldn't recall the guide where it tells you how to calculate the capacitance required. I tried searching online for anything relevant, but all I could find were SW based solutions.

As you can see in the schematic, there's already a 100nF (0.1uF) capacitor on the two sensor pins.

Is there some way to better stabilize the HX711's output?

Thanks!
 

Attachments

ericgibbs

Joined Jan 29, 2010
18,766
hi bal,
Do you have the specification for the 200kG load cell or a link to datasheet?
ie: Vext rating, also mV/V etc.

What are the values of R1, R2 and Q1.?

You show a 2.7V through 5.5V supply and a 2.6V thru 5.2V on +Vext
What Vx do you actually measure with a DVM.?
As you may know, the USB supply fluctuates and is noisy.

I have HX711 and L/C's on the bench, my L/c is 30kG, but it should be OK to check your Sketch and Circuit.

E
 

Thread Starter

ballsystemlord

Joined Nov 19, 2018
150
The resistors are:
R1: 3K
R2: 8.2K

As for the voltage, as the terminals are soldered, I can only give you the V-drop for now which is 1.211v. If you really need me to desolder them, please ask.

Here are all the technical details I have on it (it was a picture. I had to hand type this. I'm quit certain it's correct):

Technical parameters
Comprehensive error : 0.02% F.S
Sensitivity :1.0 0.1mv / v
Nonlinearity: 0.02% F.S
Hysteresis: 0.02% F.S
Importance of :0.02% F.S
Creep: 0.02% F.S/10min
0:00 Output :2% F.S
Input Impedance :405 10
Output impedance :350 3
Insulation resistance :5000M (100VDC)
Excitation voltage :5VDC ~ 12VDC
Temperature compensation range :10 ~ +40
Operating temperature range: -20 ~ +60
Temperature effect on zero 0.03% F.S/10
Temmp.effect 0.02% F.S/10
Safe overload 120%
Ultimate Overload 150%
Protection class IP65

Wiring
Black Power + , white Power - Red Signal + green signal -

Explanations/translations:
1kg load should == 0.1mv * input voltage
 

ericgibbs

Joined Jan 29, 2010
18,766
hi bal,
Using the equation for AVDD=VBG(R1+R2)/R2.
Using your values, AVDD = 1.25(11.2k/8k2) = 1.63V ...........[1]
The PDF circuit diagram values for VCC=5 are AVDD = 1.25(20k+8.2k)/8.2k = 4.29V ......[2]

Assuming that your L/C output is 20mV when Vext=10V with a 200kG load == 0.1mV/kG
But as the Vext is only 1.63V, so 200kG is only 16.3uV/kG.

You are seeing a 50gm fluctuation, which equivalent to approx 16.5uV/20 = ~ 0.8uV...

With the setting you have using AVDD = 1.63V I would expect noise level at least +/-50gm.

Change the R1 and R2 values to the PDF circuit and retry.

E
 

ericgibbs

Joined Jan 29, 2010
18,766
hi bal.
OK.:)
What voltage do you have on the +Vext to the L/C.? , it should be approx +2.56V.

With a Vsignal of +20mV and the Gain set to 128 = 2.56Vinternal for the ADC

Post the Sketch you are testing, and I will try it on my set-up.

Am I correct in assuming your L/C is rated a 2mV/Volt for 10Vext at the maximum load of 200kG.??

E
 

drjohsmith

Joined Dec 13, 2021
852
Can you "plot" what the errors look like
it seems a very small voltage change would give you 50g range
Its going to be hard to keep any "noise" out

I'm wondering if you have pickup , be that electrical or a magnetic field ,
Does the noise change as you expect as you change the gain of the HX711

How often do you take the sample at ?
to get near to the full 24 bits, the internal oscillator is not good enough
you need to use the external crystal input,

Im guessing the 50g error is "random noise"
if so the way to minimise this is to in the s/w, integrate ..
 

ericgibbs

Joined Jan 29, 2010
18,766
How often do you take the sample at ?
to get near to the full 24 bits, the internal oscillator is not good enough
you need to use the external crystal input,
hi dr,
This statement is incorrect.
The external crystal is only required for a precise data output rate, not the sample rate or number of Bits.

E
 

Thread Starter

ballsystemlord

Joined Nov 19, 2018
150
What voltage do you have on the +Vext to the L/C.? , it should be approx +2.56V.

With a Vsignal of +20mV and the Gain set to 128 = 2.56Vinternal for the ADC

Post the Sketch you are testing, and I will try it on my set-up.

Am I correct in assuming your L/C is rated a 2mV/Volt for 10Vext at the maximum load of 200kG.??
Forgive my not understanding, but L/C is what? Normally that's a resonance circuit from what I understand (and Vext is Voltage External), but the HX711 is using an internal oscillator, so there is no resonance circuit AFAIK. Unless you're talking about the scale as a source of resonance?

I already linked the sketch (unless you're talking about something else.) You can get it in the arduino IDE under Sketch->Include Library->Manage libraries. "On the SW side, I'm using HX_grocery_scale.ino from https://github.com/RobTillaart/HX711 . It prints out about 4 results per second in grams (250ms delay per reading)."
 

Thread Starter

ballsystemlord

Joined Nov 19, 2018
150
Considering there are 2 pins to choose from, I'm still not 100% certain.
These measurements were taken on an unloaded load cell.

E- to Vext (VCC in the circuit diagram) 4.956v
S- to Vext 2.865v

As a bonus:
E+ to E- 4.153v
E+ to S- 2.074v
 

drjohsmith

Joined Dec 13, 2021
852
hi dr,
This statement is incorrect.
The external crystal is only required for a precise data output rate, not the sample rate or number of Bits.

E
I would dis agree,
but I can't find the docs I remember
so this is my ever decreasing memory !

I understood the ADC was a sigma delta "and a bit"
and the ADC conversion was dependent on the frequency being stable
the internal oscillator is "good" but not good enough for the full 24 bits
I seem to remember it was +- 3 or more LSB error for the internal Oscillator
not least of which the I2C data "noise" adds to the internal oscillator noise.

I'd still like to see what the noise shape looks like
is it single frequency or wide band,
my bet is its gaussian wide band noise,
which is going to be real hard to remove by just filtering the ADC input
 

ericgibbs

Joined Jan 29, 2010
18,766
hi bal,
Check your project against this HX711 image.

Your post#5, say 350R output impedance, which indicates a 350R full Bridge.
The 405R input impedance indicates a 55R is in the +Vext to the bridge.

The Load cell colours are from your Post#5, are you sure about the White and Black leads.?

This LTspice plot shows your readings, based on a Vcc of =5V, look close.

I will try your Sketch and repost.
E
 

Attachments

ericgibbs

Joined Jan 29, 2010
18,766
hi dr,
This is the clip from the HX711 d/s.
The internal frequency is stable, but not precise, note the wide range of the attached image timings.

The HX711 is a ratio metric ADC

I have used these modules on many projects, over the full conversion range, and never had cause to use an external xtal.
E
EG 1599.gif
 

Attachments

ericgibbs

Joined Jan 29, 2010
18,766
hi bal,
Running the Grocer and Kitchen Sketches using a 30kG L/Cell I do not see the +50gm fluctuations that you measure.

What level of reading fluctuation do you measure with the Scale zeroed, without a weight load.?

Please post a clip of the IDE Serial output.

E
 

Thread Starter

ballsystemlord

Joined Nov 19, 2018
150
hi bal,
Running the Grocer and Kitchen Sketches using a 30kG L/Cell I do not see the +50gm fluctuations that you measure.

What level of reading fluctuation do you measure with the Scale zeroed, without a weight load.?

Please post a clip of the IDE Serial output.

E
I carefully looked at your pictures. I've got the red and green wires reversed. I tried so hard to memorize which way it went before I went down to solder it (kicks self). I'll have to write it down next time.
I cannot yet confirm if this is correct: https://forum.allaboutcircuits.com/attachments/eg-1600-gif.266084/
I'll have to get back to you about that and the screen shot once I fix that mistake of mine.

I can tell you that I am certain the black and white wires go that way. I originally soldered it according to how the hx711 module said to do it, but the readings I got were insanely high.

Thanks for being so patient with me. I shouldn't be this clumsy.
 

ericgibbs

Joined Jan 29, 2010
18,766
hi bal,
The 'R5' in the post #5 image is often include internally on the Load Cell.
If you were using more than one load cell, on a weigh platform Base, adding a low value trim potentiometer in Series with +Vext would enable you to trim the sensitivity/slope of the L/C's so that they were matched.

There is supposed to be a 'standard' colour coding for L/C wires, but they do vary.
My 30kG, L/C is Rd= +E, Wh= -E, Gn= +SIG, Bk= -SIG

E
Added a short print-out of my Sketch output
 

Attachments

Last edited:
Top