Support on ADC current measurement and Offset removal.
I am kindly asking for support and details in understanding the concept of dc-offset removal from an ADC current measurement in a motor drive application. In particular, I have my calibration parameters (i.e., gain and offset) to convert the raw ADC data to real current in Ampere. I report the function I wrote in the following.
#define GAIN (0.0042)
#define OFFSET (36.007)
void ADC_Convertion(unsigned short ADC_RAW, float CURRENT)
{
CURRENT = ADC_RAW*GAIN- OFFSET;
}
I understand that a further function is needed to remove the offset dynamically that takes into account the sampling frequency of the controller and other information regarding the LSB. If the above is correct, is there anyone who can explain the concept in detail and/or refer to any significant paper/book on the topic? I would really appreciate any help on this.
Kind regards