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.

Weighing Scale application using NAU7802 and 8051

Status
Not open for further replies.

RohanDey

Member level 2
Member level 2
Joined
Feb 17, 2013
Messages
42
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
India
Visit site
Activity points
1,688
Hello,

I am trying to develop a weighing scale application using 8051 and NAU7802 ADC. So far I am able to get the counts from the ADC.

I am using a 10Kg, 2mV/V Loadcell, with 5V excitation voltage.
For the ADC I am using a reference voltage of 4.5V. The ADC is a 24-bit one.

My question is, from the ADC counts, how do I convert them to weight values in Kg?

The counts which I retrieved from the ADC, at PGA gain = 1 are:
1. At no load - 16,000
2. At 1Kg load - 19,080
3. At 2Kg load - 22,170

Please help..

Thanks
 

I assume your sensor gives linear output. I hope you understand this.

No load = 16000

@ 1 Kg = 19080

@ 2 Kg = 22170

19080-16000 = 3080

22170-16000 = 6170 (6170 / 2 = 3085, approx 3080)


Post datasheet of sensor.


Vref = 4.5V

Resolution is 24 bit = 16777216 counts

0 to 16777215


If your sensor gives linear output then

16777215 - 16000 = 16761215

4.5V = 16761215 raw ADC value

x = 3080 = 8.269090277763277e-4 V = 1 Kg

3080 = 1 Kg

16761215 = y Kgs

y = 5441.952922077922 Kgs

With 4.5V Vref for ADC, 5441.952922077922 Kgs can be measured.


16761215 * z = 5441.952922077922

z = 3.246753246753247e-4

1/z = 3080 = (19080 - 16000)


WeightInKgs = (RAW_ADC_VALUE - 16000) / 3080;

If RAW_ADC_VALUE = 22170 then

(22170 - 16000) / 3080 = 6170 / 3080 = 2.003246753246753 Kgs.
 
That's a brilliant explanation. Thank you very much.

What happens if I change the Loadcell?

Here we are calculation the weight from the equation:
WeightInKgs = (RAW_ADC_VALUE - 16000) / 3080, where the value 3080 comes from testing different loads using this particular Loadcell. If I change the Loadcell to a 50Kg, 2mV/V one will this value (3080) be same?
 
What is the 50 Kg max Loadcell's o/p without load and with 1 Kg load?

Yes, it will be same. 5000+ Kgs I mentioned is with 2mV/V sensor and 24 bit ADC. The max value the ADC can show is 5000+ kgs but if your Loadcell range is 0 - 50 Kgs and 2mV/V then for 50 Kgs the adc value will be 3080 * 50 = 184800.

No load = 16000 and 50 Kgs = 184800

Actual value for 50 Kgs will be 184800 - 16000 = 168800.

(168800 - 16000) / 3080 = 49.61038961038961 approx 50 Kgs.
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top