Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

HX711 mV/V information needed

Status
Not open for further replies.
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-di...or-excitation-and-measurement-techniques.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:

https://www.sunrom.com/p/loadcell-sensor-24-bit-adc-hx711

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!v4c6YKncEqtsAPL8Co9ymDki32VgKPE2ycRGqGWbwOg

- - - 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!I7SokqHcaw7ss-OkXtSkMYjNugPre7LHD4u_x6viDUg
 

Attachments

  • WS-2.jpg
    WS-2.jpg
    519.5 KB · Views: 257
  • WS-3.jpg
    WS-3.jpg
    517.5 KB · Views: 340
Last edited:

@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.weight = (double)(HX711_Read() - weighingScale.noLoadCounts)
                                     * weighingScale.capacityInKgs
                                     * (HX711_Full_Scale_Value / Load_Cell_Max_Output)
                                     * (HX711_Full_Scale_AVDD / Excitation_Voltage)
                                     / Adc_Resolution;

(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.weight = (double)(HX711_Read() - weighingScale.noLoadCounts)
                                     * weighingScale.capacityInKgs
                                     * (HX711_Full_Scale_Value / Load_Cell_Max_Output)
                                     / Adc_Resolution;

(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_Sensitivity_mV_Per_V	 2.0	//2mV/V
#define Load_Cell_Excitation_Voltage     4.3	//AVDD or E+
#define Load_Cell_Max_Output		(Load_Cell_Sensitivity_mV_Per_V * Load_Cell_Excitation_Voltage)	//2mV/V * 4.3V = 8.6mV

weighingScale.weight = (double)(HX711_Read() - weighingScale.noLoadCounts)
                                     * weighingScale.capacityInKgs
                                     * (HX711_Full_Scale_Value / Load_Cell_Max_Output)
                                     / Adc_Resolution;
 
Last edited:

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.
 
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_Sensitivity_mV_Per_V	 2.0	//2mV/V
#define Load_Cell_Excitation_Voltage     4.3	//AVDD or E+
#define Load_Cell_Max_Output		(Load_Cell_Sensitivity_mV_Per_V * Load_Cell_Excitation_Voltage)	//2mV/V * 4.3V = 8.6mV

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?
 

Auto calibration is only useful with a calibration weight.

AVDD has no effect on calibration.
 
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 (for say 30 Kgs for 30 kg Load Cell) = (rawAdcValue * 40.0) / Adc_Resolution

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
                                     * (HX711_Full_Scale_Value / loadCell.maxOutput)
                                     / Adc_Resolution;

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

loadCell.maxOutput = (((rawAdcValue * loadCell.capacity) / knownCalibrationWeight) * HX711_Full_Scale_Value) / Adc_Resolution

Eg:

If rawAdcValue = 240473.42933 for 2 Kgs known weight, then

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

loadCell.maxOutput = 8.6 //8.6mV
 

    chintvan

    Points: 2
    Helpful Answer Positive Rating
Hi,

Mybe the customer means auto offset calibration...

Klaus
 

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
 

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
 
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.
 
Last edited:

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!AFMkwX04EMum5pve9p0s_pDtHl8h9TRkgkVkSygCW5U
 

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

Load Cell Ultimate Overload is 200% and
Safe Overload is 150%.

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?

I asked him to pay more for adding code to overload other higher capacities.

I said the Load Cell will get permanently damaged or deformed with overloading.
 

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
 

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.
 

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

So, how about measuring 100kgs with a 30kgs Load cell?

@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.
 
Last edited:

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
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top