# HX711 mV/V information needed

1. ## Re: HX711 mV/V information needed

Now, what is wrong in my latest equation?
As said, the factor of 1.16.

2. ## Re: HX711 mV/V information needed

The factor of 1.16279 is only for my Proteus setup of AVDD 4.3V. For hardware, I will change it based upon the HX711 module's AVDD.

Here it shows ratiometric operation.

https://www.analog.com/en/analog-dia...echniques.html

DOUT or HX711_rawValue = AIN / AVDD

Is this correct? AIN = AIN+ - AIN-

If my Capacity is set to 30 Kgs and ADdcResolution is 2^24 then what final equation I have to use to get the weight value using ratio metric operation?

I thought about using the 1.16279 (which will be set accordingly for each weighing machine based on it's HX711 module's AVDD and Load Cell max output based on AVDD).

Another question related to HX711 hardware designing.

In this HX711 internal circuit:

Why should I use the transistor to get AVDD or VREF voltage for the ADC? Why can't I omit the transistor and connect the DVDD directly to AVDD pin and also E+ pin and get 10mV output from my current Load Cell (2mV/V, 1000 Ohms)?
What is the purpose of the transistor?

- - - Updated - - -

These are my Load Cell's output voltages. See attached images.

@FvM

Tell me the super simple equation to get the final weight value.

- - - Updated - - -

Tested and working fine in Proteus. Will test on hardware today.

The only issue in code is I have to set these values manually based on each weighing scales HX711's AVDD and Load Cell's output value.

Code:
```#define AVDD_Recommended 5.0
#define AVDD_Actual 4.3

#define HX711_Full_Scale_value_mV_Per_V_For_Gain_128 40 //+/-20 mV/V = 40 mV
#define Load_Cell_Full_Scale_Value_mV_Per_V_Multiplied_By_Excitation_Voltage 10 //2 mV/V * 5V = 10mV```
See video.

https://mega.nz/#!eUBjWYgZ!v4c6YKncE...PE2ycRGqGWbwOg

- - - Updated - - -

Proteus Load Cell model displays value as 0 to 100% as it is a general transducer model.

My Capacity settings is 30.0 Kgs.

See this video. I am getting exact values.

18% on Proteus Load Cell model and 5.4 Kgs on 7 Segment display.

30.0 Kgs * 18% = 5.4 Kgs

https://mega.nz/#!LQ4GQYIQ!I7SokqHca...7LHD4u_x6viDUg

3. ## Re: HX711 mV/V information needed

@FvM, Klaus and other experts,

Of these two codes which one is correct?

Code - 1

Code:
```#define Adc_Resolution 16777216.0

#define HX711_Full_Scale_Value 40.0	//Channel A, Gain 128, Clocks 25 = +/-20mV = 40mV
#define Load_Cell_Max_Output   10.0	//Sensitivity = 2mV/V, For 5V Excitation Voltage it is 2mV/V * 5V = 10mV

#define HX711_Full_Scale_AVDD 5.0	//For Full Scale 40mV AVDD should be 5.0V
#define Excitation_Voltage    4.3	//Actual AVDD

* weighingScale.capacityInKgs
* (HX711_Full_Scale_AVDD / Excitation_Voltage)
(40.0/10.0) * (5.0/4.3) = 4.6511

Code - 2

Code:
```#define Adc_Resolution 16777216.0

#define HX711_Full_Scale_Value 40.0	//Channel A, Gain 128, Clocks 25 = +/-20mV = 40mV
#define Load_Cell_Max_Output   8.6	//Sensitivity = 2mV/V, For 4.3V Excitation Voltage it is 2mV/V * 4.3V = 8.6mV

* weighingScale.capacityInKgs
(40/8.6) = 4.6511

According to me Code - 2 is correct.

Edit 1:

Same as Code - 2 but more readable and understandable.

Code - 3

Code:
```#define Adc_Resolution 16777216.0

#define HX711_Full_Scale_Value		40.0	//Channel A, Gain 128, Clocks 25 = +/-20mV = 40mV

#define Load_Cell_Excitation_Voltage     4.3	//AVDD or E+

* weighingScale.capacityInKgs

4. ## Re: HX711 mV/V information needed

Why should I use the transistor to get AVDD or VREF voltage for the ADC? Why can't I omit the transistor and connect the DVDD directly to AVDD pin and also E+ pin and get 10mV output from my current Load Cell (2mV/V, 1000 Ohms)?
What is the purpose of the transistor?
It's an AVDD regulator, useless in ratiometric bridge configuration if your power supply is at least short time stable and ripple-free. I would connect DVDD and AVDD.

As long as the load cell is supplied by AVDD, the digital output does not change with varying AVDD. Just use nominal 5V ADC range and 5V load cell sensitivity for your calculations. If actual AVDD is different, both values scale with the same factor. The ADC offset effect increases with reduced AVDD, but it's compensated by your unload measurement.

1 members found this post helpful.

5. ## Re: HX711 mV/V information needed

I have a new question.

Client needs auto-calibration of Load Cell feature. HX711 will be used.

So, how to get these values automatically?

Code:
```#define HX711_Full_Scale_Value		40.0	//Channel A, Gain 128, Clocks 25 = +/-20mV = 40mV

#define Load_Cell_Excitation_Voltage     4.3	//AVDD or E+
I can get AVDD or E+ in runtime using 10-bit ADC of PIC. What about others?

- - - Updated - - -

Edit:

This value is fixed.

Code:
`#define HX711_Full_Scale_Value		40.0	//Channel A, Gain 128, Clocks 25 = +/-20mV = 40mV`
AVDD or E+ I can get from ADC 10-bit of PIC.

How to find out Sensitivity of Load Cell for auto-calibration that is I can't put say 2mV/V in code but need to get it when device is first powered and saved it in eeprom. How to do it?

6. ## Re: HX711 mV/V information needed

Auto calibration is only useful with a calibration weight.

AVDD has no effect on calibration.

1 members found this post helpful.

•

7. ## Re: HX711 mV/V information needed

Originally Posted by FvM
Auto calibration is only useful with a calibration weight.

AVDD has no effect on calibration.
Yes, I found out that myself.

I found out the auto-calibration procedure myself. Will post it here after project completes.

Currently, I am using the max capacity of the Load Cell as the calibration weight that is if Load Cell Capacity is 30 Kgs then I will use 30 Kgs as the calibration weight.

- - - Updated - - -

Auto-calibration process

This will be hardcoded

Code:
```#define Adc_Resolution			16777216.0
#define HX711_Full_Scale_Value		40.0	//Channel A, Gain 128, Clocks 25 = +/-20mV = 40mV```
So, for 40mV HX711 output will be 16777216.0

Now, if rawAdcValue is say 3607101.44 then

we can auto-calibrate by using

loadCell.maxOutput = (3607101.44 * 40) / 16777216.0 = 8.6 (mV)

This completes the auto-calibration.

Then I can use this code to find out weight.

Code:
```weighingScale.weight = (double)(HX711_Read() - weighingScale.noLoadCounts)
* weighingScale.capacityInKgs
With known lower weight than capacity of load cell

30 kgs = 3607101.44
2 kgs = t
t = (2 kgs * 3607101.44) / 30 kgs = 240473.42933333333333333333333333

Eg:

If rawAdcValue = 240473.42933 for 2 Kgs known weight, then

loadCell.maxOutput = (((240473.42933 * 30.0) / 2.0) * 40.0) / 16777216.0

•

8. ## Re: HX711 mV/V information needed

Hi,

Mybe the customer means auto offset calibration...

Klaus

9. ## Re: HX711 mV/V information needed

Originally Posted by KlausST
Hi,

Mybe the customer means auto offset calibration...

Klaus
No. Only auto-calibration which is done at factory or field by enabling a jumper.

10. ## Re: HX711 mV/V information needed

I have one more issue.

I have a parameter named Accuracy for weight. It has three options 1, 2 and 5.

How to implement these?

Code:
```1.	If set the Acc = 1, then machine will increase like (0.000), (0.001) , (0.002) , (0.003) , (0.004) , (0.005) , (0.006) , (0.007) , (0.008) , (0.009, (0.010) Up to (30.000), Every time Increase only 1 number.

2.	If set the Acc = 2, then machine will increase like (0.000), (0.002) , (0.004) , (0.006) , (0.008) , (0.010) , (0.012) , (0.014) , (0.016) , (0.018, (0.020) Up to (30.000), Every time Increase only 2 number.

If set the Acc = 5, then machine will increase like (0.000), (0.005) , (0.010) , (0.015) , (0.020) , (0.025) , (0.030) , (0.035) , (0.040) , (0.045, (0.050) Up to (30.000). Every time Increase only 5 number```

11. ## Re: HX711 mV/V information needed

Hi,

For 0.001 you may multiply with 1000, then do the rounding to integer, then divide by 1000
For 0.002 ... multiply with 500
For 0.005 ... multiply with 200

But I assume there are better ways to do this.

Klaus

1 members found this post helpful.

•

12. ## Re: HX711 mV/V information needed

What are the other better ways?

13. ## Re: HX711 mV/V information needed

Auto-calibration method is working but I am getting fluctuating weight values (rapid) as my no load counts (value) is fluctuating. What should I do to stabilize the no load counts.

no load counts = raw HX711 output value when there is no weight.

In Proteus it works very fine as the no load counts are stable in it.

Can I connect GND of HX711 module to say -5V and VDD/VCC of HX711 module to +10V to stabilize the no load counts? I guess the noise from power supply is causing the fluctuations.

14. ## Re: HX711 mV/V information needed

In Proteus the weight value is stable but in hardware, the weight is fluctuating because the no-load value is fluctuating.

In video, you can see value after CAL screen and that is no load count and it is stable in Proteus as there is no noise in the power supply. In hardware, it is fluctuating and hence I am not getting precise weight reading and also there is a radip fluctuation of weight value.

How to solve it?

Video (20 MB)

https://mega.nz/#!7MAGgYpb!AFMkwX04E...TRkgkVkSygCW5U

15. ## Re: HX711 mV/V information needed

Client tested it and got accurate results. Weighing Scale working fine now.

https://mega.nz/#!uAACCA6b!Ptfi4DBGu...Nh4Junl36Xs6Bo

16. ## Re: HX711 mV/V information needed

The client is telling that with my code a 600gms Load Cell is easily measuring up to 30kgs weight accurately.

200% of 600gms = 120gms; 720gms (Ultimate Overload)
150% of 600gms = 90gms; 690gms (Safe Overload)

He wants to use overloading and save a few bucks. Is that okay?

17. ## Re: HX711 mV/V information needed

Hi,

200% of 600gms = 120gms;
200% of 600gms = 1200gms;

100% = 600g, thus 2 x 100% = 2 × 600g = 1200g.

But if the client abuses the sensor, then it's not your problem.

Klaus

18. ## Re: HX711 mV/V information needed

hello,

you tell us that before : LoadCell.maxOutput (for say 30 Kgs for 30 kg Load Cell) ?

what is the range of loadcell 30Kg or other value ?..
where is the problem except with your own scaling -by amplifier and ) software , maybe to adapt booth
to mesuring this 30Kg range.

19. ## Re: HX711 mV/V information needed

I will explain with an example.

Let's say we are using a 30kgs 2mV/V Capacity Load Cell with HX711 @ 128 as gain and 5V as excitation voltage (EV), then

for 5V EV and 30kgs weight we get 10mV output from Load Cell and HX711 can handle max 40mV (128 gain, 24 clocks).

So, 10mV x 4 = 40mV and so, 30kgs x 4 = 120kgs.

So, we can at-least measure 100kgs with a 30kgs Load Cell.

200% is Ultimate Overload value and 150% is Safe Overload value and so,

200% of 30kgs = 60kgs
150% of 30kgs = 45kgs

@paulfjujo

Implementing it is not the problem. I have option to enter CAP (actual capacity) value and CAPExt (Overload capacity) value. CAP will be used for auto-calibration and CAPExt if >= CAP will be used for weight calculation.

Note: Assuming the strain curve will be linear for overloaded value.

•

20. ## Re: HX711 mV/V information needed

helllo

the only way is to use 3 or 4 load cell of 30Kg !
even your measure chain seems to be compliant to get 10mv X 3 or 10mV x 4

or use a Mechanic way (Lever system) to divide the strenght applied to one load cell, when input is 100Kg

1 members found this post helpful.

--[[ ]]--