I´m using AD7172-2 converter, with external amplifier, in bipolar mode input. The load cell is 30kg capacity and 2mV/V, and the excitation voltage is +5VDC (REF is +5VDC too to do ratiometric system). I attach the scheme.
1- I have configured the Gain of amplier to 426.5 (Rg=470R). When I put about 27-28kg in load cell, AIN1_1 respect to AGND is 0V (it´s saturated). I don´t understand this. I attach table. Any suggestions? Actually, I have configurated the Gain of amplifier to 295.1 (Rg=680R), but I get less points.
2- What is the procedure to compensate temperature drifts by software, on a weighing scale? Using AD7172-2 with DC excitation of load cell, It generates temperature drifts of the electronic components, which must be compensated, for legal trading, or to meet metrological standards.
1. I would like to clarify something in your schematic and setup. I'm confused with the naming convention, does IN+/IN- your differential output? Are you probing this values on your table or reading it directly from ADC? You are reading the positive and negative input to GND, I assumed that the common mode voltage should be 2.5V? Why it looks like its dropping? Have you calibrated your system? A load cell has an offset or TARE around 50% and as well as a gain error up to 20% that's why ADCs full range is not typically used in weigh system application and load cell always need calibration. Can you lower your gain let say for example to 128 so that the offset and gain error do not overload the ADC.
In terms of calibration,
System zero scale calibration: empty pan. Ask ADC to perform the system offset calibration.
Full scale calibration: place full scale weight on pan. This generates a FS voltage. With Vref = 5V, the FS signal that the ADC can accept is +/-40mV. The part can only perform system FS calibrations if the applied input is at least 80% of the ADC’s FS value. For this reason, the calibration needs to be performed in the uC. With the full scale weight applied to the loadcell, perform a conversion. The result is equivalent to the max weight applied. So, all further conversions need to be corrected in the uC (for FS correction).
Conversion FS code = 30kg
Conversion ZS code = 0g (assuming bipolar mode and a system offset cal has been performed).
All further conversions are then scaled
Conversion 0x?????? = ((30kg)/(FS code – ZS code))*(0x?????? – ZS code) kg
2. You can use this as your reference for temperature compensation. https://www.analog.com/en/design-center/reference-designs/hardware-reference-design/circuits-from-the-lab/cn0355.html#rd-description
About your questions...
"does IN+/IN- your differential output?" --> Yes, this signals are signal + and signal - from 4 wires load cell. AIN0 is IN+ (signal+) amplified, and AIN1 is IN- (signal-) amplified.
"Are you probing this values on your table or reading it directly from ADC?" --> The values of table are measured with a multimeter, in points indicated, in the real PCB circuit, and with 30kg load cell connected.
"You are reading the positive and negative input to GND, I assumed that the common mode voltage should be 2.5V? Why it looks like its dropping?" --> I don´t know why it looks like its dropping, but VDC=+5V_DA, and I have measured it with multimeter and the voltage is OK (+5.02VDC).
"Have you calibrated your system?" --> The internal zero callibration only.
What is the advantage of amplifying less? Okay, I will lower the gain, but I don't think the converter is saturated.
I will try your method.
2- I really don't understand how this application note can help me. CN0355.The goal is for the weighing scale to mark the same weight from 0 degrees to 40 degrees.
Thank you for your answers, they are very useful for me.One last question about calibration. Do you think we have to make an individual calibration table for each device, or would a general calibration table work?
Every device have different default factory calibrated coefficient, thus it can also have different values upon performing calibrations though it can be of a close range of values. I would suggest to try to evaluate your system with at least 3 boards and see how the coefficients varies.
Sorry Jellenie again,
So, I just have to write the system offset calibration on the chip AD7172-2, witn empty pan.
I have to use the full scale point (with a known weight) to calculate the equation of the line, which is the equation you indicate above, and from there, calculate the proportional weight.
This is OK?
The Temperatura compensation is understood.
Yes, that's correct. Perform system offset calibration (with empty pan). Measure the ZS code (with empty pan), Measure the FS code (with maximum weight). Use the measured full scale code and zero scale code on the above equation to calculate the proportional weight.
I don't know if I should have opened a new thread or continue on it. I want to read the internal temperature sensor (to compensate for thermal drifts), and I can't do it, or I don't know very well how. Can you put a small code example?Right now, I read the weight and temperature in differential mode. The formula I use is temperature (ºC)=(((float)"ADC readings"/477)-273.15)/1000, but I am not getting real values.
May I know If you enabled the internal reference? When the internal temperature sensor is used, the internal reference must be selected. It also requires the analog input buffers to be enabled.
Regarding the formula, it looks okay except for /1000 what does it for? To be able to measure accurately, we recommend to calibrate the device at a known temperature (25C) and take that conversion as a reference point.
May I know what value or readings are you getting?
I have configured a single channel to read the internal temperature of the chip. The result of the converter is 0xffffff, and in the status register, in the ADC_ERROR bit it returns a 1.
I enclose the values of the registers, to see if you can tell me if I have any badly configured.
Can you label the registers name? I would like to see the register value of the ADCMODE, CHx, SETUPCON registers. We need to ensure that you enabled the REFEN bit in the ADCMODE register and select the internal reference ins the REFSELx bit in the SETUPCONx register.
Thank you very much for your help, I accidentally set the REFEN bit to 0. Now I read correct values.
Could you tell me what calculation I should do to pass the points read to degrees Celsius. I do not understand what it indicates in the datasheet.
The formula is Temperature (C) = (Conversion in V/477uV)-273.15. May I know what code did you get at ambient? May I know also if you are in bipolar mode setting?