# How to calculate Weight with AD7796

Question asked by lopezcontreras on Jan 31, 2016
Latest reply on Feb 8, 2016 by lopezcontreras

Hello all,

I am working in a weight scale for persons, that is a range of aprox 3kgr-120Kgr.

I am using AD7796 with exactly the same schematic that can be found in Fig. 17 of pag. 23 of the datasheet. Power supply is 5V.

The load-cell sensor has a sensibility of 2mV/V +-10% and a range 0-200Kgr and powering at 5V.

I am not getting the results that I would expect. I think the problem comes in the process to calculate the weight.

I think I should do:

(1) Reset AD7796 (writing 32 consecutive 1s to the device)

(2) Check if the device is there reading from ID Register 0x5A. If correct I continue with the process.

(3) Set the Configuration register to 0x1710, that is unipolar and channel AIN(+)-AIN(-)

(4) Develop an internal zero calibration, setting Mode Register to 0x800A (internal clock 64Khz, update rate 16.7 Hz)

(5) I take 10 measurements with the weighing hopper empty. Calculate the average of the counts

and store these to rest this quantity to other measurements. This is an offset.

(6) I put on the hopper a known weight of, for example 40Kgr, an take another 10 measurements, calculate the average, rest offset of point (5) and store it. I have so a point (X1,Y1), (weight, ADC output)

(7) I understand that to calculate any unknown weight I need another point,  (X2, Y2) and then calculate the slope of the line

passing for these two points. M= Y2-Y1/X2-X1

(8) Having the M, I can calculate any unknow weight (X, Y) with Y=MX +B, becaue X is the ADC out for the unknow weight Y,

M is the slope and B is the weight when the ADC out is zero, so weight 0, B=0.

So di I need another measure with other known weight (for exmple 20Kgr) to get (X2,Y2) or is there any other method?

Can anyone tell me what is wrong? Should I use another method to calculate the weight? Is there any Application Note describing this process fgoing from ADC count to weiths?