
Thread: Hx711 calibration – 280 days old
-
16th May 2018, 14:57 #1
2Hx711 calibration
Iam using load cell amplifier HX711 module.I have got raw values from module but iam not able to calibrate with load cell.I want make a universal calibration factor in which I can use any type of load cell. Secondly I want to tare the values.pls help.
-
18th May 2018, 15:45 #2
2Re: Hx711 calibration
Hello,
No calibration is almost impossible, load cells works with very low signals so it's important to gage it. I suggest that you create a calibration routine, that you record no load value and a loaded value, like 1 Kg.
Ricardo Urio
-
19th May 2018, 08:32 #3
3Re: Hx711 calibration
Pls guide me ,how I can get average of adc values.example needed.
-
21st May 2018, 12:05 #4
0Re: Hx711 calibration
Hello,
It's a very basic question, and you will need to make some research. A initial way is to create a routine where you read 12 times the adc value, recording the sum of all values and min and max, in the end you divide the sum by 10 after subtracting the min and max values. It's necessary to do it with no load and with a knowed load. After it the variation Kg/mv wil be defined.
Ricardo Urio
-
21st May 2018, 23:40 #5
- Join Date
- Feb 2002
- Posts
- 2,608
- Total Downloaded
- 2.92 GB
Thumbs Up Received: 116
Given: 31
0Re: Hx711 calibration
Hello Amod
Another way is to bring in an odd number of samples into an array, sort the array and then use the middle value. I saw this elsewhere on the forum and it seems to work well although I think Ricardo's method is a good solution too.
In the past I have just sampled a number of times and calculated an average.
John
-
25th May 2018, 15:23 #6
0Re: Hx711 calibration
I got the values in kg and they are stable.
I want to include TARE function to my project.When i minus current reading it gets zero but till i press button.When i Release button same old readings displays.
pls Help.
-
27th May 2018, 07:38 #7
- Join Date
- Mar 2006
- Posts
- 783
- Total Downloaded
- 645.44 MB
Thumbs Up Received: 23
Given: 16
0Re: Hx711 calibration
Hi Amod
I would do it something like this:
Use an adjustment variable, initially set to zero, when you press the button set the adjustment variable to the current averaged ADC value from the load cell.
For the output/display reading subtract the adjustment variable from the current averaged ADC output.
If you have trouble doing that post your code and I'm sure you'll get some help.
-
28th May 2018, 09:12 #8
0Re: Hx711 calibration
my Program
Device = 16F877A
Xtal = 20
All_Digital On
Include "modedefs.bas"
Declare LCD_DTPin = PORTB.4
Declare LCD_RSPin = PORTB.2
Declare LCD_ENPin = PORTB.3
Declare LCD_Interface = 4
Declare LCD_Lines = 2
Declare LCD_Type = 0
Dim y As Dword
Dim i As Byte
Dim COUN As Dword
Dim gram As Float
Dim Value As Word
Symbol TARE = PORTC.3
Symbol ADDO = PORTC.4
Symbol ADSK = PORTC.5
TRISC=%00011000
DelayMS 150
Cls
Main:
ADDO=1
ADSK=0
COUN=0
While ADDO=1:Wend
For i= 0 To 23
ADSK=1
COUN=COUN<<1
ADSK=0
If ADDO =1 Then Inc COUN
Next i
ADSK=1
COUN=COUN^0x800000
gram=8388608-COUN
gram=((coun-124000)*10)/500
gram=gram-165090
y=0
If TARE=1 Then y=y-gram
ADSK=0
Print At 2,4, Dec1 y
GoTo Main
-
1st June 2018, 06:50 #9
- Join Date
- Mar 2006
- Posts
- 783
- Total Downloaded
- 645.44 MB
Thumbs Up Received: 23
Given: 16
0Re: Hx711 calibration
I think something like this should give you an idea:
Code:If BUTTON1 = 0 Then adjustmentVal = gram EndIf displayVal = gram - adjustmentVal
You would need to make the button an input on a pic port (to ground) and have a pull-up resistor or enable one in software.
-
3rd June 2018, 17:23 #10
0Re: Hx711 calibration
Thanks SimonJA.I got my work done.
My new problem is that my program runs fine on lcd but when i converted my code for 6 digit seven segment display all segment blinks for half a second repeatedly.
and it only show positive value and doesnt show negetive value.
here is my code
Device = 16F877A
Xtal = 16
Include "modedefs.bas"
All_Digital = True
Dim dg1 As Dword
Dim DG2 As Dword
Dim DG3 As Dword
Dim DG4 As Dword
Dim DG5 As Dword
Dim DG6 As Dword
Dim DIGIT As Dword
Dim DG As Byte
Dim COUNTT As Byte
Symbol TARE = PORTD.4
Symbol ADDO = PORTC.3
Symbol ADSK = PORTC.4
Dim N As Float
Dim adjval As Dword
Dim disval As Float
Dim i As Byte
Dim COUN As Dword
Dim gram As Float
TRISA=0
TRISC=%00001000
TRISB=0
TRISD=%00010000
TRISE=0
GoSub display
Main:
ADDO=1
ADSK=0
COUN=0
While ADDO=1:Wend
For i= 0 To 23
ADSK=1
COUN=COUN<<1
ADSK=0
If ADDO =1 Then Inc COUN
Next i
ADSK=1
COUN=COUN^0x800000
gram=8388608-COUN
gram=gram/50
ADSK=0
If TARE=0 Then 'tare routine
adjval=gram
EndIf
disval=gram-adjval
N=disval
GoSub display
GoSub DIGITCALC
GoTo Main
display:
For COUNTT=0 To 99
PORTB=dg1
PORTA.5=0
DelayUS 100
PORTA.5=1
PORTB=DG2
PORTA.4=0
DelayUS 100
PORTA.4=1
PORTB=DG3
PORTA.3=0
DelayUS 100
PORTA.3=1
PORTB=DG4
PORTA.2=0
DelayUS 100
PORTA.2=1
PORTB=DG5
PORTA.1=0
DelayUS 100
PORTA.1=1
PORTB=DG6
PORTE.0=0
DelayUS 100
PORTE.0=1
Next COUNTT
Return
DIGITCALC: ''THIS ROUTINE BREAKS UP THE NUMBER INTO 3 DISTINCT PARTS - DG1,DG2,DG3,DG4,DG5,DG6
'NOTICE THAT ANOTHER SUBROUTINE IS CALLED EACH TIME
DIGIT=0
LP1:
If N<10000 Then DS1
N=N-10000
DIGIT=DIGIT+1
GoTo LP1
DS1:
GoSub FND
dg1=DG
DIGIT=0
LP2:
If N<1000 Then DS2
N=N-1000
DIGIT=DIGIT+1
GoTo LP2
DS2:
GoSub FND
DG2=DG
DIGIT=0
LP3:
If N<100 Then DS3
N=N-100
DIGIT=DIGIT+1
GoTo LP3
DS3:
GoSub FND
DG3=DG
DIGIT=0
LP4:
If N<10 Then DS4
N=N-10
DIGIT=DIGIT+1
GoTo LP4
DS4:
GoSub FND
DG4=DG
DIGIT=N
GoSub FND
DG5=DG
Return
'_________________________________________________ _________________________
'_________________________________________________ _________________________
FND: ''THIS ROUTINE IDENTIFIES THE SEGMENTS TO LIGHT UP
'7 SEGMENTS WIRED UP AS FOLLOWS
'A -PORTB.7
'B -PORTB.6
'C -PORTB.5
'D -PORTB.4
'E -PORTB.3
'F -PORTB.1
'G -PORTB.2
'DECMAL=PORTB.0
FND0:
If DIGIT>0 Then FND1
DG=%00000101
GoTo FNDEND
FND1:
If DIGIT>1 Then FND2
DG=%10011111
GoTo FNDEND
FND2:
If DIGIT>2 Then FND3
DG=%00100011
GoTo FNDEND
FND3:
If DIGIT>3 Then FND4
DG=%00001011
GoTo FNDEND
FND4:
If DIGIT>4 Then FND5
DG=%10011001
GoTo FNDEND
FND5:
If DIGIT>5 Then FND6
DG=%01001001
GoTo FNDEND
FND6:
If DIGIT>6 Then FND7
DG=%01000001
GoTo FNDEND
FND7:
If DIGIT>7 Then FND8
DG=%00011111
GoTo FNDEND
FND8:
If DIGIT>8 Then FND9
DG=%00000001
GoTo FNDEND
FND9:
DG=%00011001
FNDEND:
Return
'______________________________
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thank you for your attention.
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thank you for your attention.
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thank you for your attention.
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thank you for your attention.
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thank you for your attention.
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thank you for your attention.
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thank you for your attention.
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thank you for your attention.
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thank you for your attention.
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thank you for your attention.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Read HX711
By basparky in forum Proton Plus Compiler v3Replies: 9Last Post: 25th March 2018, 07:54 -
ADC Calibration
By dmTulsa in forum Tips 'n TricksReplies: 0Last Post: 24th February 2010, 20:43 -
ADC calibration
By dmTulsa in forum The LoungeReplies: 19Last Post: 18th February 2010, 06:42 -
touchpad calibration
By buddhafragt in forum Proton Plus Compiler v3Replies: 11Last Post: 29th September 2009, 16:08 -
Calibration
By dmTulsa in forum Proton Plus Compiler v3Replies: 8Last Post: 29th December 2006, 16:17
Proton Compiler Updates
Full install of 8-bit Proton and Proton24 Download the full compiler...
1st January 1970, 01:00