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.
1. Looks like your common mode is below the expected common mode of 2.5V, from the table it just 2.25V. With this common and your gain setting at single supply, the amplifiers negative output will be saturated. With 11.3mV inputs of 2.25V common mode the expected voltage at AIN_1_1 is 5.65mV*462.5= -2.613125, your common mode of 2.25V is not enough to level up your input above GND. So the possible solution is to lessen your gain or increase your common mode. It is also expected to have some offset and gain error in your load cell. Your measured full scale voltage is 11.3mV which is ideally 2mV/V *5V = 10mV only. Assuming that the load cell is balanced (2.5V common mode) and free of offset and gain errors, your system should work as it is. But this is not the case, like I mentioned above, 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. So please lower your gain and perform a system calibration as described above.
2. In terms of the circuit note, you can use this as your reference circuit for temperature compensation. Basically you need a temperature sensor such as RTD to monitor the temperature of your system. You have to re-calibrate your system every time a temperature is changed, however, it may be difficult and hassle to perform at all times. That's why I would suggest to create a table with pre define temperature points (from 0C to 40C), perform calibration at each temperature and record the offset and gain calibration coefficient for each calibration. Then the microcontroller can do the logic and process of replacing the required coefficient every time the temperature is changed. You can use interpolation to approximate value of other points.
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?