Post Go back to editing

AD7124 calibration issue.

Category: Datasheet/Specs
Product Number: AD7124-8

Our application requires a 5 channel system of which any, or all, of the PT100s may be required – cycling steps 11) through to 30) [see below]. Reference resistor = 4k7, Headroom resistor 499R, Excitation current = 500uA, Gain = 32, anti-aliasing networks etc. Comms checks show the Device ID = ‘0x17’.

For our experimentation:
- Channel 0 = flying lead PT100.
- Channel 1 = open.
- Channel 2 = onboard 68R resistor.
- Channel 3 = flying lead 100R resistor.
- Channel 4 = onboard 100R resistor.

A) If the full code sequence (below) is run, all five Channels produce ‘0x000000’ AD conversion results. At steps 8a) and 9a) both the Offset 0 and Gain 0 registers show ‘0x000000’.
Including/excluding steps 4b) and 10b) made no difference.

B) If the Full Scale and Zero Scale calibrations are skipped steps 4) to 7); Channel 0 reads the PT100 (or calculated as 100.3R if the flying lead 100R resistor is used = 0.3R offset), Channel 1 = ‘0x000000’, Channel 2 = ‘0xFFFFFF’, Channel 3 = ‘0xFFFFFF’ and Channel 4 = ‘0x000000’. Both the Offset 0 and Gain 0 registers show ‘0x800000’.   
When the calibrations are skipped, whatever is written to the Offset Register, step 3f), is read back 8a); however, the Gain 0 register 9a) appears to hold the same value.

There must be something simple being omitted/assumed.

1. Reset AD7124-8: send 8x 0xFF
2. Wait 2000ms
3. Write Configuration:
    a) 0b00011001 (Configuration Register 0): 0b00000001, 0b11100101.
        Enable buffers, REFIN1(+)/REFIN1(-) and Gain 32.
    b) 0b00100001 (Filter Register 0): 0b10010111, 0b00000000, 0b11000000.
        Sinc4 & average blocking, single cycle conversion and 50SPS.
    c) 0b00000111 (Error Enable Register): 0b00000000, 0b00000000, 0b01000000.
    d) 0b00001001 (Channel Register 0): 0b00000001, 0b00000110.
        Disable, Setup 0, AINP 8 and AINM 6.
    e) 0b00000001 (ADC Control Register): 0b00000000, 0b01001000.
        Continuous Read disabled, Internal Ref voltage disabled, Mid power mode, and Standby mode (to permit writing to Offset Register).
    f) 0b00101001 (Offset Register): 0b10000000, 0b00000000, 0b00000000.
        Default 0x800000.
4. Initiate Full Scale Calibration:
    a) 0b00001101 (Channel 4 (onboard 100R reference)): 0b10000000, 0b10000011.
        Enable, Setup 0, AINP 4 and AINM 3.
    b) (optional) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 0b00000101.
        Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN5 at 500uA.
    c) 0b00000001 (ADC Control): 0b00000000, 0b01011000.
        Mid power mode and Internal Full Scale calibration.
5. Wait 1000ms and check RDY pin low.
6. Initiate Zero Scale Calibration:
    a) 0b00001101 (Channel 4 (onboard 100R reference)): 0b10000000, 0b10000011.
         Enable, Setup 0, AINP 4 and AINM 3.
    b) 0b00000001 (ADC Control): 0b00000000, 0b01010100.
        Mid power mode and Internal Zero Scale calibration.
7. Wait 1000ms and check RDY pin low.
8. Read Offset Reg:
    a) 0b01101001 (Offset 0). Read 3 bytes OffSet Register.
9. Read Gain Reg:
    a) 0b01110001 (Gain 0). Read 3 bytes  Gain Register.
10. Reset Configurations:
    a) 0b00001101 (Channel 4): 0b00000000, 0b10000011.
        Disable, Setup 0, AINP 4 and AINM 3.
    b) (optional) 0b00000011 (IO_Control_1): 0b00000000, 0b00000000, 0b00000101.
        Digital Output disabled, IOUT1 and IOUT0 excitation currents off.
    c) 0b00000001 (ADC Control): 0b00000000, 0b11001000.
        Full power mode and Standby mode.

11: Channel 0 single conversion:
    a) 0b00001001 (Channel 0): 0b10000001, 0b00000110.
        Enable, Setup 0, AINP 8 and AINM 6.
    b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 0b00001001.
        Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN9 at 500uA.
    c) 0b00000001 (ADC Control): 0b00000100, 0b11000100.
        Status enabled, Full power mode and Single Conversion.
12. Wait RDY pin low.
13. Read Channel 0 data:
    a) 0b01000010 (Data register). Read 4 bytes - 3 conversion and single Status (shows channel 0).
14. Channel 0 Standby:
    a) 0b00001001 (Channel 0): 0b00000001, 0b00000110.
        Disable, Setup 0, AINP 8 and AINM 6.
    b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000000, 0b00001001.
        Digital Output disabled, IOUT1 and IOUT0 excitation currents off.

15: Channel 1 single conversion:
    a) 0b00001010 (Channel 1): 0b10000001, 0b01001011.
        Enable, Setup 0, AINP 10 and AINM 11.
    b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 0b00001100.
        Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN12 at 500uA.
    c) 0b00000001 (ADC Control): 0b00000100, 0b11000100.
        Status enabled, Full power mode and Single Conversion.
16. Wait RDY pin low.
17. Read Channel 1 data:
    a) 0b01000010 (Data register). Read 4 bytes - 3 conversion and single Status (shows channel 1).
18. Channel 1 Standby:
    a) 0b00001010 (Channel 1): 0b00000001, 0b01001011.
        Disable, Setup 0, AINP 10 and AINM 11.
    b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000000, 0b00001100.
        Digital Output disabled, IOUT1 and IOUT0 excitation currents off.

19: Channel 2 single conversion:
    a) 0b00001011 (Channel 2): 0b10000001, 0b10101110.
        Enable, Setup 0, AINP 13 and AINM 14.
    b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 0b00001111.
        Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN15 at 500uA.
    c) 0b00000001 (ADC Control): 0b00000100, 0b11000100.
        Status enabled, Full power mode and Single Conversion.
20. Wait RDY pin low.
21. Read Channel 2 data:
    a) 0b01000010 (Data register). Read 4 bytes - 3 conversion and single Status (shows channel 2).
22. Channel 2 Standby:
    a) 0b00001011 (Channel 2): 0b00000001, 0b10101110.
        Disable, Setup 0, AINP 13 and AINM 14.
    b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000000, 0b00001111.
        Digital Output disabled, IOUT1 and IOUT0 excitation currents off.
 
23: Channel 3 single conversion:
    a) 0b00001100 (Channel 3): 0b10000000, 0b00010000.
        Enable, Setup 0, AINP 1 and AINM 0.
    b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 00000010.
        Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN2 at 500uA.
    c) 0b00000001 (ADC Control): 0b00000100, 0b11000100.
        Status enabled, Full power mode and Single Conversion.
24. Wait RDY pin low.
25. Read Channel 3 data:
    a) 0b01000010 (Data register). Read 4 bytes - 3 conversion and single Status (shows channel 3).
26. Channel 3 Standby:
    a) 0b00001100 (Channel 3): 0b0000000, 0b00010000.
        Disable, Setup 0, AINP 1 and AINM 0.
    b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000000, 0b00000010.
        Digital Output disabled, IOUT1 and IOUT0 excitation currents off.

27: Channel 4 single conversion:
    a) 0b00001101 (Channel 4): 0b10000000, 0b10000011.
        Enable, Setup 0, AINP 4 and AINM 3.
    b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 00000101.
        Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN5 at 500uA.
    c) 0b00000001 (ADC Control): 0b00000100, 0b11000100.
        Status enabled, Full power mode and Single Conversion.
28. Wait RDY pin low.
29. Read Channel 4 data:
    a) 0b01000010 (Data register). Read 4 bytes - 3 conversion and single Status (shows channel 4).
30. Channel 4 Standby:
    a) 0b00001101 (Channel 4): 0b0000000, 0b10000011.
        Disable, Setup 0, AINP 4 and AINM 3.
    b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000000, 0b00000101.
        Digital Output disabled, IOUT1 and IOUT0 excitation currents off.

  • Hi  ,

    Could you please confirm if you have a valid reference when you are performing calibrations?  A valid reference is required when performing internal calibrations. If you are using a resistor across REFIN1+/-, kindly ensure that the excitation current is active and is flowing through the Rref resistors. With this, turning of the excitation currents may results to invalid reference voltages applied to your ADC causing the errors. You may also using int reference for your calibrations. 

    Also note that from an operational point of view, treat a calibration like another ADC conversion. Set the system software to monitor the RDY bit in the status register or the DOUT/RDY pin to determine the end of a calibration via a polling sequence or an interrupt-driven routine. When the calibration is complete, the contents of the corresponding offset or gain register are then updated, the RDY bit in the status register is reset, the DOUT/RDY pin returns low (if CS is low), and lastly, the AD7124-4 reverts to idle mode.

    Thanks and regards,

    Rod

  • Rod, thank you for your time and response.

    A 4k7 +/-0.01% reference resistor is placed across REFIN+/- and the 500uA excitation current is active. In step 3a) the REFIN1 is configured in the Configuration Register as required reference.

    Unsure whether the excitation current was necessary during calibration, step 4b) was included and omitted to test, however in both cases the Offset and Gain registers read '0x000000' post-calibrations.

    In both calibrations, first 'Full Scale' followed by 'Zero Scale' the internal reference voltage is disabled - steps 4c) and 6b) respectively.

    The DOUT/RDY pin is polled after each calibration has been initiated, steps 5) and 7), to check for a low state. A delay was (incrementally) added before the polling in case it was occurring too quickly - does not appear possible from the datasheet, but 'belts and braces' approach.

  • Reviewed the issue and noted that Channel 4 (onboard 100R resistor), post-calibration, produced the same ADC result as Channel 1 (open). Confirmed excitation current flowed through external reference resistor when calibrating using the preferred Channel 4 (100R). However, when the primary calibration was conducted on Channel 2 (68R onboard resistor) the Offset and Gain registers updated (read reasonable values in steps 8a) and 9a) – see below) and ADC results no longer null. Swapped out the IC and reverted back to Channel 4 as primary calibration channel and the system appears to function fine.

    Subsequent changes:
    1) To improve accuracy, is the use of five different Setup configurations, although all the same, each channel has its own Offset and Gain values (although not shown below, steps 3a) and 3b) repeated for each of the five channels and referenced in step 3d) to produce the 5 sets of associated Offset and Gain registers). Each channel is now calibrated separately, rather than using a shared ‘Setup 0’ as previously.
    2) Delays removed after each calibration using only the RDY pin state to determine completed event.
    3) Changed filter output data post-calibration to improve response time during regular ADC running (600FS to 120FS).

    For completeness:

    1. Reset AD7124-8: send 8x 0xFF
    2. Wait 2000ms
    3. Write Configuration:
        a) 0b00011001 (Configuration Register 0): 0b00000001, 0b11100101.
            Enable buffers, REFIN1(+)/REFIN1(-) and Gain 32.
        b) 0b00100001 (Filter Register 0): 0b10010111, 0b00000010, 0b01011000.
            Sinc4 & average blocking, single cycle conversion and 600FS.
        c) 0b00000111 (Error Enable Register): 0b00000000, 0b00000000, 0b01000000.
        d) 0b00001001 (Channel Register 0): 0b00000001, 0b00000110.
            Disable, Setup 0, AINP 8 and AINM 6.
        e) 0b00000001 (ADC Control Register): 0b00000000, 0b01001000.
            Continuous Read disabled, Internal Ref voltage disabled, Mid power mode, and Standby mode (to permit writing to Offset Register).
        f) 0b00101001 (Offset Register): 0b10000000, 0b00000000, 0b00000000.
            Default 0x800000.
    4. Initiate Full Scale Calibration:
        a) 0b00001101 (Channel 4 (onboard 100R reference)): 0b10000000, 0b10000011.
            Enable, Setup 0, AINP 4 and AINM 3.
        b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 0b00000101.
            Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN5 at 500uA.
        c) 0b00000001 (ADC Control): 0b00000000, 0b01011000.
            Mid power mode and Internal Full Scale calibration.
    5. Wait and check RDY pin low.
    6. Initiate Zero Scale Calibration:
        a) 0b00001101 (Channel 4 (onboard 100R reference)): 0b10000000, 0b10000011.
             Enable, Setup 0, AINP 4 and AINM 3.
        b) 0b00000011 (IO_Control_1): 0b00000000, 0b00000100, 0b00000101.
            Digital Output disabled, IOUT1 excitation current off and IOUT0 excitation current AINN5 at 500uA.
        c) 0b00000001 (ADC Control): 0b00000000, 0b01010100.
            Mid power mode and Internal Zero Scale calibration.
    7. Wait and check RDY pin low.
    8. Read Offset Reg:
        a) 0b01101001 (Offset 0). Read 3 bytes OffSet Register.
    9. Read Gain Reg:
        a) 0b01110001 (Gain 0). Read 3 bytes Gain Register.
    10. Reset Configurations:
        a) 0b00100001 (Filter Register 0): 0b10010111, 0b00000000, 0b01111000.
            Change calibration 600FS to regular running 120FS.
        b) 0b00001101 (Channel 4): 0b00000000, 0b10000011.
            Disable, Setup 0, AINP 4 and AINM 3.
        c) 0b00000011 (IO_Control_1): 0b00000000, 0b00000000, 0b00000101.
            Digital Output disabled, IOUT1 and IOUT0 excitation currents off.
        d) 0b00000001 (ADC Control): 0b00000000, 0b11001000.
            Full power mode and Standby mode.

  • Hi  

    If you still need help with this issue, please feel free to post a question in our forum. We're here to help!

    I will now close this thread. 

    Thanks and regards,

    Rod

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.