How to do calibration?

I am using AD7124-8 for data acquisition. There are 7 channels to be connected to K-type Thermocouple. All channels are using setup 0 with gain of 16.  We have used Isolator between MCU and AD7124-8. 

Questions:

1. When I feed 1mV (25 deg C as per K-Type chart) on a channel, I am getting 1.1mv ((29 degree C) as per the Received Hex code calculation. When I feed Higher voltage, for example 20 mV(485 degree C), I am getting 21.5 mv (520 degree C).But, My application requirement is 1 deg C tolerance with respect to what I feed at input. Problem is that Unwanted voltage is adding to input.

How to overcome this?

 

2. Right now, I am not using Calibration features in My program.

Can I enable calibration for all channels? 

Calibration is one time run Or It has to be run always?

Please guide me to use calibration feature in Our program....

  • Hi, Muthu.

    The AD7124 offers four calibration modes to get rid of the input offset and gain errors. Internal zero-scale calibration mode, Internal full-scale calibration mode, System zero-scale calibration mode and System full-scale calibration mode. At internal zero-scale, the selected positive analog input pin is disconnected, and both modulator inputs are connected internally to the selected negative analog input pin. At internal full scale, a full-scale input voltage is automatically connected to the selected analog input. At System calibrations, however, expect the system zero-scale (offset) and system full-scale (gain) voltages to be applied to the ADC pins before initiating the calibration modes.

    To start a calibration, write the relevant value to the mode bits in the ADC_CONTROL register. The DOUT/RDY pin and the RDY bit in the status register go high when the calibration initiates. When the calibration is complete, the contents of the corresponding offset or gain register are updated, the RDY bit in the status register is reset, the DOUT/RDY pin returns low (if CS is low), and the AD7124-8 reverts to idle mode.

    Each channel has its own offset and gain registers. Therefore, each channel can be calibrated. However, only one channel at a time can be active during the calibration. When a channel is selected, the offset and gain registers for that channel are automatically selected. You can run calibration upon initialization and a new calibration is only needed if the reference source, polarity or the gain for that channel is changed or if you wishes to re-calibrate because the temperature has changed significantly. After each conversion, the ADC conversion result is scaled using the ADC calibration registers before being written to the data register. 

     

     Please refer to Calibration section (page 51) of the datasheet for further details.

     

    Thanks,

    Jellenie

  • Hi Jellenie,

    Q1:

    There is any specific range for the coefficients value to be updated in Gain and Offset register. So that I can know whether calibration is performed or not. This can be an alternative to RDY bit test. 

    Q2:

    Assume, there are 5 channels to be connected to 5 RTD. I am switching IOUT0 and IOUT1 between channels in continuous conversion.

    Before doing calibration on a particular channel, Current output of that channel should be enabled?  

    Q3:

    If I use setup 0 for channel 0, channel 2 and channel 4 and Setup 1 for Channel 1 and Channel 3,

    channel 0 and channel 1 calibration valid for other channels that using same setup.

    Q4:

    Should I use Updated coefficient in Gain register and Offset register in formula?

    Here is the snippet of Our code

    void Channel0_calibration(void)
    {
    ad7124_regs[AD7124_ADC_Control].value=ad7124_regs[AD7124_ADC_Control].value ^ 0x18; // Full scale calib
    ret=AD7124_WriteRegister(ad7124_handler,ad7124_regs[AD7124_ADC_Control]);
    ret= AD7124_WaitForConvReady(ad7124_handler, timeout);
    ret = AD7124_ReadRegister(ad7124_handler,&ad7124_regs[AD7124_Gain_0]);
    G_coeffiecient = ad7124_regs[AD7124_Gain_0].value;


    ad7124_regs[AD7124_ADC_Control].value=ad7124_regs[AD7124_ADC_Control].value ^ 0x0C; //Zero scale calib
    ret=AD7124_WriteRegister(ad7124_handler,ad7124_regs[AD7124_ADC_Control]);
    ret= AD7124_WaitForConvReady(ad7124_handler, timeout);
    ret = AD7124_ReadRegister(ad7124_handler,&ad7124_regs[AD7124_Offset_0]);
    offset_coefficient=ad7124_regs[AD7124_Offset_0].value;
    }

    void Channel1_calibration(void)
    {
    ad7124_regs[AD7124_Channel_0].value=ad7124_regs[AD7124_Channel_0].value ^ 0x8023; //disabled channel 0
    ret=AD7124_WriteRegister(ad7124_handler,ad7124_regs[AD7124_Channel_0]);
    ad7124_regs[AD7124_Channel_1].value=0x9085;
    ret=AD7124_WriteRegister(ad7124_handler,ad7124_regs[AD7124_Channel_1]);
    ad7124_regs[AD7124_ADC_Control].value=ad7124_regs[AD7124_ADC_Control].value ^ 0x0C; //Full scale calib
    ret=AD7124_WriteRegister(ad7124_handler,ad7124_regs[AD7124_ADC_Control]);
    ret= AD7124_WaitForConvReady(ad7124_handler, timeout);
    ret = AD7124_ReadRegister(ad7124_handler,&ad7124_regs[AD7124_Gain_1]);
    G_coeffiecient1 = ad7124_regs[AD7124_Gain_1].value;


    ad7124_regs[AD7124_ADC_Control].value=ad7124_regs[AD7124_ADC_Control].value ^ 0x0C; //Zero scale calib
    ret=AD7124_WriteRegister(ad7124_handler,ad7124_regs[AD7124_ADC_Control]);
    ret= AD7124_WaitForConvReady(ad7124_handler, timeout);
    ret = AD7124_ReadRegister(ad7124_handler,&ad7124_regs[AD7124_Offset_1]);
    offset_coefficient1=ad7124_regs[AD7124_Offset_1].value;

    }

  • Hi, Muthu.

    1. The default value of the offset register is 0x800000, and the nominal value of the gain register is 0x5XXXXX. You can compare the updated registers value to these default values to check if calibration is performed.

    2. For internal calibrations, you don't need to enable the current source since the analog input are disconnected internally. For system calibration, if you wish to calibrate your system with a full scale and zero scale voltage across the RTD, yes you have to enabled the current source to produce a voltage drop.

    3. Channels with the same setup shares the same offset and gain registers. If you will perform internal calibrations, you can just calibrate one channel for each setup since the error that will remove is internal to ADC and probably will be just the same for channels using the same setup. However, for system calibrations the errors external to ADC can be different from each analog input connections and if they will share the same setup the calibration from one channel may not be valid for the other channel. So, I'll suggest to use different setup for each channels with different external input connections.

    4. During calibrations, and after each conversions, the ADC results is scaled using the calibration registers before being written to the data register. Thus, you don't need to calculate anything. The registers are only intended to provide the user an access to read the calibration coefficients of the device and to write its own calibration coefficients from prestored values in the EEPROM. The formula used in each calibration mode can be seen on page 51 and 52 of the datasheet.

    Thanks,

    Jellenie

  • Hi, Muthu.

    I will suggest that you can just perform an internal zero and full scale calibration. This will not add or need for any external connections at your input but will remove the errors within the ADC itself. If the errors after performing internal calibrations does not change or has minimal effect then that's the time you can consider performing a system calibration to remove the errors internal to ADC as well as the errors associated in your analog front end circuitry. Yes you are right, for system calibrations, the zero scale voltage and full-scale voltage must be applied externally to the ADC input pins.

    Thanks,

    Jellenie 

  • Hi Jellenie,

    Which is the best to do for My problem, Internal calibration or System Calibration. For System calibration, Should I provide the precise full scale voltage and zero scale voltage externally at analog input pins? Or   will take it internally.

    Thanks,

    Muthu