This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1299: Lead-Off Detection Issues

Part Number: ADS1299

Hello,

I follow the instructions on page 63 of the manual to set up DC lead-off detection, copied here for your convenience:

10.1.2.1 Lead-Off
Sample code to set dc lead-off with pull-up and pull-down resistors on all channels.
  WREG LOFF 0x13 // Comparator threshold at 95% and 5%, pullup or pulldown resistor dc lead-off
  WREG CONFIG4 0x02 // Turn on dc lead-off comparators
  WREG LOFF_SENSP 0xFF // Turn on the P-side of all channels for lead-off sensing
  WREG LOFF_SENSN 0xFF // Turn on the N-side of all channels for lead-off sensing
Observe the status bits of the output data stream to monitor lead-off status.

I am looking at the status bits in DOUT, specifically the contents of the LOFF_SENSP and LOFF_SENSN registers, but the results don't make sense. For instance, I see that all the P-side leads are disconnected but none of the N-side leads are disconnected. When I connect only one of the P-leads (for channel 5 or 6 for example), I see that 4 different channels are reported to be connected (1-4, for example). This continues for a while (maybe around a minute) and even after I disconnect the one lead again, before the channels are marked as disconnected again, one by one. Is any part of this behavior expected? What could this inaccuracy be due to?

For reference, I am using both P and N sides of channels of the first four channels, and only the N side for the last four channels (and activating both bias and SRB2).

  • Hello Walaa,

    Thank you for your post and welcome to our forum.

    Debugging lead-off detection issues is usually very specific to how one's system is configured. I would suggest first reviewing some of the helpful collateral I've linked below. You should be able to trace where the lead-off current is flowing and confirm where the DC bias of each node sits. In most cases, lead-off issues present when the connected inputs are not biased to a known common-mode, or when the lead-off currents do not have a return path. This return path can be through another current source of opposite polarity (LOFFP vs. LOFFN) or through the BIAS amplifier. If the inputs are connected to the BIAS electrode, the BIAS amplifier must be able to sink/source any additional current that is not balanced by the LOFFP and LOFFN currents.

    We have some useful application notes and articles on this topic linked on our ADS129x BIOFAQ page on E2E. 

    Best regards,

  • Thank you for your response. I have reviewed some of the materials in the link you sent, which were very helpful- thank you! However, I still don't understand why my LOFF_N always shows 0- never reporting any of the leads disconnected, regardless of anything I do. It seems to me like it would be a setting issue since it is not affected by anything that I do. Any guidance regarding this issue would help.

  • Hi Walaa,

    Do you have a schematic that you can share, as well as a complete list of register settings?

    Regards,

  • Here is the complete register settings:

      WREG(ADS1299_REGADDR_CONFIG1, ADS1299_REG_CONFIG1_RESERVED_VALUE |
                                    ADS1299_REG_CONFIG1_2kSPS);
      WREG(ADS1299_REGADDR_CONFIG2, ADS1299_REG_CONFIG2_RESERVED_VALUE | //0b11000000;
                                    ADS1299_REG_CONFIG2_CAL_PULSE_FCLK_DIV_2_21);
      WREG(ADS1299_REGADDR_CONFIG3, ADS1299_REG_CONFIG3_REFBUF_ENABLED | //0b11101100;
                                    ADS1299_REG_CONFIG3_RESERVED_VALUE |
                                    ADS1299_REG_CONFIG3_BIAS_MEAS_DISABLED |
                                    ADS1299_REG_CONFIG3_BIASREF_INT |
                                    ADS1299_REG_CONFIG3_BIASBUF_ENABLED |
                                    ADS1299_REG_CONFIG3_BIAS_LOFF_SENSE_DISABLED);
      WREG(ADS1299_REGADDR_CONFIG4, 0x00);
      WREG(ADS1299_REGADDR_GPIO, 0x00);
      WREG(ADS1299_REGADDR_MISC1, 0x00);
    
      WREG(ADS1299_REGADDR_CH1SET, ADS_CHANNEL_GAINS[0] | 
                                   ADS1299_REG_CHNSET_NORMAL_ELECTRODE |
                                   ADS1299_REG_CHNSET_CHANNEL_ON |
                                   ADS1299_REG_CHNSET_SRB2_DISCONNECTED);
      WREG(ADS1299_REGADDR_CH2SET, ADS_CHANNEL_GAINS[1] | 
                                   ADS1299_REG_CHNSET_NORMAL_ELECTRODE | 
                                   ADS1299_REG_CHNSET_CHANNEL_ON |
                                   ADS1299_REG_CHNSET_SRB2_DISCONNECTED);
      WREG(ADS1299_REGADDR_CH3SET, ADS_CHANNEL_GAINS[2] | 
                                   ADS1299_REG_CHNSET_NORMAL_ELECTRODE |
                                   ADS1299_REG_CHNSET_CHANNEL_ON |
                                   ADS1299_REG_CHNSET_SRB2_DISCONNECTED);
      WREG(ADS1299_REGADDR_CH4SET, ADS_CHANNEL_GAINS[3] | 
                                   ADS1299_REG_CHNSET_NORMAL_ELECTRODE | 
                                   ADS1299_REG_CHNSET_CHANNEL_ON |
                                   ADS1299_REG_CHNSET_SRB2_DISCONNECTED);
      WREG(ADS1299_REGADDR_CH5SET, ADS_CHANNEL_GAINS[4] | 
                                   ADS1299_REG_CHNSET_NORMAL_ELECTRODE | 
                                   ADS1299_REG_CHNSET_CHANNEL_ON |
                                   ADS1299_REG_CHNSET_SRB2_CONNECTED);
      WREG(ADS1299_REGADDR_CH6SET, ADS_CHANNEL_GAINS[5] | 
                                   ADS1299_REG_CHNSET_NORMAL_ELECTRODE | 
                                   ADS1299_REG_CHNSET_CHANNEL_ON|
                                   ADS1299_REG_CHNSET_SRB2_CONNECTED);
      WREG(ADS1299_REGADDR_CH7SET, ADS_CHANNEL_GAINS[6] | 
                                   ADS1299_REG_CHNSET_NORMAL_ELECTRODE |
                                   ADS1299_REG_CHNSET_CHANNEL_ON |
                                   ADS1299_REG_CHNSET_SRB2_CONNECTED);
      WREG(ADS1299_REGADDR_CH8SET, ADS_CHANNEL_GAINS[7] | 
                                   ADS1299_REG_CHNSET_NORMAL_ELECTRODE |
                                   ADS1299_REG_CHNSET_CHANNEL_ON |
                                   ADS1299_REG_CHNSET_SRB2_CONNECTED);
    
     // turn on bias for all EEG Channels (5-8)
     WREG(ADS1299_REGADDR_BIAS_SENSN,  ADS1299_REG_BIAS_SENSN_BIASN8 |
                                       ADS1299_REG_BIAS_SENSN_BIASN7 |
                                       ADS1299_REG_BIAS_SENSN_BIASN6 |
                                       ADS1299_REG_BIAS_SENSN_BIASN5
      WREG(ADS1299_REGADDR_LOFF,       0x13); 
      WREG(ADS1299_REGADDR_CONFIG4,    0x02); 
      WREG(ADS1299_REGADDR_LOFF_SENSP, 0xFF); 
      WREG(ADS1299_REGADDR_LOFF_SENSN, 0xFF); 
      WREG(ADS1299_REGADDR_LOFF_FLIP,  0xF0); // flip the EEG channels since we are connecting them to the N end 

    What part of the schematic are you interested in?

  • Hi Walaa,

    Thanks for the register settings.

    I was interested in seeing the complete signal chain from electrode to ADS1299 input, as well as the surrounding ADS1299 connections.

    Based on the register settings above, you will have 4x the lead-off current flowing through the SRB2 pin and returning to the negative LOFF current sources ("negative" because you have flipped the LOFF current direction for channels 5-8). The direction of the current is not a concern, but it's worth checking the voltage of the SRB2 pin and the remaining channel input pins to see where the common-mode voltage is sitting. As each electrode becomes disconnected, verify that the corresponding input pin for that electrode is being pulled up/down to the supply as expected. If for some reason, that input is staying between the comparator thresholds, that would explain the inconsistent lead-off status results.

    Best regards,