Similar to the MAX30003's leads-on detection circuit, the leads-off detection circuit works best for wet electrodes. However, each application is different, so it is necessary to tailor the settings to your specific needs.
To implement leads-off detection on the MAX30003, start by adjusting the IMAG (current magnitude) and VTH (threshold voltage) parameters to achieve the desired behavior. Start with smaller current levels and increase them if the impedances are small, then set VTH to trigger appropriately.
The default RBIAS value is 100 MOhm, which should be adjusted to maintain the input common-mode range requirement of VMID +/- 150 mV. If more resolution is needed, consider using an external resistor for lead-biasing.
For further optimization, it is recommended to implement an algorithm that dynamically adjusts IMAG and VTH, as well as an ECG signal check to determine if both leads are indeed attached.
It is important to note that the setting of VTH has no impact on the signal quality. This should be set to the level that gives the best performance with margin for determining if the leads are on or off. Similarly, changing IMAG should not have a significant impact on the signal quality if the ECG pin levels are kept within the DC limits specified in the datasheet. There might be slightly more noise with higher IMAG levels. This is current noise from the IMAG sources that is turned into voltage noise across any impedance.