I'm making a digital weight scale with Arduino and CS5532. My problem is to calibrate adc with the offset signal and a known weight signal that is not full scale point. The CS5532 allows me to manually write on calibration registers, but i don't understand the relationship between the gain register value and scale maximum capacity. In the calibration phase, I ask the user to enter the following values:
- Maximum Capacity (ex. 3000 kg)
- Division (ex. 20 or 10, 1, 0.1)
- Sample Known Weight (that is not full scale)
With Maximum Capacity and Sample Known Weight i compute the difference in percentage to calculate the adc value relative to the Maximum Capacity but i don't understand how to valorize the gain register value.
The gain register is a 32-bit register and its meaning is represented by the sum:
D = sum, 0 to 29, bit(i) * 2^(-24 + i)
ex.
00001000000000000000000000000
(bit(0) * 2^(-24 + 0) + bit(1) * 2^(-24 + 1) + ..)
If I run cs5532 system gain calibration (cs5532 native function), gain register value is automatically calculated but this function assumes full scale signal is applied and in my case I don't have the full scale signal.
How to valorize gain register without full scale signal?
To calibrate the adc cs5532, I must supply the converter’s calibration signals which represent ground and full scale, and in this case, i could use the system calibration (cs5532 native function) that compute gain and offset register automatically. I have a sample weight and i dont have the full scale signal. So I have to manually write the gain register and i dont understand the relationship between input signal and the gain register value. So, how can i compute the gain register value given input adc value computed by sample weight in percentage?
CS5532 Datasheet: https://www.mouser.com/datasheet/2/76/CS5532-34-BS_F3-44768.pdf
CS5532 Application Note: https://pdf.dzsc.com/88889/28154.pdf