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 AC Lead-off detection via SRB1

Other Parts Discussed in Thread: ADS1299

Hey guys,

I posted this question in another thread a while ago, but I guess since this particular thread was already marked as answered, nobody cared about it. So I'll try it with a new post. 

Given the amount of (unanswered) posts about the ADS1299 bias drive and lead-off detection, I'm glad that I'm not the only one who has troubles with getting it to work properly.

My first question is, how can I use the AC 7.8Hz lead-off detection (only during startup, not during actual signal acquisition), if I want to use a common reference electrode connected to SRB1 and routed to all negative inputs? According to the datasheet on p. 50 the BIAS_OUT pin must be connected with the positive and negative inputs. To verify the measurement I directly shorted the IN1P to BIAS_OUT and SRB1. IN1P and SRB1 have a 5.1k series resistor, so the measured impedance should be around 10k, right? I don't quite understand the role of the BIAS_OUT pin here.

Also, If I activate LOFF_SENSP and LOFF_SENSN for channel and connect IN1P to SRB1, I should have a closed current path from the current source via IN1P through SRB1 to the current sink. But this doesn't work. Also, connecting BIAS_OUT (with BIAS buffer enabled) doesn't improve the results. I really need help with the correct register settings and wiring for this scenario. 

And the second part is, can I use the DC lead-off during normal signal acquisiton while using the patient bias drive? As far as I've seen the Bias drive current saturates the comparators, leading immediately to a wrong electrode-off detection.

I would appreciate your help.

Regards,
Andreas

  • Hello Andreas,

    First, I’d like to apologize if you’ve experienced any frustration getting your questions answered on our forum. We’re constantly trying to improve the quality of our support and so your feedback is extremely valuable to us.

    To address your first question, I think the purpose of the diagram on page 50 of the ADS1299 datasheet may be unclear. The diagram is not a representation of a necessary implementation of the lead-off detection functionality; but is simply a block diagram that shows the capability of the Lead-Off Detection circuitry as an introduction to the subsequent section which details that functionality. The inclusion of the BIAS OUT pin in the diagram is to suggest that you can still utilize the patient driver while also using the Lead-Off detection circuitry.

    I’m not sure why you are unable to achieve the closed current loop which is used in the detection circuitry. Ensure that the bits in the LOFF_SENSP/N register corresponding to the electrodes you wish to read are set to 1. Also ensure that the SRB1 bit in the MISC1 register is set to 1.

    The Bias Drive should not have that effect on the LEAD-OFF detection since it is supposed to provide negative feedback to the common mode for all the leads. One would imagine that negative feedback for a signal would not cause that signal to rail the PGA. Are you using the internally generated bias drive reference voltage? Post your schematic so I can analyze it further.

     

    Regards,

    Brian Pisani

  • Hi Brian,

    thanks you for your help.

    My main problem still is to measure the electrode impedance. First, let me clarify what I am trying to do.

    I use a common reference electrode (connected to REF_ELEC without an external buffer, SRB1 bit is set) which is connected to all the negative amplifier inputs via the input multiplexer. Now I want to measure the impedances of all the electrodes (individually of course) connected to the positive inputs of the amplifier (INxP). The impedance should be measured before the actual EEG measurement begins, meaning, I can use the in-band 7.8Hz AC excitation signal, because I'm not conducting any measurements at this point.

    Here's the relevant part of the schematic:

    Also, I'm using 2.5V bipolar supply, 4.5V internal reference and the internal bias drive reference voltage. 

    To test the impedance measurement, I wanted to use the 5.1k resistor of the lowpass-filters from every input.
    Register settings:
    CONFIG3=0xE0
    LOFF_SENSP=0xFF
    LOFF_SENSN=0x00
    LOFF=0x01 (6nA/7.8Hz)
    CHxSET=0x60

    I star-connected CH1-CH8 and REF_ELEC to AGND. This way, the current sourced from INxP should flow through the 5.1k resistors to AGND. The signals measured at every input are filtered with a bandpass from 6-8Hz, the RMS values are calculated, multiplied by sqrt(2) and divided by 6nA. This gives me a resistance of around 6.5k for each channel. This seems to be a reasonable value, given that the 6nA AC source has a tolerance of 20%. If I disable the bandpass filter, I get the 7.8Hz square wave with an amplitude of 62.5mV. This divided by 6nA gives me a resistance of 10.4k, which could be the combined resistance of on electrode + reference electrode. So which way is the correct way to do it? 

    Also, changing LOFF_SENSN to 0xFF has no effect on this measurement. So I am assuming, that this is not relevant to my setup. 

    So that was the test with the resistors on the board. I also tried to measure the impedance with actual electrodes (passive, wet Ag/AgCl electrodes). I figured that I have to provide a return path for the excitation signal, where the two options are:

    1) The BIAS_OUT pin (or BIAS_ELEC in my schematic), because the reference electrode wouldn't sink any current as it is directly connected to the amplifier inputs
    2) by activating LOFF_SENSN=0xFF the reference electrode could sink the current, but it would have to sink the total current of all channels, so I figured this option doesn't work. 

    I used four electrodes (connected to CH1, CH2, BIAS_ELEC and REF_ELEC, all placed on the arm) and the following register settings:
    CONFIG3=0xE0
    LOFF_SENSP=0x03
    LOFF_SENSN=0x00
    LOFF=0x01 (6nA/7.8Hz)
    CHxSET=0x60 (normal electrode mode, gain 24)

    The skin for the CH1 electrode was not abraded, but for CH2 it was. By calculating the impedance with the previously described bandpass method, I get 28k for CH1 and 13.3k for CH2. After abrading the skin for CH1 the impedance dropped to 13.9k, so the abrading really had some effect. 

    Obviously the 5.1k resistor must be included in these values, but what about the 5.1k resistor for REF_ELEC or BIAS_ELEC? 13.3k-5.1k= 8.2k seems to be a reasonable value for the electrode impedance. However, here it's the same question whether to use the bandpass method or taking the amplitude of the square wave signal.

    The second problem is the continuous DC lead-off during EEG signal acquisition.

    Scenario 1: Normal electrode input setting for CH1 and CH2 (rest is turned off) and DC-lead-off enabled:

    CONFIG1: '96'
    CONFIG2: 'D0'
    CONFIG3: 'E1'
    LOFF: '00'
    CH1SET: '00'
    CH2SET: '00'
    CH3SET: '80'
    CH4SET: '80'
    CH5SET: '80'
    CH6SET: '80'
    CH7SET: '80'
    CH8SET: '80'
    BIAS_SENSP: '00'
    BIAS_SENSN: '00'
    LOFF_SENSP: 'FF'
    LOFF_SENSN: 'FF'
    LOFF_FLIP: '00'
    LOFF_STATP: '00'
    LOFF_STATN: '03'
    GPIO: '00'
    MISC1: '20'
    MISC2: '00'
    CONFIG4: '02'

    As soon as the electrodes of CH1 or 2 are disconnected, the corresponding LOFF status flag is set and the electrode-off condition is detected. However, in scenario 2, where the bias drive is also used (CH1 as sense electrode and CH2 as normal input electrode), both LOFF status flags for CH1 and 2 are immediately set. This is what I meant, that the bias drive current might saturate the comparators. For this case, the following register settings were used:

    ID: '3E'
    CONFIG1: '96'
    CONFIG2: 'D0'
    CONFIG3: 'FC'
    LOFF: '00'
    CH1SET: '00'
    CH2SET: '00'
    CH3SET: '80'
    CH4SET: '80'
    CH5SET: '80'
    CH6SET: '80'
    CH7SET: '80'
    CH8SET: '80'
    BIAS_SENSP: '01'
    BIAS_SENSN: '01'
    LOFF_SENSP: 'FF'
    LOFF_SENSN: 'FF'
    LOFF_FLIP: '00'
    LOFF_STATP: '03'
    LOFF_STATN: '03'
    GPIO: '00'
    MISC1: '20'
    MISC2: '00'
    CONFIG4: '02'

    I know this is a lot of information, but I though I'd rather give you all information that I have to avoid any misunderstandings. I would appreciate any further assistance.

    Regards,

    Andreas

    P.S. The diodes at every input circuit are TVS diodes, just for clarification.

  • Hello Andreas,

    We are currently studying your issue and will follow up with you shortly.

    Brian
  • Hi Andreas,

    Thank you once again for your post. I think what you're trying to do highlights a very common application question for EEG measurement systems. There is a lot of information in your post above and more than one problem to solve (AC and DC lead-off). Let me start my clarifying a few things and we'll go from there.

    In your configuration, all INxN inputs are connected to the reference electrode through SRB1. When the MUX is configured to route SRB1 to each channel, the negative PGA input is no longer connected to the lead-off current sink. See Figure 19:

    You mentioned that LOFF_SENSN = 0xFF showed no effect on the measurement. This should make sense now after reviewing Figure 19. LOFF_SENSN[7:0] individually connects each INxN to a current sink; however, the negative PGA input is disconnected from this current sink when the MUX is configured to use SRB1.

    Therefore, the return path for the current that flows through each INxP must return through the BIAS amplifier. In one of your initial tests, you set CONFIG3 = 0xE0. With the BIAS amplifier powered-down, you can see that the lead-off current does not have a return path to ground. 

    As the current returns through the BIAS amplifier, a differential impedance measurement using AC lead-off should yield the impedance of each INxP + [8 x Impedance of return path through Rbias].

    I will continue this post in the evening/tomorrow morning to add more detail, but feel free to chime in with your thoughts so far.

    Best Regards,

  • Ok, so my first mistake was that I didn't see that it's actually !SRB1, which disconnects the current source. Your explanation totally makes sense now.

    I tried to measure the impedance with

    CONFIG3 = 0xE4 (BIAS amplifier enabled)
    LOFF_SENSP = 0x03 (Channel 1 and 2)
    LOFF_SENSN = 0x00 (doesn't matter anyway)
    LOFF = 0x01 (6nA, 7.8Hz)

    This should be the equivalent circuit diagram: R1, R2, RB and RR represent the electrode-skin-impedances.

    The voltage is measured with respect to SRB1, but there is no current (or negligible) flowing into SRB1, right? So the voltage measured at each channel should be 6nA*(Rx+5k1).

    For the experiment I used wet Ag/AgCl electrodes with Ten20 as conductive paste. I abraded the skin for electrode 1, bias electrode and reference electrode, but not electrode 2. The electrodes were mounted on the forearm. The total resistance for Ch1 was 6.4k, for Ch2 it was 144k. Deducting the 5.1k results in R1 = 1.4k and R2 = 138.9k. Considering all tolerances, the value for R1 still seems to be too low, whereas R2 seems to be very high. What are your thoughts on this? Do I have to consider the current flowing into SRB1?

    I appreciate your effort so far, I'm looking forward to your post on the other issue as well.

  • Hi Andreas,

    The equivalent circuit diagram that you drew is exactly what I was describing. Ideally, no current is flowing through SRB1, but as you mentioned above, there will be some small leakage current flowing through the PGA inputs.

    The ADS1299 input leakage current is specified as +/- 300pA. In the case where only Channel 1 is powered on, the leakage current could add/subtract about 300pA from the current flowing across the 5k1 resistor towards BIAS_OUT. This would result in about 1.53uV of  voltage error in the differential measurement on Channel 1. If your LOFF current was only 6nA, that would equate to 255 ohms of error. This error would multiply as you add the leakage currents together from other channels. Worst-case scenario, you would have (8x300pA) extra current across the 5.1k resistor towards BIAS_OUT, which would produce a voltage error of 12.24uV (2k ohms) at each channel. The relative error from leakage current can be minimized by increasing the LOFF current magnitude. 

    For "n" channels with LOFF_SENSP = 1, you should expect to measure (i x (Rx + 5.1k)) + (n x i x (Rb + 5.1k)).

    I used the ADS1299EVM to replicate a 1-channel and 2-channel system with the equivalent circuit you drew above (all unused channels were powered-down). I used SRB1 to route a fixed 2.5V to all INxN inputs. My circuit had 4.99k in series with each INxP input and 4.99k in series with BIAS_OUT. Both tests were done using 6uA and 24uA for LOFF current in DC LOFF current mode. I found that I was only able to accurately measure the impedance using the 24uA setting, so I wonder if there are other factors to consider besides the input leakage current and current source tolerance.

    Best Regards,

  • Hey Brian,

    thanks for the detailed answer. I'm still not getting any sufficient results though. I tried the 24uA/DC method you described. I tied REF_ELEC to AGND and CH1 to  BIAS_ELEC. Is it ok to tie REF_ELEC to AGND? Why did you choose 2.5V?
    LOFF=0x0C (24uA/DC)
    CONFIG3=0xE4
    CH1SET = 0x00 (gain 1)
    LOFF_SENSP = 0x01 (channel 1)
    All other channels were powered down. 

    For CH1 I get a mean voltage of 2.49V, divided by 24uA results in 103k, which is obviously not correct. 

    I also tried to measure the impedances with the real electrodes again. Register settings were exactly the same. I got a mean voltage of 4.5mV on Channel 1, which results in 4.5mV/24uA=187.5Ohm, which is way too low. 

    I also tried the AC method again, 
    LOFF=0x0D (24uA/7.8Hz)
    CH1SET = 0x60 (gain 24)
    all other registers same.

    I get a peak voltage (after applying a 6-8Hz bandpass filter) of 24.2mV, which results in 24.2mV/24uA =1kohm, which is also wrong since this resistance still includes the 5.1k resistor. 

    I'm also a little bit confused why the voltage across the 5.1k resistor towards BIAS_OUT should cause any difference in the measured voltage. The voltage is measured with respect to SRB1 and not BIAS_OUT. In my understanding only the leakage current across RR and the 5k1 towards SRB1 should introduce an error in the measured voltage.

    Did you also try to measure the impedance with the AC current source?

    regards,

    Andreas