Mathematical formula that converts voltage to weight the HX711 is using

ericgibbs

Joined Jan 29, 2010
21,536
hi Ivan,
If you check the HX711 datasheet, you will see that for a 5V excitation voltage and a Gain of 128, the ADC can tolerate +/-20mV on the A+/- Inputs.
Ideally, +20mV into the AD would give a reading of 0xEFFFFF [ 15728369 decimal]

So for a Vext= 2.5Volts, the A+/- input would be limited to +/-10mV

E
 

Thread Starter

ivanedpratama

Joined Jun 25, 2022
30
hi Ivan,
If you check the HX711 datasheet, you will see that for a 5V excitation voltage and a Gain of 128, the ADC can tolerate +/-20mV on the A+/- Inputs.
Ideally, +20mV into the AD would give a reading of 0xEFFFFF [ 15728369 decimal]

So for a Vext= 2.5Volts, the A+/- input would be limited to +/-10mV

E
Hello ericgibbs

This is a summary of all your answers :
Rated Load: 5Kg
Rated Output: 1.0mV/V±0.15mV/V
With a ESP32 at 3.3V, the HX711 sets the +/-Vext at approx 2.75Volts
So at a full load weight of 5kG the A+/- signal is approx 2.75mVolt.
The Gain of the HX711 is set for times 128, so the ADC input is 0.35Volts.
If the E+/- = 2.75Volts and the Load Cell is rated at 1mVolt/Volt, with a 5kG load I would expect 2.75mV,
So for 0.5kG that would be (0.5kG/5kG) * 2.75mVolt = 0.275mVolts
the Gain is set in the program, A+/-Volts * 128, so the ADC input for a 0.5kG load would be 0.275mV *128 =35mVolt.

I tried to calculate for full load = 5 kg
Vext value : 2.75 mV.
So for 0.5kG that would be (5kG/5kG) * 2.75mV = 2.75 mV.
so the ADC input for a 5kG load would be 2.75mV * 128 bit = 352 mV.

Is this appropriate?
I ask :

1. Is it correct to measure: Measurement of load cell voltage, input E+/- is connected to a voltage of 3.3 V from the nodeMCU and the load cell output cable is connected to the avometer to see the resulting voltage
 

ericgibbs

Joined Jan 29, 2010
21,536
. Is it correct to measure: Measurement of load cell voltage, input E+/- is connected to a voltage of 3.3 V from the nodeMCU and the load cell output cable is connected to the avometer to see the resulting voltage
hi,
You can test a load cell by connecting 3.3V to Vext input of the load cell, then measure the output from the load cell using a DVM, that can display at least to 0.1mV resolution.

If you power the load cell from 3.3V when connected to the HX711 you must also set the VDD voltage to 3.3V.
Read the notes in the datasheet.

E
ScreenHunter 21.gif
 

Thread Starter

ivanedpratama

Joined Jun 25, 2022
30
hi,
You can test a load cell by connecting 3.3V to Vext input of the load cell, then measure the output from the load cell using a DVM, that can display at least to 0.1mV resolution.

If you power the load cell from 3.3V when connected to the HX711 you must also set the VDD voltage to 3.3V.
Read the notes in the datasheet.

E
View attachment 270164
Hello @ericgibbs

okey i will try it. about the question above.
The Gain of the HX711 is set for times 128, so the ADC input is 0.35 Volts.

Can the load cell sensor's Vout exceed the Vext?
Where I use the above calculation for a weight of 5 kg

I tried to calculate for full load = 5 kg
Vext value : 2.75 mV.
So for 0.5kG that would be (5kG/5kG) * 2.75mV = 2.75 mV.
so the ADC input for a 5kG load would be 2.75mV * 128 bit = 352 mV.

352 mV > 2.75mV
 

Thread Starter

ivanedpratama

Joined Jun 25, 2022
30
hi Ivan,
Looking at your load cell specification
Rated Load: 5Kg
Rated Output: 1.0mV/V±0.15mV/V

With a ESP32 at 3.3V, the HX711 sets the +/-Vext at approx 2.75Volts
So at a full load weight of 5kG the A+/- signal is approx 2.75mVolt.
The Gain of the HX711 is set for times 128, so the ADC input is 0.35Volts.

If your Vext was, for example, 10Volts, the load cell would output 10mV at 5kG.

Does this help.?
E
Added image
View attachment 270162
Hi ericgibbs,

how do you know that the excitation voltage is 2.75 mV, when the rated output 1.0 mV

thank you very much,
1656250325923.png
 

ericgibbs

Joined Jan 29, 2010
21,536
hi
how do you know that the excitation voltage is 2.75 mV, when the rated output 1.0 mV

The Vexcitation voltage is NOT 2.75mVolt.
The Vexcitation voltage is the voltage which is applied across the load cell bridge inputs, typically ~2.7V when powered via the HX711 from an 3.3Volt powered.ESP32

E
 

ag-123

Joined Apr 28, 2017
294
HX711 adc aside, the key thing is actually the strain gauge.
https://blog.endaq.com/strain-gauges-how-they-work-applications-and-types
https://en.wikipedia.org/wiki/Gauge_factor
I think the typical numbers are in microohms and micro-strains. Not familiar further from here.
The difficult thing about this is, if you have too little amplification, you can't detect the changes.
If you have too much amplification, a little bit off the balance, and it would tilt the voltage swing to saturation or to GND.
And typically, I'd think you'd need to calibrate it manually with weights.

Another thing though, the noise floor could be as much as 10 mV with "no other inputs".
Especially, if the wire to the strain gauge is long, it works as an antenna, and all that RF signals from the air presents itself at the adc highly amplified.
A typical trick is to put a big capacitor to filter that, the downside is it would take a while for the real readings to settle as well.
And dealing with microvolts and millivolts changes (likely for strain gauges - microohm changes) would make things more difficult.
 
Last edited:

Thread Starter

ivanedpratama

Joined Jun 25, 2022
30
hi
how do you know that the excitation voltage is 2.75 mV, when the rated output 1.0 mV

The Vexcitation voltage is NOT 2.75mVolt.
The Vexcitation voltage is the voltage which is applied across the load cell bridge inputs, typically ~2.7V when powered via the HX711 from an 3.3Volt powered.ESP32

E
Hi ericgibbs,

now i understand about Vout on load cell sensor excitation.

1. Will each A+/-Volts output be multiplied by 128 bits on the hx711 module ?
2. I found the calculation formula from A+/-Volts output to unit weight output. is this formula valid ?

Thank you very much



1656252775694.png
1656253036145.png
 

Thread Starter

ivanedpratama

Joined Jun 25, 2022
30
HX711 adc aside, the key thing is actually the strain gauge.
https://blog.endaq.com/strain-gauges-how-they-work-applications-and-types
https://en.wikipedia.org/wiki/Gauge_factor
I think the typical numbers are in microohms and micro-strains. Not familiar further from here.
The difficult thing about this is, if you have too little amplification, you can't detect the changes.
If you have too much amplification, a little bit off the balance, and it would tilt the voltage swing to saturation or to GND.
And typically, I'd think you'd need to calibrate it manually with weights.
Hi ag-123,

for the results of reading the weight of my tool is in accordance with the results of the reading of the original weight. here I am looking for calculations to find out step by step from the load cell sensor to the hx711 module

thank you very much
 

MrChips

Joined Oct 2, 2009
35,031
You don't have to be concerned with the internal specs of the HX711 and ADC conversion, reference voltage, number of ADC bits, gain factor, etc.
If the sensor transfer function is linear all you need is a 1-point calibration.

Put 5kg on the scale and record the digital value received by your program.
 

Thread Starter

ivanedpratama

Joined Jun 25, 2022
30
hi Ivan,
Is this a College assignment project.?

Moderation.
Hi ericgibbs

Can you help me test 2 samples with different weights from the calculations you discussed above? I will use the results of your calculations as a reference to calculate some of the weights of my coursework.

I hope for your help, I'm glad to meet you.
thank you very much,
 

MrChips

Joined Oct 2, 2009
35,031
Put two different weights on the scale, one light and one heavier.
Tell us the two weights and the two corresponding readings. We will show you how to determine the required formula.
 

ericgibbs

Joined Jan 29, 2010
21,536
hi Ivan,
I would recommend you initially study a Load Cell based on the Basic Wheatstone bridge circuit.
For study, set your bridge for say 1mV/V of excitation voltage, let Vext = 5Vdc and the maximum load of say 5kG.

Construct an equation for the Load Cell, that gives the mVolt signal for a given Vext, mV/Vext and maximum specified load.

Post your equation, we can then move onto the amplification and ADC section.

E
 

Thread Starter

ivanedpratama

Joined Jun 25, 2022
30
hi MrChips & ericgibbs,

I have done the weighing on the 5 kg load cell sensor, supplying the source at E +/- Volts = 3.3 Volts

0 gram = 0.13 mV
100 gram = 0,24 mV
200 gram = 0.29 mV
500 gram = 0.50 mV

I hope for your help, I'm glad to meet you.
thank you very much,
 

MrChips

Joined Oct 2, 2009
35,031
hi MrChips & ericgibbs,

I have done the weighing on the 5 kg load cell sensor, supplying the source at E +/- Volts = 3.3 Volts

0 gram = 0.13 mV
100 gram = 0,24 mV
200 gram = 0.29 mV
500 gram = 0.50 mV

I hope for your help, I'm glad to meet you.
thank you very much,
Your results are highly non-linear. Repeat your measurements, especially around 100g and 200g.
 

ericgibbs

Joined Jan 29, 2010
21,536
I have done the weighing on the 5 kg load cell sensor, supplying the source at E +/- Volts = 3.3 Volts
hi Ivan,
The HX711 ADC is a ratio metric converter, which means the VDD [Vref for the ADC] of the HX711 ADC has to be the same voltage value as the E+/_ voltage, else you will have a non-linear, inaccurate result.

Do you understand what is meant by ratio metric regards an ADC.?
E
EG 1688.gif
 

Thread Starter

ivanedpratama

Joined Jun 25, 2022
30
Your results are highly non-linear. Repeat your measurements, especially around 100g and 200g.
hi @MrChips & @ericgibbs,

I have re-weighed the 5 kg load cell sensor, supplying the source at E +/- Volts = 3.3 Volts


0 gram = 0.20 mV
100 gram = 0,27 mV
200 gram = 0.34 mV
300 gram = 0.41 mV
400 gram = 0.48 mV
500 gram = 0.55 mV


I hope for your help, I'm glad to meet you.
thank you very much,
 

ericgibbs

Joined Jan 29, 2010
21,536
hi Ivan,
This is a simple plot of your results, it looks linear.

If you intend to measure via the HX711 module, you MUST set AVDD [ref my previous image] to the same voltage value as the E+/- Voltage.

Do you understand why.??
Ref Post #38 Do you understand what is meant by ratio metric regards an ADC.?

E

EG 1689.gif
 
Top