scieee AI-readable full text Open interactive document viewer

Development and validation of a passive realtime impedance compatible with simultaneous EEG acquisition

Farrés i Castany, Anna

Abstract

L'objectiu d'aquest projecte és el desenvolupament i validació d'un circuit capaç d'estimar la impedància de contacte dels elèctrodes durant l'adquisició simultània del senyal electroencefalogràfica (EEG). El projecte s'ha realitzat en col·laboració amb l'empresa Neuroelectrics®, per la qual cosa gran part del desenvolupament s'ha centrat en garantir la compatibilitat amb Enobio®, el seu dispositiu comercial dissenyat per a la realització d'EEG clínics. D'entre les solucions existents per a l’Impedance Check (circuit d'estimació de la impedància dels elèctrodes), s'ha optat per un mètode innovador que presenta com a principal avantatge l'eliminació de corrents actives. Això permet mantenir el procés de validació del dispositiu com a Classe A, reduir el consum energètic de la circuiteria i evitar el risc d'abrasió cutània. Aquest mètode, publicat originalment a la revista Nature, ha servit d'inspiració per dissenyar un circuit totalment compatible amb el maquinari d'Enobio®. Les simulacions realitzades han mostrat una millora significativa en precisió, repetibilitat i velocitat de càlcul en comparació amb versions anteriors. Per validar els resultats obtinguts en les simulacions, s'ha dissenyat i fabricat una PCB. Les proves realitzades amb el prototip físic han demostrat que els resultats són consistents amb les simulacions, assolint un error inferior al 10% en pràcticament tot el rang d'interès (100 - 50kΩ), una velocitat d'estimació de la impedància de 36 ms, i una repetibilitat que garanteix que les pertorbacions en el senyal EEG no alteraran el valor de la impedància estimada

Full text

FINAL DEGREE PROJECT Degree in Industrial and Automatic Electronics Engineering and Degree in Biomedical Engineering DEVELOPMENT AND VALIDATION OF A PASSIVE REALTIME IMPEDANCE CHECKER COMPATIBLE WITH SIMULTANEOUS EEG ACQUISITION Report and Appendices Author: Anna Farrés I Castany Co-Director: Lexa D.Nescolarde Selva (Dept. of Electronic Engineering, UPC) Herminio Martínez García (Dept. of Electronic Engineering, UPC) Francesc Xavier Pastor Romera (Neuroelectrics Barcelona) Dept: Department of Electronic Engineering Call: September 2024 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition i Abstract The objective of this project is to develop and validate a circuit capable of estimating the contact impedance of electrodes during the simultaneous acquisition of electroencephalographic signals. The project was conducted in collaboration with Neuroelectrics®, with a primary focus on ensuring compatibility with Enobio®, their commercial device for clinical electroencephalograms (EEG) recordings. Among the existing solutions for the Impedance Check (electrode impedance estimation circuit), an innovative method was chosen, whose key advantage is the elimination of active currents. This maintains the device’s validation process under Class A, reduces power consumption, and minimizes the risk of skin abrasion. This method, originally published in Nature, served as the foundation for designing a circuit fully compatible with Enobio® hardware. Simulations have demonstrated significant improvements in precision, repeatability, and calculation speed compared to original version. To validate the simulation results, a PCB was designed and manufactured. Tests on the physical prototype confirmed that the results aligned with the simulations, achieving an error below 10% across nearly the entire range of interest (100 - 50kΩ), an impedance estimation speed of 36 ms, and repeatability that ensures EEG signal disturbances will not alter to the estimated impedance value. Key words: Impedance check circuitry, electrode contact impedance value, EEG, PCB design. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition ii Resum L'objectiu d'aquest projecte és el desenvolupament i validació d'un circuit capaç d'estimar la impedància de contacte dels elèctrodes durant l'adquisició simultània del senyal electroencefalogràfica. El projecte s'ha realitzat en col·laboració amb l'empresa Neuroelectrics®, per la qual cosa gran part del desenvolupament s'ha centrat en garantir la compatibilitat amb Enobio®, el seu dispositiu comercial per a realitzar electroencefalogrames (EEG) clínics. D'entre les solucions existents per a l’Impedance Check (circuit d'estimació de la impedància dels elèctrodes), s'ha optat per un mètode innovador, que presenta com a principal avantatge l'eliminació de corrents actives. Això permet mantenir el procés de validació del dispositiu com a Classe A, reduir el consum energètic de la circuiteria i evitar el risc d'abrasió cutània. Aquest mètode, publicat originalment a la revista Nature, ha servit d'inspiració per dissenyar un circuit totalment compatible amb el hardware d'Enobio®. Les simulacions realitzades han mostrat una millora significativa en precisió, repetibilitat i velocitat de càlcul en comparació amb la versió original. Per validar els resultats obtinguts en les simulacions, s'ha dissenyat i fabricat una PCB. Les proves realitzades amb el prototip físic han demostrat que els resultats són consistents amb les simulacions, assolint un error inferior al 10% en pràcticament tot el rang d'interès (100 - 50kΩ), una velocitat d'estimació de la impedància de 36 ms, i una repetibilitat que garanteix que les pertorbacions en el senyal EEG no alteraran el valor de la impedància estimada. Paraules clau: Circuit d’Impedance Check, valor d’impedància de contacte dels elèctrodes, EEG, disseny PCB. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition iii Resumen El objetivo de este proyecto es el desarrollo y validación de un circuito capaz de estimar la impedancia de contacto de los electrodos durante la adquisición simultánea de la señal electroencefalográfica. El proyecto se ha realizado en colaboración con la empresa Neuroelectrics®, por lo que gran parte del desarrollo se ha centrado en garantizar la compatibilidad con Enobio®, su dispositivo comercial para realizar electroencefalogramas (EEG) clínicos. De entre las soluciones existentes para el Impedance Check (circuito estimación de la impedancia de los electrodos), se ha optado por un método innovador, que presenta como principal ventaja la eliminación de corrientes activas. Esto permite mantener el proceso de validación del dispositivo como Clase A, reducir el consumo energético de la circuitería y evitar el riesgo de abrasión cutánea. Este método, publicado originalmente en la revista Nature, ha servido de inspiración para diseñar un circuito totalmente compatible con el hardware de Enobio®. Las simulaciones realizadas han mostrado una mejora significativa en precisión, repetibilidad y velocidad de cálculo en comparación con la versión original. Para validar los resultados obtenidos en las simulaciones, se ha diseñado y fabricado una PCB. Las pruebas realizadas con el prototipo físico han demostrado que los resultados son consistentes con las simulaciones, logrando un error inferior al 10% en prácticamente todo el rango de interés (100 - 50kΩ), una velocidad de estimación de impedancia de 36 ms, y una repetibilidad que garantiza que las perturbaciones en la señal EEG no alteraran el valor de la impedancia estimada. Palabras clave: Circuito de Impedance Check, valor de impedancia de contacto de los electrodos, EEG, diseño PCB. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition iv Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition v Acknowledgements First and foremost, I would like to extend my deepest gratitude to my Thesis Director, Lexa Digna Nescolarde, and my Co-Director, Herminio Martínez, for their dedicated time and invaluable guidance throughout this project. A special mention goes to Francesc Pastor for his involvement, both professionally and personally, during the development of this project. I have come to realize that engineering thrives with the presence of people who are passionate about the profession. His enthusiasm has been a constant source of inspiration and motivation. Lastly, I would like to express my heartfelt thanks to my family— Irene, Mª Angels, and Josep Mª— for their unwavering support, not only during the past six months of this thesis but throughout my entire academic journey. Their life motto, "where there’s a will, there’s a way," has been my guiding light, helping me persevere through the challenges I've faced. Much of what I have achieved is because of them. Thank you. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition vi Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition vii Glossary QI Quality Index EEG Electroencephalogram ECG Electrocardiogram EMG Electromyogram PGA Programable Gain Amplifier VINP Voltage Positive Input VINN Voltage Negative Input CMS Common Mode Signal DRL Driven Right Leg SPI Serial Peripherical Interface OPAMP Operational Amplifier ADC Analog to Digital Converter CMRR Common Mode Rejection Ratio AC Alternating Current DC Direct Current μC Microcontroller GPIO General Purpose Input or Output IC Integrated circuit HPF High Pass Filter FSO Output Full-Scale range GRG Generalizaed Reduced Gradient CNMC Comisión Nacional de los Mercados y la Competencia RoHS Restriction of Hazardous Substance Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition xiv Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition xv Index ABSTRACT _______________________________________________________________ I RESUM _________________________________________________________________ II RESUMEN _______________________________________________________________ III ACKNOWLEDGEMENTS __________________________________________________ V GLOSSARY _____________________________________________________________ VII LIST OF FIGURES _______________________________________________________ VIII LIST OF TABLES _________________________________________________________ XII 1. PREFACE ___________________________________________________________ 2 1.1. Origin of work .......................................................................................... 2 1.2. Objectives of the work .............................................................................. 3 1.3. Scope of the work .................................................................................... 4 1.4. Prerequisite requirements ........................................................................ 4 1.4.1. Software and licenses ..................................................................................5 2. INTRODUCTION _______________________________________________________ 7 2.1. EEG acquisition. Enobio® ............................................................................ 7 2.1.1. Brain activity ................................................................................................8 2.1.2. Ag/AgCl electrodes .................................................................................... 10 2.1.3. ADS1298 .................................................................................................... 11 2.1.4. ATSAM4SD32CA ........................................................................................ 19 2.1.5. NIC software .............................................................................................. 19 2.2. Electrode-skin interface and contact impedance ....................................... 20 2.2.1. Electrical model of the electrode-skin interface .......................................... 21 2.2.2. Impedance checker ................................................................................... 23 2.3. Design specifications of the impedance checker ....................................... 23 3. STATE OF THE ART ____________________________________________________ 25 3.1. Active method ......................................................................................... 25 3.1.1. Frequence within the EEG bandwidth ....................................................... 26 3.1.2. Frequence outside the EEG bandwidth – frequence above the bandwidth ... 26 3.1.2. Frequence outside the EEG bandwidth – DC current ................................... 27 3.1.4. ADS1298 lead-off detection........................................................................ 27 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition xvi 3.1.5. External circuitry ........................................................................................ 29 3.2. Passive method ....................................................................................... 29 3.3. Online method ......................................................................................... 32 3.4. Comparison of the methods ..................................................................... 33 4. PROPOSED SOLUTION ________________________________________________ 36 4.1. Impedance check circuitry design ............................................................. 36 4.1.1. EEG signal attenuation circuit ..................................................................... 37 4.1.2. DC component amplification circuit ........................................................... 49 4.2. Impedance check PCB design .................................................................. 75 4.2.1. PCB schematics ........................................................................................ 76 4.2.2. PCB components ....................................................................................... 77 4.2.3. Technical specifications of the PCB design ................................................. 81 5. DESIGN VERIFICATION ________________________________________________ 85 5.1. Electrical model of a human head ............................................................. 85 5.2. Testing methods and procedures .............................................................. 88 5.1.1. Integrity of the impedance check board ...................................................... 88 5.1.2. Validation of the operating principle ........................................................... 89 5.1.3. Validation of the compatibility between Enobio® and impedance check circuitries ................................................................................................ 91 5.3. Testing results and discussion ................................................................ 95 5.3.1. Integrity of the impedance check board ...................................................... 96 5.3.2. Validation of the operating principle ........................................................... 97 5.3.3. Validation of the compatibility between Enobio® and impedance check circuitries .............................................................................................. 105 6. ENVIRONMENTAL IMPACT ANALYSIS __________________________________ 116 6.1. Laptop electrical consumption ............................................................... 116 6.2. PCB manufacturing and hardware components ....................................... 116 7. ECONOMIC ANALYSIS _______________________________________________ 117 7.1. Development software licenses .............................................................. 117 7.2. PCB manufacturing ................................................................................ 117 7.3. Labor .................................................................................................... 118 7.4. Total cost .............................................................................................. 118 8. CONCLUSIONS ______________________________________________________ 119 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition xvii 8.1. Future work ........................................................................................... 120 REFERENCES __________________________________________________________ 121 APPENDIX A: IMPEDANCE CHECKER SIMULATION CIRCUITS ______________ 129 A.1. Impedance checker single channel simulation circuit .............................. 129 A.2. Impedance checker 8-channel simulation circuit .................................... 130 APPENDIX B: IMPEDANCE CHECK PCB DESIGN ___________________________ 131 B.1. PCB schematics .................................................................................... 131 B.2. PCB components .................................................................................. 132 B.3. PCB manufacturing information ............................................................. 133 B.4. PCB layers ............................................................................................. 134 B.5. PCB render ............................................................................................ 136 B.6. Manufactured PCB ................................................................................ 137 APPENDIX C: PCB DESIGN VERIFICATION ________________________________ 138 C.1. PCB connections and jumpers configuration .......................................... 138 C.1.1. Integrity of the impedance check board.................................................... 138 C.1.2. Validation of the operating principle ......................................................... 139 C.1.3. Validation of the compatibility between Enobio® and impedance check circuitries .............................................................................................. 142 C.2. ESP32 firmware ..................................................................................... 143 C.3.1. Header file: static_test_Veeg.h ................................................................ 147 C.2.2. Header file: static_test_Vo.h .................................................................... 148 C.2.3. Header file: dynamic_test.h ..................................................................... 149 C.2.4. Header file: enobio_impedancechecker.h ................................................ 150 C.3. Enobio® firmware .................................................................................. 152 C.3.1. ADS1298 register maps ........................................................................... 153 C.4. Testing results ....................................................................................... 154 C.4.1. Validation of the operating principle ......................................................... 154 C.4.2. Validation of the operating principle ......................................................... 163 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 1 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 2 1. Preface Maintaining a low contact impedance during EEG acquisition is crucial for ensuring a high-quality signal. Numerous studies concluded that high contact impedance can lead not only to attenuation of the EEG signal [1], but also to a system that is more susceptible to motion artifacts [2] and power line interference [3]. Furthermore, data quality for event-related potentials (ERP) and EEG signals can also depend on impedance [4]. In this context, the American Clinical Neurophysiology Society (ACNS) sets forth the minimum technical requirements for performing clinical EEGs [5]. These requirements specify the acceptable range of contact impedance and the number of measurements that should be taken of this parameter. The ACNS and others [6] deem as acceptable impedances below 10 kΩ, however, some other sources recommend not exceeding 5 kΩ [7], [8]. It is also advised to maintain an impedance above 100 Ω, as lower values often indicate a salt bridge on the scalp. Regarding the number of impedance measurements to be performed, only the pre-recording measurement is mandatory. Nonetheless, it is recommended to recheck impedance during the recording, especially if any unexpected patterns appear during the EEG. Neuroelectrics® offers a product line called Enobio®, exclusively dedicated to EEG signal acquisition [9]. Currently, Enobio® devices cannot calculate the contact impedance of the electrodes even though a recent product study showcased that this function is the most requested by the customers. Therefore, in this work, a circuit capable of measuring the contact impedance of the electrodes during EEG acquisition has been developed, with the goal of being included in the Enobio®® product line. 1.1. Origin of work The idea of this project emerged after completing a 6-month internship at Neuroelectrics®, as I needed to start working on my bachelor’s thesis. After discussing it with my supervisor and mentor at the company, Francesc Pastor, the idea of developing an impedance checker for the EEG electrodes arose. Until that moment, the EEG acquisition device developed by Neuroelectrics®, Enobio®, did not have a dedicated circuitry to carry out such a measurement. Given the importance of ensuring a good quality signal in the EEG acquisition for medical and research purposes, an algorithm was developed years ago to establish a quality index of the EEG signal, which served as a guidance Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 3 [10]. This index, which ranges from 0 to 1, aims to measure quality signal classifying it as good (QI: 0.0 – 0.5), medium (QI: 0.5 – 0.8) or poor (QI: 0.8 – 1). The algorithm is based on four essential signal parameters: line noise (signal power at 50 Hz), main noise (signal power at 1 – 40 Hz) and offset (mean value of the signal). However, considering the large number of customer claims received and the importance they placed on having an impedance checker for Enobio®, [11] this solution did not seem to meet the customers’ needs. For this reason, it was considered developing a circuitry capable of directly measuring contact impedance while facing two main challenges; on one hand, the solution should be compatible with Enobio® circuitry and, on the other hand, it should allow for simultaneous EEG measurement. The development of this solution required knowledge in both biomedical and electronic engineering fields, rendering it an appropriate subject for this double degree thesis. 1.2. Objectives of the work The main goal of this work is the development and validation of a circuitry capable of measuring the contact impedance of the electrodes during EEG acquisition using the Enobio® device. To achieve this goal, the following specific objectives must be met: 1. Real-time measurement: The system must provide an instantaneous and continuous estimation of the impedance value while acquiring the EEG. Therefore, techniques involving post-processing of the signal are excluded. 2. Compatibility with simultaneous EEG acquisition: The impedance measurement should not interfere with or significantly alter the captured EEG signal. 3. Minimal modifications to the existing Enobio® circuitry: The IC must integrate with the existing circuitry in the Enobio® device without requiring substantial modifications to its architecture. This will minimize implementation costs and ensure that the device maintains its current performance. 4. Precision in impedance estimation: The impedance check must estimate the impedance with and error of less than 10% for any measurement inside the range from 100Ω to 50 kΩ. This precision will ensure the reliability and usefulness of the obtained measurements. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 4 5. Implementation of the impedance check design in a PCB: Design a PCB that implements the proposed circuit for the impedance check. This PCB should be capable of interfacing seamlessly with the Enobio® PCB. 6. Validation the manufactured PCB: Conduct a validation process for the impedance check to demonstrate that the impedance estimation is compatible with EEG acquisition and provides reliable values. 1.3. Scope of the work The goal of this work is not only to develop circuitry capable of measuring contact impedance but also to achieve this measurement without injecting current directly into the patient, as is done with current methods. This represents a completely new and previously untested approach for conducting this measurement so throughout this work, it is also aimed to demonstrate and characterize the viability, reliability, and accuracy of the method. It is important to note that the impedance measurement circuitry has been specifically designed to fit the operation and architecture of Enobio®. Therefore, the proposed solution may not directly applicable to any bio-signal measurement device using electrodes. 1.4. Prerequisite requirements In terms of the prerequisite requirements for the development of this project, four fundamental resources are considered: 1. Developer skills: A profile with knowledge in both the electronic and biomedical fields is required. In the electronic field, it is necessary to have an understanding of analog electronics, component selection, PCB design, and firmware development (C, C++, and G). In the biomedical field, it will be essential to know how to develop electronic circuitry using bio-signal front ends and to maintain patient electrical safety standards. 2. Financial resources: It is estimated, as a guideline, that the project will cost approximately 10,000 €, considering a development period of about 6 months, the hiring of a technician, and the need to acquire several prototypes. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 5 3. BoM (Bill of Materials) selection: It is crucial to consider the current long lead times for the electronic components needed for the prototypes. Therefore, the availability of components is an important parameter during their selection. 4. Timeline: The project development starts on 02/12/2024 and is expected to be completed by 20/01/2024, with a total approximate duration of 6 months. 1.4.1. Software and licenses Another crucial resource to consider when starting a project is the software needed, as the licenses for these are often expensive. For this project, the software shown in Table 1 will be necessary: Table 1. Required software for project development. Software Use Version License cost LTSpice Simulation of electronic circuits with the real behavior of integrated circuits 24.0.9.0 Free Altium Schematic design and PCB development with their respective manufacturing files 23.6.0.18 Altium Designer Professional Atmel Studio Development/modification of Enobio®'s microcontroller firmware 6.2.1563 Free Arduino IDE Development of the ESP32 firmware 2.3.2 Free MATLAB Analysis of the signals recorded using Neuroelectrics® Instrument Controller (NIC) R2023b Academic License NIC EEG signal visualization during design verification 2.1.3.7 Free Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 7 2. Introduction As mentioned, the main target of this project is to develop a circuit capable of estimating the contact impedance of electrodes during the simultaneous acquisition of an EEG signal. This introductory section aims to provide the necessary technical context to understand the development of the project, allowing comprehension of the rationale behind the decisions made while evaluating the existing solutions in the state of the art, as well as the ones taken in the electronic design stage of the circuitry. In order to achieve this, three key concepts are considered essential: 1. Operation of the EEG acquisition device (Enobio®): The Enobio® device developed by Neuroelectrics® is the one that acquires the EEG signals. The designed circuitry must integrate with this device, making it crucial to understand its operation and architecture. 2. Contact impedance concept: Understanding the nature and behavior of the variable to be measured is essential to develop a system capable of measuring it. 3. Technical specifications of the impedance checker: It will be necessary to define the technical specifications that the developed circuit must meet, considering concepts related to the desired precision in impedance estimation as well as compatibility with the EEG simultaneous acquisition, and thus Enobio®. 2.1. EEG acquisition. Enobio® The EEG signal acquisition, which must continue during the measurement of contact impedance, is conducted using an Enobio® device. Enobio® is of the two main product lines developed by Neuroelectrics®, focusing on wireless and easy-to-use EEG devices clinically certified in Europe. The other product line is Starstim®, a set of devices not only capable of acquiring the EEG signal, but also for brain stimulation by injecting small, controlled amounts of currents into different areas of the brain to alter its local electric field and treat electrical related diseases, such as epilepsy or depression. Within Enobio® line, there are various devices, each with slightly different features. The conventional Enobio® devices, which can have 8, 20 or 32 channels, are intended for use in research environments. On the other hand, the Enobio® Dx devices, which also come in 8, 20, or Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 14 The functionality and importance of the CMS/DRL electrodes will be further discussed later. Additionally, the SPI communication section will explain how the multiplexer state and other blocks of the ADS1298 architecture are configured. 2.1.3.3. Programable Gain Amplifiers (PGA) As observed in Figure 8, the output of the input multiplexer leads to the PGAs, whose gain can be configured to: 1, 2, 3, 4, 6, 8 or 12. The PGAs, like other operational amplifiers, have an operating range limited by their power supply, saturating at voltages very close to the supply voltages in the case of rail-to-rail amplifiers (such as the PGAs incorporated in the ADS1298), or typically at ±0.5 V from the supply voltage in standard amplifiers [25]. Normally, the amplification stage for this type of signal consists of a single Low-Noise differential Amplifier (LNA). However, the signal amplification In the ADS1298 is carried out using two operational amplifiers (see Figure 9): Figure 9. PGA architecture [26]. Considering the previously discussed concepts of an amplifier’s operating range and knowing that in this case, they are powered at +3V single supply, we can see that to avoid saturation, the input signals to each of the operational amplifiers (VINP and VINN) must always remain between 0 and +3V, regardless of the differential signal’s overall value (VINP-VINN). In this context, the value of the differential signal will be limited by the gain configured through the passive resistors network connecting both OPAMPS and the admissible input dynamic range of the ADC. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 15 2.1.3.4. RLD amplifier One of the main challenges when measuring biopotentials with differential amplifiers is how to reject common-mode voltage [27]. Common-mode signals are those that are equally introduced to both inputs of an op-amp and therefore do not form part of the differential signal that needs to be amplified. These signals usually originate from electromagnetic interference from the power lines, typically having a frequency of 50/60 Hz. In this context, the human body acts as an antenna since [28] it is electrically floating, increasing the attraction of this type of interference. Amplifiers used for biopotential measurement have a very high Common-Mode Rejection Ratio (CMRR), meaning their design and manufacturing precision allow them to have a much higher amplification factor for differential signals (the variable to be measured) compared to commonmode signals (interference). Figure 10 illustrates how common-mode interference is introduced and the amount of noise it introduces into the output signal based on the amplifier’s CMRR. Figure 10. Common mode interferences in the output signal vs CMRR. However, even when using amplifiers with a high CMRR, mismatches in electrodes impedances, cable impedances, and input protection circuits reduce this rejection capability, increasing interference [29]. Considering the small magnitude of biopotentials, additional stages are often required to further reduce interference. The way to achieve this is by actively driving the body back with a known voltage so that the body is not electrically floating anymore. This voltage could be a certain DC voltage, but the results are improved if the body is driven back dynamically by the interfering common voltage, a technique known as Right Leg Drive (RLD) [28]. In Enobio®, a combination of both methods is used. Figure 11 shows the circuitry in the ADS1298 for RLD. In Enobio®, the common-mode voltage to be fed back to the patient is extracted by closing the RLD_SENSP switch of each channel. But the signal fed back to the patient through the RLD electrode (RLD_OUT) placed on the ear consists not only of this AC signal relative to the common-mode voltage but also, by closing the RLDREF_INT switch, a DC component equal to the one calculated by Eq. 1 [30]: Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 16 (𝐀𝐕𝐃𝐃+𝐀𝐕𝐒𝐒) 𝟐=(𝟑+𝟎) 𝟐=𝟏.𝟓 𝐕 Eq. 1 Figure 11. ADS1298 RLD circuitry [30]. In this way, the patient’s head is set to 1.5 V with respect to the circuit ground. The purpose of this DC voltage is not only to reduce interference but also to prevent the operational amplifiers from saturating during EEG acquisition. As mentioned in the previous section, the operational amplifiers have an operating range of 0 to +3 V, but the brain’s biopotentials can take negative values, causing them to saturate at 0 V. These 1.5 V allow for an offset in the EEG signal that avoids this. Since both the positive and negative terminals of the PGA have signals with this same offset, it cancels out in the output, leaving only the amplified EEG signal. 2.1.3.5. Analog to Digital Converter (ADC) The ADS1298 features a 24-bit ADC for each channel, allowing simultaneous digitalization of each channel. The full-scale range of the ADC is determined by its power supply, which is bipolar and can be either external or internal. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 17 Enobio® uses the internal voltage reference (see Figure 12) incorporated in the ADS1298 to power the ADCs. According to the manufacturer’s datasheet, VREFN must be connected to AVSS to use this internal voltage reference, which can be configurated to two different values: ±2.4 V or ±4 V. The manufacturer also specifies that the ±2.4 V reference must be used when the ADS integrated circuit’s power supply is 3V [31], as is the case with Enobio®. Figure 12. Simplified block diagram of the ADS1298 internal voltage reference [31]. Therefore, knowing that the ADC power supply is ±2.4 V, and that the input signals are expected to be in the millivolt range due to possible signal drift throughout long acquisitions, the gain for the PGAs can be calculated using Eq.2: 𝐹𝑢𝑙𝑙− 𝑆𝑐𝑎𝑙𝑒 𝑅𝑎𝑛𝑔𝑒=2·𝑉𝑅𝐸𝐹 𝐺𝑎𝑖𝑛 → 𝐺𝑎𝑖𝑛=2·2.4 0.8 =6 Eq. 2 On the other hand, knowing the ADC power supply and its bit resolution, the resolution of the signal digitalization process can be calculated using Eq. 3: 𝑅𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛=2·𝑉𝑅𝐸𝐹 2𝑁−1=4.8 224−1=0.2861 𝜇𝑉 Eq. 3 2.1.3.6. GPIO pins The ADS1298 incorporates four general-purpose pins that can be configured as General Digital Inputs or Outputs (GPIO). As will be discussed below, the state and configuration of the GPIO pins are managed via the SPI interface integrated into the device. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 18 2.1.3.7. SPI interface The ADS1298 includes a Serial Peripheral Interface (SPI) used to transmit the digitalized EEG signals and to read and write the configuration registers that control its operation. The SPI uses a master-slave, synchronous, and full-duplex architecture. It can be either 3-wire or 4-wire [32], with the ADS1298 using a 4-wire configuration. Figure 13 presents the typical connection between two devices using a 4-wire SPI communication, and Figure 14 shows the SPI bus incorporated in the ADS1298. By comparing both, it is observed that the ADS1298 acts as a slave, while the μC it is connected to acts as the master. Figure 13. SPI configuration with a generic main and subnode [32]. Figure 14. ADS1298 SPI bus [22]. To initiate SPI communication, the master (μC) must send the clock signal and select the slave by enabling the CS signal. Once the communication is established, the ADS1298 can receive (DIN) and transmit (DOUT) data simultaneously. It is important to comment on the data format used for transmitting information from the DOUT. Figure 15 shows the data output protocol: Figure 15. ADS1298 SPI data output chronogram [33]. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 19 The frame sent by the ADS1298 consists of a 24-bit status word, followed by the signals from each channel, also expressed in 24 bits each. The content of the status word is divided into the parts shown in the chronogram in Figure 16: Figure 16. DOUT status word content [34]. Essentially, the status word provides information about the ADC’s state through the LOFF_STATP and LOFF_STATN bytes. Additionally, the last 4 bits contain the state of the GPIO pins. 2.1.4. ATSAM4SD32CA The microcontroller (μC) used in Enobio® is the ATSAM4SD32CA. This section aims to describe only the relevant tasks performed by this microcontroller in relation to the development of this project, without delving into the technical details of its architecture, as they are not pertinent to this context. The μC enables both the configuration and control of the ADS1298, as well as the management of the communication protocol that connects the device to the User Interface (UI), which will be explained in the next section. For the configuration of the ADS1298, the microcontroller sends the necessary data to adjust its internal registers through the SPI interface. Additionally, it incorporates a read loop that requests the DOUT frame every 2 ms. Regarding the communication protocol with the user interface, it is programmed to transmit data both through the Wi-Fi module incorporated in the Enobio® board and via USB. 2.1.5. NIC software NIC (Neuroelectrics® Instrument Controller) is a software developed by Neuroelectrics® to interact and control not only Enobio® devices but also the products of Starstim® line. In this context of EEG, its primary target is to visualize and record real-time EEG signals. Figure 17 shows an example of how NIC represents the real-time acquired signals in a 8-channel EEG recording: Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 20 Figure 17. Real-time visualization of the EEG signal NIC software [35]. In order to achieve this, NIC allows the creation of customized acquisition protocols, where users can select which electrodes to use and for how long to extract the EEG signal. Additionally, the software includes tools that enable [36]: • Real-time filtering and visualization of the EEG bands. • Line noise filtering at 50 or 60 Hz. • Tri-axial accelerometric data appended to EEG files. Moreover, NIC includes the capability to perform time-frequency analysis of the signal using the following tools [36]: • Real-time Power Spectrum Density (PSD) plots, with configurable temporal windows. • Real-time Spectrogram visualization. • Power bar band or power ratio representation. • Scalp and cortical (upcoming) maps with power distribution display. • Customized workspaces for EEG analysis. 2.2. Electrode-skin interface and contact impedance In Enobio®, the electrodes are not in direct contact with body fluids as considered in Section 2.1.2. Instead, they reside on the surface of the skin. For these types of electrodes, the characteristic of the electrode-body interface depends not only on the electrode properties but also on the skin. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 21 This claims for considering a broader interface that encompasses both the behavior of the skin and the electrode simultaneously: the electrode-skin interface [19]. 2.2.1. Electrical model of the electrode-skin interface Neuroelectrics® offers different types of surface electrodes for acquiring EEG signals [37]: • NG Geltrode. Screwable EEG monitoring electrode for high-quality wet setups. • Drytrode. Dry EEG electrode for robust, quick and clean setups. • Foretrode. EEG electrode for dry and gelled setups on forehead positions. • Earclip. Dual reference electrode for the earlobe CMS-DRL connection. One of the main advantages is that they are all made of the same material: Ag/AgCl, ensuring consistent behavior of the electrode-electrolyte interface across all types. However, the circuit model of the electrode-skin interface also depends on the type of surface where electrode is used, primary distinguishing between wet electrodes (NG Geltrode, Foretrode and Earclip) and dry electrodes (Drytrode). Figure 18 presents the circuit models of the skin-electrode interface for both types of electrodes: Figure 18. Layer stack and circuit model of the electrode-skin interface for wet electrodes (left) and dry electrodes (right) [19]. In the circuits of Figure 18, it is observed that both wet and dry electrodes possess a non-purely resistive nature, which causes the impedance of the electrode-skin interface to be frequency dependent. Figure 19 shows how the value of the equivalent impedance of the electrode-skin interface is affected by the frequency of the signal used to measure this variable: Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 22 Figure 19. Experimentally determined magnitude of impedance as a function of frequency [38]. However, the function that relates both variables, frequency and impedance, can only be determined experimentally, as it depends not only on the material and geometry of the electrode but also on the skin of the subject to which the electrode is connected. Nevertheless, for the development of this project, a simplification of the original electrode models has been considered. This simplified model, represented in Figure 20, does not consider the reactive component of the original electrode models, therefore, they are reduced to a voltage source in series with a resistance: Figure 20. Proposed circuit model for wet and dry Neuroelectrics® electrodes. 𝑣𝑒𝑙𝑒𝑐 represents the equivalent source between the half-cell potential (VHC) and the skin potential (VSC). The latest is estimated to be about -30 mV [19]. 𝑅, is the RCT, REL, RE and RDSL equivalent resistance. This proposed simplification of the original model is possible on account of the following considerations: • As mentioned in Section 2.1.3, the ADS1298 sets the patient’s head at a voltage of 1.5 V relative to the circuit ground to prevent the PGAs from saturating and to reduce EMI. Consequently, the signals passing through the electrodes consist of the EEG signal as the AC component and the 1.5 V reference as the DC component. Given that 1.5 V >> 100 μV, the AC component of the signal can be neglected, allowing the effect of the reactive components in the electrode models to be ignored. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 23 • A linear response of the impedance is expected as a function of frequency within the EEG signal bandwidth (0 – 100 Hz). Otherwise, the EEG signal would be distorted, since some of its harmonics would be more attenuated than others. 2.2.2. Impedance checker In order to extract EEG signals with the highest possible quality, the impedance o the electrodeskin interface must always be kept below 5 kΩ [7], [8]. Above this impedance value, the EEG signal can still be obtained, but it will be much more susceptible to movement artifacts [2] and power line interferences [3]. In this context, an impedance checker is a device or a circuit whose function is to estimate the impedance value of the electrode-skin interface. Typically, impedance checkers do not provide the numeric value of the impedance; instead, they use range indicators. For example, the impedance checker marketed by Biopac® classifies the contact impedance within the following ranges [39]: <5 kΩ, 5-10 kΩ, 10-20 kΩ, 20-30 kΩ, 30-40 kΩ, 40-50 kΩ, >50 kΩ. 2.3. Design specifications of the impedance checker The target of this section is to define which are the design specifications of the impedance checker to be developed. Clearly knowing which characteristics does the system needs to incorporate will allow to evaluate which existing solutions fit the requirements during the state of the art, as well as make informed decisions during the development stage. Most of the requirements to comply have been already presented in section 1.2. Nonetheless, all of them are outlined below: 1. Real-time measurement: The EEG signal acquisition and the measurement of the contact impedance should be able to coexist. 2. Avoid changes on the current validation process of the device. Currently Enobio® currently follows the validation process for a Class A device, as it does not inject active currents into the patient. However, if active currents were injected, as is the case with most existing impedance check circuitries, the validation process would correspond to a Class B or C device, which is significantly more complex than Class A [40]. 3. Compatibility with simultaneous EEG acquisition: EEG signal acquisition should not be compromised because of the measurement of the contact impedance. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 30 impedance, this attenuation factor must be determined experimentally for both the positive electrode (∝), and the negative electrode (𝛽). Thus, the only unknowns in Eq. 6 and Eq. 7 are the values of the contact impedance: 𝑅+ and 𝑅− respectively. 𝛼= 𝑅 𝑅+𝑅+ Eq. 6 𝛽= 𝑅 𝑅+𝑅− Eq. 7 By toggling the switches shown in Figure 24, the voltage dividers for each pin can be connected and disconnected. To estimate the impedance, the signal of only one of the two pins can be attenuated at a time. In this context, four possible output voltages of the Low Noise Amplifier (LNA) are defined: • 𝑣𝑎: EEG signal from the positive electrode relative to ground (𝑆𝑊+, 𝑆𝑊−: 2, 3). • 𝑣𝑏: Attenuated EEG signal from the positive pin electrode relative to ground (𝑆𝑊+, 𝑆𝑊−: 2, 3). • 𝑣𝑐: EEG signal from the negative pin electrode relative to ground (𝑆𝑊+, 𝑆𝑊−: 2, 3). • 𝑣𝑑: Attenuated EEG signal from the negative pin electrode relative to ground (𝑆𝑊+, 𝑆𝑊−: 2, 3). Within this framework, ∝ y 𝛽 can be experimentally estimated by dividing the attenuated signals by the not attenuated ones: 𝛼=𝑣𝑏 𝑣𝑎 Eq. 8 𝛽=𝑣𝑑 𝑣𝑐 Eq. 9 It is worth noting that these voltages cannot be extracted simultaneously; instead, they must be obtained sequentially, starting with 𝑣𝑎 and ending with 𝑣𝑑, which renders the method rather slow. Figure 25 shows how each of them is extracted: Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 31 Figure 25. Output voltage of the LNA during contact impedance measurement [40]. A time transient can be observed, caused by the high-pass filter at the input of the LNA to remove the DC component of the signal, with a value of 2𝜏. This transient occurs each time the switches toggle and lasts approximately 4 seconds. Additionally, the values of the voltages 𝑣𝑎, 𝑣𝑏, 𝑣𝑐 and 𝑣𝑑, exhibit a variable nature, as they correspond to the EEG signal. Therefore, it is necessary to wait up to 4 seconds for each voltage to extract an RMS value that accurately represents the introduced attenuation. Consequently, measuring the impedance of the two electrodes of a channel requires 30 seconds. Although simulations can justify that the attenuation of EEG signals is linear across their entire bandwidth and that no distortion of the signal occurs [40], Figure 25 shows that the measurement of contact impedance is not compatible with the EEG. In terms of precision, specific values are not provided, but rather results from simulations and experimental procedures. Figure 26 shows the results obtained from in-vivo measurements on patients: Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 32 Figure 26. Results of the in-vivo contact impedance measurements using the passive method [40] Individually, the measurements may show a considerable error; however, when averaging multiple measurements, the result is robust [40]. In Figure 26, contact impedances with an estimated value between 0.6 kΩ and 1.8 kΩ were measured using the traditional active method. The averages of the measurements across all channels fall within this range. 3.3. Online method The online method allows for the monitoring of contact impedance changes; however, it is not capable of providing a quantitative value for it [48]. This method has been included in this state of the art analysis because it could be a viable solution if combined with a quantitative method, such as one of the two previously presented. The quantitative methods would be used right before starting the acquisition, and during the EEG recording the evolution of the initial value would be assessed using the proposed technique. To understand how the online method works, it is necessary to consider that the noise affecting the EEG signal can come from three sources (see Figure 27): motion artifacts, contact impedance, and interference from the power line. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 33 Figure 27. Sources of noise during EEG acquisition. It has been proven that there is a correspondence between the amplitude of power line interference and contact impedance, so that as the impedance increases, the interference amplitude increases [48]. The idea is to perform a real-time spectral analysis of the signal, filtering only frequencies between 49 and 51Hz. However, the amplitude of this interference depends not only on contact impedance but also on environmental factors, such as the number of power cables present. As a result, this method cannot provide an absolute impedance value, as it is influenced by both the contact impedance and the EMI on the environment. Although an absolute quantitative value for contact impedance cannot be extracted, its evolution can be monitored considering the following: if there are changes in the environment during acquisition, the amplitude will change uniformly across all electrodes, whereas when contact impedance changes, it affects only a specific electrode. Therefore, by comparing the average signal amplitude of all electrodes with that of a specific electrode at a 50Hz frequency, it is possible to determine whether the impedance is increasing or decreasing over time. To summarize, the online method is qualitative, so a quantitative method is still required at the beginning of the acquisition to ensure that the impedance is below 5 kΩ. To achieve this, either the passive or active method must be implemented. The only advantage of the active method is that the excitation current can be within the EEG bandwidth. 3.4. Comparison of the methods Table 4 summarizes all the methods that have been discussed in this section presenting the advantages and disadvantages offered by each method. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 34 Table 4. Comparison of the existing methods for contact impedance estimation. Method Advantages Disadvantages Active External circuitry High precision Class B / Class C device Complete dedicated circuitry to carry out the measurement needed Compatible with simultaneous EEG acquisition when using a frequency higher of the EEG bandwidth for the excitation current Power consumption Cost of the circuitry ADS1298 Doesn’t require hardware changes in the device Class B / Class C device 30 seconds needed to extract a precise value of the contact impedance Compatible with simultaneous EEG acquisition when using a frequency higher of the EEG bandwidth for the excitation current ±20% of relative error in the impedance value Requires real-time filtering (high computational performance) Passive Avoid changing the validation process of the device to a Class B or C device. 30 seconds needed to extract the value of the contact impedance Less power consumption Low accuracy Minimal hardware changes required to be implemented Incompatible with the EEG acquisition Online Simplicity of the method Qualitative method Still requires a quantitative method to be performed After carefully analyzing the pros and cons, it is considered that the passive method is the only one which have room enough to eventually meet the project requirements mentioned by further investigation. Additionally, it seems to be the method with the best balance between advantages and disadvantages, and since it does not involve integrated circuitry like the ADS1298, there is also room for design improvement. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 35 The main disadvantages, and thus areas for improvement, are low precision, long time required to conduct the measurement, and incompatibility between EEG acquisition and impedance measurement. It is important to highlight that the last two limitations may be considered as one, since if the time required to extract impedance is sufficiently improved, the incompatibility issue could be mitigated, making both measurements compatible. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 36 4. Proposed solution The objective of this section is to describe the proposed solution for measuring impedance, from the original idea to the final version. The development of this proposal has been carried out in four stages, which are outlined in this section: • Impedance check circuitry design: Design of the impedance check circuitry using LTspice. • Impedance check PCB design: Physical implementation of the designed circuitry to validate the measurement method. • Integration between IC board and Enobio® board: Connection and communication between the impedance measurement board and the Enobio® board to validate the compatibility between impedance measurement and EEG acquisition. • Firmware design: Development of the firmware necessary to perform the contact impedance measurement. 4.1. Impedance check circuitry design In this section the development process of the proposed circuitry for the impedance checker is described. As outlined in Section 3.4, to develop the contact impedance measurement circuitry the passive method was used. The main limitations of this method are: • Time required for measurement: ≈ 16 seconds per electrode. • Low precision: Experimental results show low and unquantified precision. • Incompatibly between EEG acquisition and contact impedance measurement: To measure impedance, transients occur that distort the EEG signal, requiring a pause in recording. To that end, efforts were made to mitigate the limitations of the original circuitry, resulting in a solution with satisfactory performance. Figure 28 exhibits the evolution of the design: Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 37 Figure 28. Impedance checker circuitry evolution till final proposal. 4.1.1. EEG signal attenuation circuit Figure 29 shows the circuit designed in LTspice to evaluate the functionality of the proposed methodology. The design of the circuit was based on the examples provided in the reference article of this method [40]. Figure 29. LTspice circuit designed to simulate the EEG attenuation circuit performance. 4.1.1.1. Principle of operation of the circuit As explained in Section 3.2, the principle of operation of the circuit is based on attenuating the EEG signal in proportion to the value of the contact impedance. This attenuation value, known as 𝛼, i s produced by the voltage divider formed by the contact impedance, 𝑍𝐶𝐻1 and the attenuation resistor, 𝑅𝑎𝑡𝑒𝑛. Therefore, 𝛼 can be calculated according to Eq. 10: Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 38 𝛼= 𝑅𝑎𝑡𝑒𝑛 𝑅𝑎𝑡𝑒𝑛+𝑍𝐶𝐻1 Eq. 10 Since the 𝑅𝑎𝑡𝑒𝑛 value is known, the 𝑍𝐶𝐻1 can be determined if 𝛼 is known, which can be experimentally obtained by comparing the output signal when it has been attenuated by the voltage divider with the signal when it has not been attenuated: 𝛼= 𝑣𝑎𝑡𝑒𝑛 𝑣𝑛𝑜_𝑎𝑡𝑒𝑛 Eq. 11 Under these circumstances, 𝑣𝑎𝑡𝑒𝑛 y 𝑣𝑛𝑜_𝑎𝑡𝑒𝑛 can be obtained by connecting and disconnecting the attenuation resistor, respectively. Since 4-second transients are expected when connecting and disconnecting the resistor [40], a total of 8 seconds will be needed to stabilize both signals together. Additionally, since EEG is a signal with variable nature, a discrete value cannot be extracted from each signal for the calculation. Instead, the RMS value must be obtained by considering a sufficient length of the signal to minimize the contribution of the natural variability of the EEG in the RMS value computation. By using 4-second segments of each signal to calculate the RMS value, 16 seconds are required for the measurement: 8 seconds for signal stabilization and 8 seconds for calculating the respective RMS values. Regardless of whether the EEG signal is attenuated or not, it must be amplified. When acquiring low-amplitude signals, such as in this case, amplification is a crucial step to make the most of the ADC's dynamic range and minimize quantization error during the digitization process. Using the AD8429 is proposed to amplify the signal [40]. Later, it will be explained the rationale about why the features of this integrated circuit render it a suitable option for this application. However, it is important to note that a high input impedance is essential. When high gains are used for amplification, the DC component of the input signals to the operational amplifier, caused by the electrode’s half-cell potential, can lead to operational amplifier saturation. This is demonstrated by removing the DC filter and unbalancing the contact impedances Z_CH1 and Z_CMS from the circuit in Figure 29 (see Figure 30). Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 39 Figure 30. EEG signal attenuation circuit without DC HPF. Figure 31. Differential voltage in the LNA input terminals in signal attenuation circuit without HPF filters. Figure 31 shows the differential voltage at the input of the LNA. It is observed that the DC component is much larger than the expected amplitude of an EEG signal: 8.27 mV >> 100 μV. This demonstrates that the DC component can indeed drive the system to saturation if a gain set for amplifying the EEG signal is used. In this case, a solution can be placing DC filters at the input of the operational amplifier [40], as depicted in Figure 29. 4.1.1.2. Components selection Both the LNA (ADS8429) and the switches (ADG1414) models are proposed in the reference article [40], where the value of the attenuation resistor is also set to 5 kΩ. However, the values for the resistor and capacitor of the high-pass filter are not specified. These values have been estimated based on the time constant of the circuit observed in Figure 25, which is estimated to be 1.86 seconds. By setting the resistor value to 1 MΩ, the capacitor value can be calculated according to Eq. 12: 𝜏= 1 𝑅ℎ𝑝𝑓·𝐶ℎ𝑝𝑓 Eq. 12 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 46 Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) 𝜺𝒂𝒃𝒔 (𝛀) 100 92.0 7.99% 7.99 200 191.6 4.20% 8.41 500 490.3 1.94% 9.72 1000 988.0 1.20% 11.97 2000 1982.2 0.89% 17.76 5000 4951.3 0.97% 48.73 10000 9859.0 1.41% 141.01 20000 19527.8 2.36% 472.24 50000 47482.4 5.04% 2517.62 Table 9. Contact impedance estimation using the EEG signal attenuation circuit. EEG input signal 2. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) 𝜺𝒂𝒃𝒔 (𝛀) 100 882.4 -782.4% 782.41 200 997.7 -398.8% 797.67 500 1342.7 -168.5% 842.70 1000 1918.4 -91.8% 918.40 2000 3066.4 -53.3% 1066.37 5000 6497.6 -30.0% 1497.61 10000 12168.6 -21.7% 2168.59 20000 23339.5 -16.7% 3339.46 50000 55598.0 -11.2% 5597.95 Table 10. Contact impedance estimation using the EEG signal attenuation circuit. EEG input signal 3. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) 𝜺𝒂𝒃𝒔 (𝛀) 100 -636.1 736.1% 536.12 200 -550.5 375.2% 350.49 500 -294.0 158.8% 206.00 1000 132.1 86.8% 867.93 2000 984.2 50.8% 1015.81 5000 3529.7 29.4% 1470.29 10000 7736.8 22.6% 2263.21 20000 16025.7 19.9% 3974.34 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 47 50000 39976.8 20.0% 10023.17 Table 11. Contact impedance estimation using the EEG signal attenuation circuit. EEG input signal 4. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) 𝜺𝒂𝒃𝒔 (𝛀) 100 372.5 -272.5% 272.50 200 477.7 -138.9% 277.74 500 793.4 -58.7% 293.45 1000 1318.5 -31.8% 318.49 2000 2367.9 -18.4% 367.91 5000 5505.1 -10.1% 505.06 10000 10691.5 -6.9% 691.47 20000 20913.4 -4.6% 913.35 50000 50477.0 -1.0% 477.03 Table 12. Contact impedance estimation using the EEG signal attenuation circuit. EEG input signal 5. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) 𝜺𝒂𝒃𝒔 (𝛀) 100 773.5 -673.5% 673.55 200 886.7 -343.4% 686.74 500 1225.4 -145.1% 725.39 1000 1790.1 -79.0% 790.08 2000 2917.7 -45.9% 917.67 5000 6286.2 -25.7% 1286.24 10000 11855.7 -18.6% 1855.65 20000 22833.0 -14.2% 2832.96 50000 54600.1 -9.2% 4600.12 The results reveal a significant increase in error, something that could be already anticipated given the natural and unpredictable variability in EEG signal amplitude. The randomness of this error can be verified by comparing the results across Table 8, Table 9, Table 10, Table 11 and Table 12. For instance, focusing on the estimates performed for a contact impedance of 100 Ω, the absolute error can range from 7.99 Ω to 782.44 Ω. The same variability is observed for the other impedance values. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 48 Such randomness is not present for impedances estimated with the same signal, as the experimental impedance generally increases in proportion to the theoretical value. The reason is that the EEG signals used have a duration of 23.5 seconds, and since it takes 16 seconds to estimate the impedance, only a single segment can be used to calculate the impedance per signal (see Figure 38). Given that all impedances in a particular table were assessed using the same segment, the same random error is present in all cases. Figure 38. Length of EEG signal 6 from the database. Despite the proportionality between the increase in theoretical and experimental impedance, the absolute error appears to show a slight increase as the impedance grows. This behavior was also observed in tests with theoretical signals and is attributed to the increased stabilization time required for the signal. Based on the results obtained for this method, it can be stated that, beyond the time required to perform the measurement, another significant limitation for its use is the natural variability of the EEG signal amplitude. This cannot only be controlled but may also be greatly increased due to eye blinks, motion artifacts and/or facial muscle activity. The real EEG signals used for the tests in this section were visually inspected to eliminate these three main sources of variability [52], so it is expected that results would generally show higher and occasionally aberrant errors in in-vivo tests. 4.1.1.5. Method limitations After conducting the simulations of the method proposed [40], the following limitations have been identified: 1. Time required for impedance estimation: Due to the transients produced by the highpass filter and the intrinsic variability in the amplitude of the EEG signal, 16 seconds are required to calculate the contact impedance value. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 49 2. Incompatibility between the EEG acquisition and the contact impedance estimation: Since the EEG signal is altered during the measurement, the segments used to estimate contact impedance must be discarded, making it not suitable for real-time use. 3. Random and incontrollable error in the contact impedance estimation: the variability in the RMS value of the EEG is unpredictable. Such variability can be further exacerbated by movement artifacts, eye blinks and/or facial muscle activity, leading to aberrant errors when estimating contact impedance. 4.1.2. DC component amplification circuit The DC component amplification circuit is the final proposal for measuring contact impedance. It has been designed based on the fundamental idea presented in the reference article [40] and tested in the previous section but including in the design a way to address the three main limitations identified. Additionally, it is a design that fully integrates with Enobio®’s circuitry, using the previously discussed ADS1298 (see section 2.1.3). The primary change in this proposal, aside from its adaptation to Enobio®, is the use of the DC component of the EEG signal for measuring impedance, unlike the previous method, which filters it with the high-pass filter (HPF). Since the main source of error in the original method arises from variability in the amplitude of the EEG signal, using the DC component—and thus a deterministic signal—could lead to results with precision similar to that shown in Table 7. Using the DC signal would not only potentially reduce and control the error but could also significantly decrease the measurement time, as it would eliminate the 4-second transients produced by the HPF and the need to wait 4 seconds to extract reliable the RMS values of 𝑣𝑎𝑡𝑒𝑛 and 𝑣𝑛𝑜−𝑎𝑡𝑒𝑛. Therefore, if the time required to estimate impedance can be sufficiently reduced, it could be considered negligible, thereby making the method suitable for real-time applications. 4.1.2.1. Principle of operation of the circuit Figure 39 presents the final proposal for the measuring contact impedance circuit. Since there is no Spice model available to simulate the behavior of the ADS1298, it has been necessary to add circuitry to the simulation circuit that mimics the behavior of this integrated circuit within Enobio®, at least up to the digitization stage. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 51 Figure 39. DC component amplification circuit. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 52 In Figure 39 it can be observed that the model used to simulate the electrode is the same as the one described in Section 2.2.1. In addition, the simulated input signal consists of the EEG and the common-mode voltage, which, as previously explained, is 1.5 V (excluding electromagnetic interference). The following sections provide a detailed explanation of the circuitry related to the ADS1298, the impedance checker, as well as the model used to simulate the head from an electric point of view and the interconnection between the reference and EEG electrodes. 4.1.2.1.1. Enobio®’s simulation circuit Figure 40 illustrates the designed circuit to simulate the behavior of the analog stage of the ADS1298 in Enobio®: Figure 40. Circuitry to simulate the ADS1298 performance of a single channel in Enobio®. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 53 The first element is the multiplexer, which in Enobio® is configured to 000, selecting the VINP and VINN pins as inputs to the PGAs (see Figure 8). The positive pin is directly connected to the signal from an EEG electrode, while the negative pin connects to the CMS electrode. Next comes the PGA, whose structure replicates that described in the ADS1298 datasheet (see Figure 9). It is worthy to note that, in this case, a switch has been added to connect and disconnect the 20 kΩ resistor that links the two operational amplifiers, allowing the PGA gain to be adjusted between 1 and 6, as described by the expression in Eq. 14. The need to set the gain to 1 during impedance measurement will be explained later in this section. (𝐴𝐷𝐶+−𝐴𝐷𝐶−)=(𝑉𝐼𝑁𝑃−𝑉𝐼𝑁𝑁)·(1+100 𝑘 𝑅𝐺) Eq. 14 Lastly, the RLD amplifier, whose functionality and architecture described in Section 2.1.3.4 , has also been replicated. 4.1.2.1.2. CMS electrode and common mode voltage Figure 41 represents how the interconnection between the CMS, DRL and EEG electrodes has been modelized. The main idea is to consider the patient's head as a single electrical node to which all the electrodes are connected. The DRL is the one that applies the 1.5 V to the electrical node, that is, the patient's head. Figure 41. Electrodes interconnection and common mode voltage. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 54 4.1.2.1.3. Impedance check circuit As with the method described in Section 4.1.1, the proposed impedance checker is based on changes in the amplitude of the input signal to the PGA to estimate the contact impedance. However, in this case, it is not the amplitude of the EEG signal that is used for the calculations, but rather its DC component. As previously mentioned, the ADS1298 used by Enobio® is powered in a unipolar manner, but EEG signals can have both negative and positive values. In order to prevent saturation of the PGAs, EEG signals are always offset by 1.5 V relative to the system ground (see Section 2.1.3.4). This offset is introduced through the CMS and DRL reference electrodes placed on the patient’s ear. Figure 40 shows this reference voltage introduced from the RLDREF pin of the ADS1298. Usually, this offset is nullified at the PGA output because it is common to both pins, and thus only the AC component, i.e., the EEG, is amplified. Starting from this point, the proposed estimation method is developed. In the results of the EEG signal attenuation method, it was observed that the main source of error was the intrinsic variability in the amplitude of the signal used to estimate the contact impedance, which is the EEG. As just mentioned, in Enobio®'s configuration, the input signals to the PGA have a DC component with a value much higher than the EEG itself: 1.5 V >> 100 μV. DC signals are intrinsically deterministic since their defining feature is their invariability in amplitude. This is why the proposed method revolves around using this DC component to estimate the impedance. From here, the goal is to find a way to vary the DC component of only one of the two pins based on the contact impedance. This way, the DC voltage on both PGA pins will no longer be the same, resulting in an offset at its output, which will depend on the contact impedance. The first proposed solution to achieve this is to continue using the voltage divider suggested in the method explained in Section 4.1.1. Figure 42 illustrates how this design would look: Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 55 Figure 42. EEG DC component attenuation circuit. Nonetheless, this circuit presents a problem: both ends of the divider have the same DC component value, so its output (VINP) remains unchanged even though the value of Z does change. This can be demonstrated by deriving the mathematical expression that defines the DC voltage value at VINP (see Eq. 15): 𝑉𝐼𝑁𝑃=(𝑉𝑒𝑙𝑒𝑐_𝑒𝑒𝑔+𝑉ℎ𝑐)·𝑅𝑎𝑡𝑒𝑛+𝑉𝑒𝑙𝑒𝑐_𝑐𝑚𝑠·𝑍 (𝑅𝑎𝑡𝑒𝑛+𝑍) 𝑉𝐼𝑁𝑃=(1.5+0.223)·𝑅𝑎𝑡𝑒𝑛+1.723·𝑍 (𝑅𝑎𝑡𝑒𝑛+𝑍) =1.723·𝑅𝑎𝑡𝑒𝑛+𝑍 𝑅𝑎𝑡𝑒𝑛+𝑍=1.723 𝑉 Eq. 15 A solution to avoid this problem is to connect one of the divider pins to ground, as represented in Figure 43: Figure 43. EEG DC component attenuation circuit. Grounded tension divider. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 56 Simulating this circuit reveals a problem: the input impedance of the acquisition system drastically decreases, and as a result, the current flowing through the patient increases, reaching values on the order of 300 μA for reduced contact impedances. Figure 44 shows the current value: Figure 44. Current flowing through the patient using the EEG DC component attenuation circuit. Raten = 5 kΩ. The only way to increase the input impedance using this configuration is by increasing the value of the attenuation resistor. Through simulations, it has been determined that the minimum value required to avoid exceeding the 2 μA current limit is 800 kΩ. Figure 45 illustrates the current flowing through the patient for this attenuation resistor value: Figure 45. Current flowing through the patient using the EEG DC component attenuation circuit. Raten = 800 kΩ. The issue with using such high-value attenuation resistors is that it significantly reduces the output full-scale range (FSO), and consequently, the sensitivity. In instrumental systems, maintaining high sensitivity across the calibration curve is crucial so that even with small ranges, acceptable FSO values are obtained [53]. In this case, although the range is not small (100 Ω – 50 kΩ), the FSO is only 0.101 V (see Figure 46), highlighting the low sensitivity of the system. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 63 that when the lower branch of the impedance checker is activated, Vo and VINP are at the same voltage. Figure 50. Impedance checker differential amplifier calibration curve. In the figure above, it can be observed that the FSO has significantly increased compared to that of the DC attenuation circuit (see Figure 46). It is noteworthy that, although the calculation constraints were set for an output voltage range of 0 to 3 V, with this optimal resistor configuration, only an approximate range of 0.1 V to 1.4 V is achieved. This is because the constraints related to input impedance and the maximum and minimum values for the resistors, which ensure proper current flow through the passive network, must also be satisfied. Lastly, it is relevant to note that, although it was already known from the differential amplifier's transfer function presentation that the system’s calibration curve is not linear, this is still the most optimal design for the impedance checker circuitry. 4.1.2.2.2. Switch U7 and U8 The key parameters considered for selecting the switch model for the impedance checker were: • Power supply: Since the impedance checker circuitry must be powered by Enobio®, the power supply needs to be unipolar at +3 V. • Resistance Ron: When the switches are closed, ideally, they act as a short circuit between their terminals. However, in fact, they present a certain resistance value. Given that the Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 64 switch is in series with the contact impedance, its resistance when closed should be as low as possible to avoid affecting the impedance estimation. • Transition time: The switches require a transient period to change from a low to a high state. Since impedance measurements aim to be as quick as possible, switches with a transition time in the order of milliseconds or less are preferred. • Low power consumption: Considering that two switches are needed per channel, a model with low power consumption is desired to minimize the impact on Enobio®'s battery life. For these reasons, the selected model was the ADG786. Table 15 summarizes its most significant technical specifications: Table 15. ADG786 technical specifications considering VDD = 3 V, VSS = 0 V, GND = 0 V [55]. Technical specification Value Ron 6 Ω ton 28 ns IDD 0.001 µA 4.1.2.2.3. U2 and U4 amplifiers Regarding the selection of amplifiers, the key technical specifications to ensure suitable performance for this application are: • Power supply: As previously mentioned, the power supply must be unipolar at +3 V. • Output offset: Given that the input impedance value is estimated from the DC component of the EEG signal, it is crucial to ensure that the amplifiers used, both in the differential and buffer configurations, do not alter this value. Therefore, a model of operational amplifier with minimal bias current disparity will be sought. • Bias currents: Selecting amplifiers with low bias currents helps achieve a low output offset. • Low power consumption: Similar the switches, since two amplifiers are needed per channel, integrated circuits designed for battery-powered applications will also be sought. Table 16 provides the relevant technical specifications of the selected model, the ADA4528: Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 65 Table 16. ADA4528 technical specifications considering V+ = 3V, V- = 0 V supply [56]. Technical specification Value Ron 6 Ω ton 28 ns IDD 0.001 µA 4.1.2.3. Simulations with a single channel This section presents the results from the simulation of the circuit depicted in Figure 39, which is the final design proposal for the impedance checker. To streamline the simulation process and facilitate a clear evaluation of the results, only a single channel is considered in this initial phase although Enobio® incorporates from 8 to 32 channels. 4.1.2.3.1. Circuit variables and simulation parameters Table 17 provides the values assigned to the circuit variables during the simulations: Table 17. Value of the circuit variables during the simulation of the DC component amplification circuit. Variable Value Justification Contact impedance (Z) 100 Ω, 200 Ω, 500 Ω, 1 kΩ, 2 kΩ, 5 kΩ, 10 kΩ, 20 kΩ, 50 kΩ The accuracy of the method is tested for various contact impedance values. Voltage source simulating the EEG signal (+EEG) Real EEG signals To ensure realistic results, real EEG signals are used in the simulations. There are extracted from an open EEG database. [51] Common-mode voltage (Vcms) Amplitude: 1.5 V Frequency: 0 Hz As previously mentioned, the commo-mode voltage is 1.5 V. Electromagnetic interference is considered negligible for clear evaluation of the results. Control signal of U8 switch (VIN) Square Amplitude: 3V ton: 1 ms T: 2 ms The upper branch is activated during 1 ms to acquire the Veeg signal with a unitary gain. Control signal of U7 switch (-VIN) Square Amplitude: 3V ton: 1 ms T: 2 ms The lower branch is activated during 1 ms to acquire the Vo signal with gain 1. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 66 Delay: 1 ms Table 18 shows the simulation parameters used: Table 18. Value of the simulation parameters for the DC component amplification circuit simulation. Simulation parameters Value Stop time 2 ms Maximum timestep 0.000025 s Time to start saving data 0 s 4.1.2.3.2. Circuit simulation results As explained in section 4.1.2.1, estimating the contact impedance requires extracting the values of three key signals: Veeg, Vo and Vcms. This section shows these three signals acquired by the simulation of the circuit depicted in Figure 49. When the upper branch is selected as the input to the ADS1298 and the PGA is set to 6, the signal obtained at the ADC input is the amplified EEG. This signal is shown in Figure 51: Figure 51. EEG amplified signal. Upper branch selected. PGAgain=6. To obtain the Veeg and Vo signals required for impedance estimation, the PGA gain is set to 1. The upper branch is first selected as the input to the ADS1298 for 1 ms to extract the Veeg signal, followed by the selection of the lower branch to capture the Vo signal. During this impedance estimation process, the signal at the input to the ADS1208 ADC appears as shown in Figure 52: Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 67 Figure 52. Veeg and Vo signals. Upper and lower branches selected alternatively. PGAgain=1. This millisecond interval used to extract Veeg and Vo signals has been experimentally determined through simulations as the minimum required time to reach a steady state following the transitions of U7 and U8 switches. Finally, the Vcms signal is obtained directly by measuring the voltage at VINN relative to ground. The Vcms signal is continuously monitored by Enobio®’s microcontroller. Figure 53 shows the Vcms signal: Figure 53. Vcms signal obtained simulating the single channel DC component amplification circuit. By combining all these events, the process of estimating the contact impedance during EEG signal acquisition can be effectively simulated. For instance, if the impedance values is calculated once every 10 seconds, for example, the complete signal at the ADC input would have a morphology similar to that depicted in Figure 54. The vertical line in the middle corresponds to the impedance check signal as Figure 56 shows. Figure 54. Contact impedance estimation during EEG acquisition. As observed in the figure above, the signal offset remains at zero throughout the entire EEG acquisition process. A noticeable jump at t = 10 seconds can be seen, corresponding to the impedance estimation. Figure 55 and Figure 56 provide zoomed-in views of Figure 54, illustrating the signal during EEG acquisition and at the moment of impedance estimation respectively: Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 68 Figure 55. EEG acquisition. Figure 56. Contact impedance calculation. Simulations were also conducted to ensure that the current remains below the 2 μA limit set for each channel. Figure 57. Current flowing through the patient using the final proposed circuit. The simulations indicate that the current is slightly higher than the ±2 μA limit, specifically -2.75 μA. However, it remains within the overall restriction discussed in Section 2.3. Multiplying -2.75 μA by 32 channels results in a total of 88 μA, which is still below the 100 μA limit established by the IEC 60601-1 standard. 4.1.2.3.3. Impedance estimation results This section presents the results of the impedance estimation using the developed impedance checker circuitry. Additionally, the robustness of this method against the natural variation in EEG signal amplitude will be evaluated by estimating the same impedance values using five different EEG signals. This procedure was also carried out in section 4.1.1.4.3. Table 19 through Table 23, show the results obtained: Table 19. Contact impedance estimation using the DC component amplification circuit. EEG input signal 1. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) 𝜺𝒂𝒃𝒔 (𝛀) Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 69 100 107.74 7.74% 8 200 207.50 3.75% 7 500 507.64 1.53% 8 1000 1007.09 0.71% 7 2000 2006.89 0.34% 7 5000 5004.84 0.10% 5 10000 10002.68 0.03% 3 20000 19990.97 0.05% 9 50000 49935.47 0.13% 65 Table 20. Contact impedance estimation using the DC component amplification circuit. EEG input signal 2. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) 𝜺𝒂𝒃𝒔 (𝛀) 100 107.97 7.97% 8 200 207.62 3.81% 8 500 507.69 1.54% 8 1000 1007.15 0.71% 7 2000 2006.61 0.33% 7 5000 5005.72 0.11% 6 10000 10002.55 0.03% 3 20000 19991.11 0.04% 9 50000 49946.21 0.11% 54 Table 21. Contact impedance estimation using the DC component amplification circuit. EEG input signal 3. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) 𝜺𝒂𝒃𝒔 (𝛀) 100 108.88 8.88% 9 200 208.50 4.25% 8 500 507.77 1.55% 8 1000 1007.65 0.77% 8 2000 2008.96 0.45% 9 5000 5008.86 0.18% 9 10000 10003.08 0.03% 3 20000 19991.67 0.04% 8 50000 49936.80 0.13% 63 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 70 Table 22. Contact impedance estimation using the DC component amplification circuit. EEG input signal 4. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) 𝜺𝒂𝒃𝒔 (𝛀) 100 108.03 8.03% 8 200 207.66 3.83% 8 500 507.84 1.57% 8 1000 1007.25 0.73% 7 2000 2006.78 0.34% 7 5000 5005.87 0.12% 6 10000 10002.93 0.03% 3 20000 19992.17 0.04% 8 50000 49946.98 0.11% 53 Table 23. Contact impedance estimation using the DC component amplification circuit. EEG input signal 5. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) 𝜺𝒂𝒃𝒔 (𝛀) 100 107.94 7.94% 8 200 207.51 3.75% 8 500 507.66 1.53% 8 1000 1007.07 0.71% 7 2000 2006.59 0.33% 7 5000 5005.46 0.11% 5 10000 10002.76 0.03% 3 20000 19991.38 0.04% 9 50000 49935.32 0.13% 65 The results demonstrate that the contact impedance can be estimated with very low and highly satisfactory absolute errors using the DC component amplification circuit. The absolute error consistently remains below 10 Ω, while the relative error stays under 10% in all cases, effectively meeting the designs specifications set as the target in section 2.3. Another important aspect to highlight is the consistency of the contact impedance estimations, which remain almost identical even when different EEG signals are used in the input of the circuit. This consistency is crucial, as it ensures the repeatability of the methos. In electronics, repeatability is defined as the variation between multiple measurements of the same value, taken within short time intervals using the same measurement system, and performed by the same Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 71 operator [57]. Although being a qualitative concept, it is often quantified using the standard deviation. Table 24 presents the standard deviation for each estimated impedance valued obtained using five different EEG signals: Table 24. DC component amplification circuit repeatability quantification. Theorical resistance (Ω) σ (Ω) 100 0.395 200 0.376 500 0.074 1000 0.216 2000 0.903 5000 1.399 10000 0.184 20000 0.429 50000 5.287 The low standard deviation presented in Table 24 demonstrates the strong repeatability of the method. However, a slight increase in both the standard deviation and the absolute error is observed for higher impedance values, such as in the case of 50 kΩ. This effect can be explained by the system’s calibration curve shown in Figure 50. As the contact impedance increases, the sensitivity of the system decreases, leading to a nearly flat region on the curve. This reduction in sensitivity is not critical in this context, as the goal Is to estimate impedance values within a specific range, 100 Ω to 50 kΩ. To enhance the system’s reliability, a simple restriction could be implemented: once a certain voltage value corresponding to 50 kΩ is exceeded, the output could simply indicate that the impedance is above 50 kΩ without providing a specific value. 4.1.2.4. Simulations with eight simultaneous channels After confirming the correct operation of the circuit for a single channel, it must be demonstrated that this circuit can be simultaneously implemented across all eight EEG channels connected to the ADS1298 without any interference between them, given that they all share the same CMS node. The circuit used for this simulation is provided in Appendix A.2. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 72 4.1.2.4.1. Circuit variables and parameters simulations The circuit variables and simulation parameters in this case were consistent with those specified in section 4.1.2.3.1. However, it is important to note that, in this case different EEG signals were applied to each channel to more accurately reflect a real scenario. 4.1.2.4.2. Circuit simulation results Figure 58 illustrates the input voltage to the ADS1298 ADC for each channel during the impedance estimation process. This figure shows that, overall, the signals obtained across all channels appear correct, as they exhibit the same morphology observed in the single-channel circuit simulation (see Figure 52). As in the previous case, the first millisecond corresponds to the Veeg signal, while the second to the Vo signal, both obtained by setting the PGA to a unitary gain. Figure 58. Veeg and Vo signals when simulating the 8 channels simultaneously. Independent graphic plane for each channel. Table 25. Contact impedance configured in each channel. Channel Contact impedance (Ω) CH1 100 CH2 200 CH3 500 CH4 1000 CH5 2000 CH6 5000 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 79 In this context, the most IC packaging types are: Dual Inline Package (DIP), Small Outline Package (SOP), Quad Flat Package (QFP), and Ball Grid Array (BGA). Figure 62 provides examples of each packaging type, while Table 28 outlines their characteristics, along with the advantages and disadvantages they offer. Figure 62. Common IC packaging types. Table 28. Common IC packaging types. Characteristics, advantages and limitations [58] [59]. Packaging type Characteristics Advantages Limitations Dual Inline Package (DIP) Rectangular housing and two parallel rows of electrical connecting pins. Through-hole mounting technology Low cost Mounting and soldering simplicity Easy access to pins signals Large size Limited pin count Non suitable for high density PCB designs Small Outline Package (SOP) Rectangular body. J-lead terminals compatible with surface-mount technology (SMD) Improved space and efficiency Good cost-benefit compromise Easy access to pin signals Requires specialized SMT assembly equipment and processes Quad Flat Package (QFP) Square body. J-lead terminals compatible with surface-mount technology (SMD) Incorporate thermal pads or exposed pads for head dissipation Easy access to pin signals Suitable for high density PCB designs: higher pin count than DIP and SOP Good cost-benefit compromise Requires specialized SMT assembly equipment and processes More expensive PCB manufacturing process compared to using DIP and SOP packages Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 80 Suitable for highperformance devices Ball Grid Array (BGA) Use an array of solder balls on the bottom instead of the traditional pins or leads High pin count capacity (can incorporate more than 1000 pins) Enables high-density PCB designs Excellent electrical performance (short interconnect lengths) No-access to pins signals (difficult error inspection) Implies an expensive PCB manufacturing process Difficult faulty BGAs reworking When selecting the packaging for the impedance checker, it is essential to consider the characteristics of the Enobio® board to ensure that, in the event of implementation, the physical design of the impedance checker requires minimal modifications. On the one hand, given that Enobio® employs a high-density PCB design with limited space, BGA could be a viable option. In fact, this technology packaging is already used in some of the key ICs of the device, such as the ADS1298. However, since the impedance check is still in the validation phase, easy access to the pin signals is essential to facilitate debugging in case of possible PCB errors. Additionally, the packaging should allow for easy desoldering to replace or remove components as needed, something that BGA doesn’t permit. The high cost of BGA packaging is also a factor against its implementation considering that the impedance checker circuitry is not embedded in a unique IC but requires a lot of individual ICs. On the other hand, DIP and SOP packages were ruled out due to their incompatibility with highdensity designs like Enobio®. For all these reasons, the QFP is chosen. It provides a good balance between accessibility for testing and debugging, component replacement and compatibility with the high-density PCB design. Furthermore, its manufacturing cost is lower compared to BGA, making it a more economical choice. 4.2.2.3. Bill of Materials (BoM) Appendix B.2 presents the PCB BoM. As said before, when selected, all components present enough stock to be immediately supplied to the manufacturer. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 81 4.2.3. Technical specifications of the PCB design The impedance checker operates at low frequencies (always below 1 kHz). This offers significant advantages in the PCB design. According to literature, signals with frequencies below 50 kHz typically do not pose electromagnetic radiation concerns, allowing for a simpler noise control and signal integrity management [60]. As a result, the purpose of this section is not providing an exhaustive guide on optimal PCB design, but rather to highlight the key technical specifications implemented to ensure adequate performance with respect to signal integrity, electromagnetic interference, and compliance with manufacturing standards. 4.2.2.1. PCB stack up One of the main factors that define a PCB is the number of layers, known as the stack-up. For this project, a 4-layer design was chosen as at least two signal layers were required to route all the connections. Additionally, a 4-layer design offers enhanced PCB performance in terms of signal integrity and electromagnetic interference (EMI). The main advantages of using this stack-up are outlined below [60] [61]: 1. Reduction of noise caused by trace inductance: Inductance is the property of a conductor that resists changes in current flow. Its magnitude depends on the geometry of the conductor. Signals transmitted on a PCB whether analog or digital, involve changing current flow, meaning the conductors can couple noise to the signal. Longer traces result in a higher inductance and increased coupled noise. One effective wat to mitigate this is by minimizing the length of the traces, particularly power supply traces, as they are often the longest due to the need to power all active components in the circuit. A 4-layer PCB is advantageous in this context, as one plane can be dedicated to ground and another to power, minimizing the length of power traces and thus reducing coupled noise. Shorter traces also lower the noise introduced from external sources. 2. Optimal signal return path: Another key aspect of PCB design is the signal return path. In a PCB, all signal currents form closed loops: they flow from the power source, through the circuit, and return to the lower potential side of the source. In two-layer boards, these current loops are often larges because there are no dedicated ground or power layers forcing signals to travel trough irregular copper planes or loose traces. Larger loops radiate more electromagnetic energy, both to the outside and across the PCB. In contrast, 4-layer boards provide a nearby ground layer for signal return, allowing for a direct and smaller return path, which reduces EMI radiation. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 82 Once the number of PCB layers has been selected, the next step is to determine the thickness and material of the various layers and dielectrics. For this project, a standardized stack-up design for boards with a thickness of 0.8 ± 10% mm was used [62]. This thickness was chosen as it closely resembles the stack-up design used in Enobio®. Figure 63 shows the final layer design implemented for the impedance check PCB. Figure 63. Impedance check PCB stack-up design specifications. 4.2.2.2. Layout For the PCB layout, the components were arranged to achieve the shortest possible trace lengths, an effective method for reducing the EMI coupling. It is also important to note that return currents were not a primary consideration in either the component placing or signal routing. Controlling return currents is critical when dealing with mixed-signal boards or high-frequency signals. In the case of the impedance check, most signals are analog, and the only digital signals (used for switching control) originate from an external board. Consequently, their return currents will travel through the ground of the external board and will not interfere with the analog signals on the impedance checker. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 83 4.2.2.4. General multilayer fabrication parameters and general tolerances There are specific manufacturing parameters for multilayer PCBs that define the dimensions and minimum distances between elements such as conductors and vias. The value of these parameters depends on the board class: the higher the class, the smaller the allowable dimensions, buy higher the manufacturing cost. As a PCB manufacturer, Lab Circuits provides tables on which this information can be consulted [63]. The class of the PCB is determined by the most restrictive dimension that it uses. The impedance checker PCB was classified as a Class 5 board, with the most restrictive dimension being the minimum distance between external layer conductors, a result of the chosen component packaging. Other manufacturing parameters, such as via size and conductor width, were set according to the allowable sizes for this class. The specific values used for these parameters are listed in Table 49 of Appendix B.3. During the manufacturing process, the real parameters value may deviate from the nominal values due to tolerance. These tolerances can be standard, when high precision is not critical or special, for more sensitive designs. For the impedance checker PCB, standard tolerances were applied. They can also be reviewed in Table 50 of Appendix B.3. 4.2.2.5. Copper pouring and Via stitching Copper pouring involves filling unused areas on the external layers of a PCB with copper and referencing these areas, typically to ground, through multiple connection vias (via stitching). While this technique is widely used, improper application or use in unsuitable contexts can degrade PCB performance, leading to debate over it real benefits [64]. Applying copper pouring correctly requires expertise in both EMI management and PCB design. Even when applied properly, copper pouring has both advantages and disadvantages that must be evaluated in each specific case. Table 29 summarizes the possible pros and cons of this technique: Table 29. Possible advantages and disadvantages of copper pouring technique [64] [65]. Advantages of copper pours Disadvantages of copper pours Additional shielding and noise reduction if there are internal signal layers Small copper areas can act as patch antennas and potentially emit noise Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 84 Crosstalk reduction in RF designs Thick copper layers can make desoldering more difficult during repairs, unless thermal reliefs are used Provides some additional heat sinking Via stitching blocks potential routing paths, making routing more difficult unless blind or buried vias are used Reduces the amount of etchant required during PCB fabrication Some studies show minimal crosstalk improvement, and improper application can increase crosstalk significantly [64] Reduces the risk of PCB warping during reflow by balancing the copper distribution Ground pours can alter the impedance of nearby traces If the impedance checker were an independent circuit, it would be preferable to avoid copper pouring and via stitching, as many of the advantages listed in Table 26 are not relevant to this design. The impedance checker operates at low frequencies and does not require significant thermal dissipation. In this case, the disadvantages of copper pouring outweigh the benefits and could potentially interfere with the PCB's performance. However, in the case of Enobio®, copper pouring has proven beneficial due to the presence of RF signals, internal signal layers, and other technical considerations. Since the goal of the impedance checker is to be compatible with the Enobio® system, so it can potentially be integrated, it was decided to incorporate copper pouring and via stitching in the impedance checker PCB as well. While copper pouring may not provide significant benefits for this specific circuit, the goal is to validate its functionality in an environment as similar to Enobio® as possible. Therefore, the copper pouring specifications for the impedance checker PCB have been based on Enobio®’s design. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 85 5. Design verification To validate the design of the proposed impedance checker circuitry, a series of tests are conducted using the PCB described in Section 4.2. As mentioned earlier, the PCB not only integrates the impedance check circuit but also includes additional components that allow all validation tests to be performed on the same board. This validation process can be divided into three distinct phases: 1. Testing board integrity: Verify there are no manufacturing or soldering defects through visual inspection and electrical testing of power supplies and signal paths, also known as First Article Inspection. 2. Validation of the operating principle: Demonstrate that contact impedance can be estimated by the variation of the differential amplifier gain. 3. Validation of the compatibility between impedance checker and Enobio® circuitries: Verify that contact impedance estimation can be performed using the signal acquired by Enobio® system. 5.1. Electrical model of a human head As the impedance check board is not a medical device, for safety reasons, the impedance checker circuit cannot be performed on humans. Therefore, additional circuitry is required to simulate the patient’s head. Neuroelectrics® has developed a test board specifically for this purpose. Figure 64 shows part of the board schematic. Figure 64. Test board developed by Neuroelectrics® for simulating the electrical model of the human head. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 86 In this setup, the 4.02 kΩ resistors simulate the contact impedance of the electrodes, while the 150 Ω resistors represent the head impedance. The “CENTER” is a test point used to verify if CMS/DRL electrodes are correctly maintaining the 1.5 V reference tension between the patient’s head and the circuit ground (check Section 2.1.3.4). Human head impedance can be measured through rheoencephalography (REG), with the impedance value fluctuating due to changes in blood volume during the cardiac cycle. Figure 63 shows an example of a rheoencephalogram, where the mean impedance is around 110 Ω for this patient, which closely aligns with the 150 Ω used in the Neuroelectrics® test board. The lowfrequency fluctuations correspond to the patient’s breathing [66]. Figure 65. Brain impedance signal during several breathing cycles [66]. To perform realistic tests, the Neuroelectrics® test board would ideally be used. However, it presents a limitation: the contact impedance is fixed at 4.02 kΩ, while for the impedance check validation it is necessary to demonstrate the ability to estimate contact impedances ranging from 100 Ω to 50 kΩ. One potential solution if to replace the fixed 4.02 kΩ resistors (RC1, RC2, …, RC8) with potentiometers. However, a simpler solution is to neglect the 150 Ω head impedance between electrodes, as it is not relevant in impedance checker validation results. When doing so, the head electric model becomes a single electrical nose, as shown in Figure 66: Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 87 Figure 66. Electrical model of the human head if head's impedance is neglected. Additionally, the 4.02 kΩ resistors are unnecessary, as the impedance checker PCB already includes potentiometers for simulating electrode contact impedance. Considering all this, the final design proposed for testing is shown in Figure 67: Figure 67. Proposed electrode connections for the impedance checker validation process. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 88 5.2. Testing methods and procedures In this section, the methods and procedures followed in each of the mentioned phases are detailed. The connections of the impedance check board and the jumper configuration used during this validation process are provided in Appendix C.1. In order to streamline the validation process and facilitate its repetition by someone external to the development of this project, a dedicated firmware has been designed to incorporate all the necessary programs for the validation tests. This firmware includes a drop-down menu in the computer console, allowing the user to select the specific test to perform at any given time. The corresponding code can be found in Appendix C.2. 5.1.1. Integrity of the impedance check board The first phase of the design validation process focuses on ensuring the PCB’s integrity, eliminating any potential manufacturing or soldering issues. This process involves two tests: visual inspection and power supply check. 5.1.1.1. Visual inspection Before powering the PCB, a visual inspection is performed to check for any potential short circuits between adjacent pads. If necessary, a continuity test is conducted using a multimeter, provided the test current is safe for the integrated circuits in that case. Polarities of components and references as well as the thickness of the PCB and silkscreen where also checked during this visual inspection. 5.1.1.2. Voltages measuring check The next step is to power the impedance check board following the connection specified in Figure 92 and keeping all jumpers open. The stability and value of all the ICs is checked with the multimeter to ensure they are at the required 3V. Table 30 specifies the pins to check in each IC: Table 30. Pins to check the power supply of the impedance check PCB IC. Integrated circuit Pins to check the supply U1 13, 14, 15 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 95 Once the register addresses and desired values are determined, the code is written and integrated into Enobio® firmware to perform this configuration. The existing functions within the Enobio® code are analyzed to identify which could be used to rewrite the registers. Another important consideration is where the new code should be integrated. Below is a description of the selected functions to use in the programed code and their roles within the Enobio®’s Firmware: >> eeg_read_data( uint8_t* eeg_data_local ) This function manages the EEG signal acquisition loop. Every 2 ms, it enables SPI communication with the ADS1298 to request the frame containing the digitalized EEG signal sample from all channels. For more details on the frame structure and how it is constructed, refer to Section 2.1.3.7. >> eeg_write_config( uint8_t start_addr, uint8_t num_regs ) Compose and send an SPI message to update the internal registers of the ADS1298. The code to modify the register configuration using the eeg_write_config() function has been integrated into the EEG_read_data() function, which handles EEG signal acquisition. Since the loop repeats every 2 ms and the impedance measurement needs to be performed once per minute, an if statement with a counter is implemented. When the counter reaches 30000, it triggers the reconfiguration of the registers as shown in Eq. 23: 0.002·30000=60 𝑠 Eq. 23 As the impedance measurement lasts for 2 ms, when the counter reaches 30000+1, the registers are restored to their original configuration, allowing regular EEG signal acquisition to resume. The complete code can be found in Appendix C.3. 5.3. Testing results and discussion This section presents all the results obtained by following the validation plan, along with a discussion of the findings. To provide a clearer understanding of the experimental setup, a Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 96 photograph of the physical configuration used and described in the testing methods and procedures, is also included. 5.3.1. Integrity of the impedance check board After conducting a visual inspection of the manufactured PCB, no fabrication or soldering errors are found on the visible layers: top and bottom layers. Next, the board is powered on, and the supply voltage is measured across all integrated circuits. The measured values are summarized in Table 31: Table 31. Power supply tension measured on the impedance check PCB ICs. Measured point Expected tension [V] Experimental tension [V] U1: pin 13 3.0 3.036 U1: pin 14 3.0 3.036 U1: pin 15 3.0 3.036 U2: pin 14 3.0 3.036 U3: pin 8 3.0 3.036 U4: pin 8 3.0 3.035 U5: pin 8 3.0 3.035 U6: pin 8 3.0 3.035 U7: pin 8 3.0 3.036 Finally, the reference voltage of 1.5 V is also checked. The results are presented in Table 32. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 97 Table 32. Reference tension measured on simulated ADC1298 circuitry. Measured point Expected tension [V] Experimental Tension [V] U7: pin 3 1.50 1.554 U7: pin 5 1.50 1.554 Based on the results presented in Table 31 and Table 32, it can be concluded that the outcome of this initial validation test meet expectations, indicating that the board is free from any apparent manufacturing defects. The slight difference between the expected and measured values is attributed to the power supply used for this test, as it provides only one decimal of precision. 5.3.2. Validation of the operating principle The results of the operating principle validation are presented in Appendix C.4.1 shows the setup used for the dynamic test, which is identical to the setup for the static test, except for the replacement of the oscilloscope with a handheld multimeter. 5.3.2.1. Static test Table 33 and Table 34 present the results of the static tests estimating the contact impedance for channels 1 and 2, respectively. Table 33. Results of the static test for channel 1. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) |𝜺𝒂𝒃𝒔 (𝛀)| 259.1 270.5 4.38% 11.4 259.1 278.9 7.63% 19.8 246.2 275.0 11.70% 28.8 8230 8319.2 1.08% 89.2 8230 8301.6 0.87% 71.6 16450 16607.6 0.96% 157.6 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 98 Table 34. Results of the static test for channel 2. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) |𝜺𝒂𝒃𝒔 (𝛀)| 259.1 278.86 7.63% 19.8 259.1 287.3 10.88% 28.2 247.4 275.0 11.16% 27.6 8230 8671.0 5.36% 441.0 8230 8301.6 0.87% 71.6 16450 16607.6 0.96% 157.6 An initial observation reveals that the errors observed in this test are higher than those seen in the simulations. However, this error may not be due to the impedance check circuit itself, but because of the precision limitations of the measurement instrument, which in this case was the TENMA 72-7780 handheld multimeter. This model was selected as it offered the highest resolution available in the laboratory where the tests were conducted. To assess the potential contribution of the instrument’s precision to the impedance estimation error, a study is performed. According to the manufacturer’s manual, the multimeter has the following specifications for DC voltage measurements: Table 35. Technical specifications of TENMA 72-7780 multimeter. Range Resolution Accuracy 60.00 mV 0.01 mV ±(0.5% + 2) 600.0 mV 0.1 mV 6.000 V 0.001 V ±(0.7% + 3) 60.00 V 0.01 V 600.0 V 0.1 V 600 V 1 V Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 99 To estimate the impedance value, three voltages were measured; Veeg, Vo and Vcms. Given the magnitude of these values the 6V range was used for estimating Vo and Vcms, while the 60mV range was used for the Veeg. The expression that determines the error in the voltage measurements is given by Eq. 24 and Eq. 25: 𝜀𝑉𝑜=𝜀𝑉𝑐𝑚𝑠=±(0.7 100·𝑅𝑒𝑎𝑑𝑖𝑛𝑔+3·0.001 ) Eq. 24 𝜀𝑉𝑒𝑒𝑔=±(0.5 100·𝑅𝑒𝑎𝑑𝑖𝑛𝑔+2·10−5) Eq. 25 Since the impedance estimation depends on these three values, as shown in Eq. 19, the error introduced by the multimeter can be calculated propagating the error. Eq. 26 shows the expression: 𝜀𝑍=√(𝜕𝑍 𝜕𝑉𝑜·𝜀𝑉𝑜)2+( 𝜕𝑍 𝜕𝑉𝑒𝑒𝑔·𝜀𝑉𝑒𝑒𝑔)2+( 𝜕𝑍 𝜕𝑉𝑐𝑚𝑠·𝜀𝑉𝑐𝑚𝑠)2 𝜀𝑍=√(𝑅3(𝑅2+𝑅4)(𝑅2·𝑉𝑐𝑚𝑠+(𝑅2+𝑅4)·𝑉𝑒𝑒𝑔) ((𝑅2+𝑅4)·𝑉𝑜+𝑅2·𝑉𝑐𝑚𝑠)2·𝜀𝑉𝑜)2+ + (− 𝑅3 −𝑅4·𝑉𝑐𝑚𝑠 𝑅2+𝑅4+𝑉𝑐𝑚𝑠+𝑉𝑜·𝜀𝑉𝑒𝑒𝑔)2+(𝑅2·𝑅3(𝑅2+𝑅4)(𝑉𝑒𝑒𝑔−𝑉𝑜) (𝑅2·𝑉𝑐𝑚𝑠+(𝑅2+𝑅4)𝑉𝑜)2·𝜀𝑉𝑐𝑚𝑠)2                                                                                                               Eq. 26 Table 36 and Table 37 show, for each impedance value estimated, the absolute error done in the estimation, and the maximum error that could result from the multimeter’s measurements: Table 36. Maximum error that can potentially come from the multimeter during the contact impedance estimation for Channel 1. Estimated resistance (Ω) |𝜺𝒂𝒃𝒔 (𝛀)|𝒁 𝒆𝒔𝒕𝒊𝒎𝒂𝒕𝒊𝒐𝒏 𝜺𝑻𝑬𝑵𝑴𝑨 𝟕𝟐−𝟕𝟕𝟖𝟎 270.5 11.4 ± 118.1 278.9 19.8 ± 118.1 275.0 28.8 ± 118.1 8.32E+03 89.2 ± 193.2 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 100 8.30E+03 71.6 ± 193.0 1.66E+04 157.6 ± 268.6 Table 37. Maximum error that can potentially come from the multimeter during the contact impedance estimation for Channel 2. Estimated resistance (Ω) |𝜺𝒂𝒃𝒔 (𝛀)|𝒁 𝒆𝒔𝒕𝒊𝒎𝒂𝒕𝒊𝒐𝒏 𝜺𝑻𝑬𝑵𝑴𝑨 𝟕𝟐−𝟕𝟕𝟖𝟎 278.86 19.8 ± 118.1 287.3 28.2 ± 118.2 275.0 27.6 ± 118.1 8.67E+03 441.0 ± 196.4 8.30E+03 71.6 ± 193.0 1.66E+04 157.6 ± 268.6 From the tables, it is clear that the maximum error introduced by the multimeter is consistently larger than the absolute error obtained when estimating the impedance. Therefore, it is difficult to determine whether the error in impedance estimation is solely due to the measurement instrument or a combination of the multimeter and the impedance check circuit (with the latter being more likely). In this context, repeating the tests with a higher precision multimeter could provide more accurate results. However, the final test, which fully integrates the Enobio and impedance check circuitry, will ultimately determine whether the precision is sufficient, as it simulates the real operating conditions of the impedance checker. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 101 5.3.2.2. Dynamic test As mentioned in Section 5.1.2.2, in this test, the values of the Veeg and Vo signals are extracted under dynamic conditions, with each being acquired in only 10 ms. Figure 68 shows a simulation of the signal expected to be acquired with the oscilloscope, while Figure 72 the signal obtained during the dynamic test. Comparing both, it can be seen that the experimental signa matches the simulated one, al least in terms of morphology. Figure 72. Signal acquired with the oscilloscope during the dynamic test. Z = 2.18 kΩ. As the objective of this tests was to evaluate the influence of the switch transients in the estimated contact impedance accuracy, its duration has been measured. The exact value of this transient depends on the value of the contact impedance, being longer as the impedance increases. Figure 73 shows the transient obtained when using a 2.18 kΩ, which is a central value of the impedance. Cursors indicate that the value of the switch transient is 192 μV, which is higher than expected considering the simulations results, which showed a value in the order of ns. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 102 However, the transient increase is not big enough to be critical on the impedance estimation accuracy since the value of the signals are obtained using the mean value during the 10 ms. Figure 73. Transient on the impedance check signal produced by the switches. It is also interesting to observe the output signals of both channels of the impedance checker when the impedances of each channel are different, as it provides a quick demonstration of the system’s functionality, showing changes in the amplitude of the Vo signal (which is EEG offset) depending on the contact impedance. Figure 74 shows a representation where the resistance of channel 1 is 4.69 kΩ, and channel 2 is 2.18 kΩ. Figure 74. Signals of CH1 and CH2 acquired simultaneously during the dynamic test. ZCH1 = 4.69kΩ, ZCH2 = 2.18 kΩ. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 103 To estimate the impedance value, not only Veeg and Vo values must be obtained, but also Vcms value. The Vcms value is also decided to be extracted using the oscilloscope and not the handheld multimeter to maintain a similar measurement precision across all signals. In this contact, the value of Veeg and Vo could be directly obtained using cursors on the analogous signals of Figure 72. However, the precision would be poor, as the oscilloscope’s resolution at this scale is too low. For this reason, attenuation probes set to x10 has been used to extract the values of the higher amplitude signals: Vcms and Vo, allowing resolutions on the range of μV/div. For the Veeg signal, the probe has been kept to x1, as its magnitude is already in the μV range, allowing acquisition with sufficient resolution. Figure 75, Figure 76 and Figure 77 provide an example of how the three signals for channel 1 were acquired when the impedance simulated was 243 Ω. The respective signals for all other impedance estimations done throughout this test can be found in Appendix C.4.1. Figure 75. CH1 Veeg signal obtained during dynamic test 1. ZCH1 = 243 Ω. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 104 Figure 76. CH1 Vo signal obtained during dynamic test 1. ZCH1 = 243 Ω. Figure 77. CH1 Vo signal obtained during dynamic test 1. ZCH1 = 243 Ω. Table 38 summarizes the results of the contact impedance estimations for a range of somewhat random resistance values within the range of interest: Table 38. Results of the dynamic test. Test Channel Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) |𝜺𝒂𝒃𝒔 (𝛀)| TEST 1 CH1 243 221 9.19% 22.32 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 111 5.3.3.2. Impedance estimation results Table 41 through Table 44 present the results of estimating the contact impedance for each of the four impedance signals acquired during the test for each impedance value (see Figure 77). Repeating the calculation for each of the four signals has allowed for an evaluation of the method's repeatability, similar to the approach used in Section 4.1.2.3.3. Figure 82 provides an example of how these values were obtained. Figure 82. Example of how Veeg and Vo values were obtained during the "Validation of the compatibility between Enobio® and impedance check circuitries" test. Table 41. Results when estimating the contact impedance with the signal acquired with impedance check-Enobio® integrated system. Contact impedance signal 1. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) |𝜺𝒂𝒃𝒔 (𝛀)| 101.5 -6 106.35% 108 245.8 119 51.77% 127 490 505 3.00% 15 991 855 13.74% 136 2153 2000 7.09% 153 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 112 4703 4510 4.11% 193 9970 9726 2.45% 244 21530 21187 1.59% 343 43270 42498 1.78% 772 98500 97432 1.08% 1068 Table 42. Results when estimating the contact impedance with the signal acquired with impedance check-Enobio® integrated system. Contact impedance signal 2. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) |𝜺𝒂𝒃𝒔 (𝛀)| 101.5 -8 108.22% 110 245.8 117 52.52% 129 490 514 4.83% 24 991 849 14.33% 142 2153 2002 7.03% 151 4703 4508 4.15% 195 9970 9669 3.02% 301 21530 21188 1.59% 342 43270 42519 1.73% 751 98500 97411 1.11% 1089 Table 43. Results when estimating the contact impedance with the signal acquired with impedance check-Enobio® integrated system. Contact impedance signal 3. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) |𝜺𝒂𝒃𝒔 (𝛀)| 101.5 -6 105.68% 107 245.8 120 51.20% 126 490 524 6.93% 34 991 854 13.79% 137 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 113 2153 2004 6.91% 149 4703 4509 4.12% 194 9970 9746 2.25% 224 21530 21183 1.61% 347 43270 42524 1.72% 746 98500 97379 1.14% 1121 Table 44. Results when estimating the contact impedance with the signal acquired with impedance check-Enobio® integrated system. Contact impedance signal 4. Theorical resistance (Ω) Estimated resistance (Ω) 𝜺𝒓 (%) |𝜺𝒂𝒃𝒔 (𝛀)| 101.5 -6 105.57% 107 245.8 119 51.60% 127 490 550 12.24% 60 991 856 13.64% 135 2153 2003 6.97% 150 4703 4509 4.12% 194 9970 9725 2.46% 245 21530 21186 1.60% 344 43270 41556 3.96% 1714 98500 97402 1.11% 1098 The results demonstrate that the impedance check circuitry is capable of accurately estimating contact impedance when integrated with Enobio®. The relative error is very similar to the target set in Section 2.3, and the absolute error remains controlled, only becoming significant at high impedance values. Even then, the relative error remains below 10%, which is within acceptable limits. It is believed that integrating the impedance check circuitry directly into the Enobio® device would further improve these results, as the current setup is not particularly robust. For example, Figure 83 shows how the signal is altered by simply touching the wire connecting the impedance check output to the Enobio® input. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 114 Figure 83. Effect when touching a wire of the impedance check-Enobio® integrated system. Regarding repeatability, the standard deviation is once again used to quantify it. Table 45 presents the results: Table 45. Impedance check-Enobio® integrated system repeatability. Theorical resistance (Ω) σ (Ω) 101.5 1.08 245.8 1.18 490 16.96 991 2.67 2153 1.41 4703 0.65 9970 28.62 21530 1.95 43270 42.52 98500 18.96 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 115 Although repeatability is lower compared to the simulations, comparing the standard deviation to the estimated contact impedance value shows that it remains satisfactory. This is especially true considering that, as seen in Figure 82, the acquired signal is highly sensitive. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 116 6. Environmental impact analysis The environmental impact of this project can be attributed to two main sources: 1. Laptop electricity consumption: The laptop was used extensively for designing the impedance check circuit and PCB, conducting research, performing validation, and writing this thesis. As such, it was running nearly 100% of the time dedicated to the project. 2. PCB manufacturing and hardware components. 6.1. Laptop electrical consumption The total time dedicated to this thesis is estimated at 1,617 hours. As mentioned, the laptop was used for nearly 100% of this time. The laptop model is a Dell Vostro 15 3530, with the CPU being the most energy-consuming component. Given that much of the work involved energy-intensive software, the laptop’s average power consumption is estimated at 55 W [70]. Therefore, the total energy consumption is calculated as shown in Eq. 27: Total energy consumption= 55 W · 1617 hours ≈ 89 kWh Eq. 27 According to Spain's Comisión Nacional de los Mercados y la Competencia (CNMC), the production of each kWh in Spain generates 260 g de CO2 [70]. Thus, the total CO₂ emissions from laptop use are calculated as shown in Eq. 28: Total energy consumption= 260𝑔 𝐶𝑂2𝑒𝑞 𝑘𝑊ℎ·89 𝑘𝑊ℎ=23.140 𝑘𝑔𝐶𝑂2𝑒𝑞 Eq. 28 6.2. PCB manufacturing and hardware components Both the PCB and the hardware components used in this project comply with the RoHS directive (Restriction of Hazardous Substances), which aims to protect human health and the environment by limiting the use of certain hazardous substances in electrical and electronic equipment [71], such as restricting the use of lead in soldering. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 117 7. Economic analysis In this section, the project cost to this point has been accounted for. This is not intended to serve as a budget estimate for the total cost of completing the design. The economic cost of the project can be broken into three main categories: 1. The cost of software development licenses. 2. The cost of manufacturing the PCB, including the purchase of the components. 3. The cost of labor. 7.1. Development software licenses As mentioned in Section 1.4.1, various software tools were used during the development of this project, with Altium being the only one requiring a paid license. The cost of the Altium license is 370€ per person per month. Since Altium was used for approximately 4 months, the total cost amounts to 1,480€. 7.2. PCB manufacturing For the PCB manufacturing cost, both the component costs and the PCB fabrication costs must be considered. The chosen manufacturer for the PCB was PCB Way, which provided a detailed estimate for the overall cost of the entire process. It is important to note that, due to the category of the PCB, the manufacturer required a minimum order of 5 boards. This was deemed appropriate, as unexpected issues or modifications may arise during the validation process. Out of these 5 boards, only 2 were requested to be fully assembled in order to have 2 complete prototypes. With this in mind, Table 46 outlines the cost of manufacturing the PCB: Table 46. PCB manufacturing cost. Item Quantity Price (€) Total (€) PCB production 5 31.39 156.96 Components 2 95.71 191.42 PCB assembly 2 13.42 26.85 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 118 TOTAL 375.23 € For more information of the components cost, see Appendix B.2, there the unitary price of tach PCB component is specified. 7.3. Labor The cost of an UPC (Universitat Politècnica de Catalunya) engineering intern is 8€/hour. The total number of billable hours during regular working hours amounts to 700. Therefore, the total labor cost is 5,600€. It is important to note that 700 is not the total number of hours dedicated to the project, but only the billable ones as the real total number of hours dedicated is approximately 1,617. 7.4. Total cost Considering the costs already mentioned, the total project cost is shown in Table 47. It is important to note that IVA has been included in all the costs. Table 47. Total cost of the project. Type of cost Cost (€) Software licenses 1,480 PCB manufacturing 375.23 Labor 5,600 TOTAL 7,455.23 € Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 119 8. Conclusions This section aims to assess which specific objectives set at the beginning of the project have been met and which have not. It also evaluates the system’s main limitations and proposes future work to complete the project, much of which has already been developed in this thesis. Referring back to Section 1.2, the objectives for the circuitry developed in this project were summarized in six points: 1. Real-time measurement. 2. Compatible with simultaneous EEG acquisition. 3. Minimal modifications to the existing Enobio® circuitry. 4. Precision in impedance estimation of 10%. 5. Implement the impedance check design in a PCB. 6. Validate the manufactured PCB. After simulations and physical validation of the PCB, it can be confirmed that all these objectives have been satisfactorily achieved. However, there are some nuances regarding objectives 1, 2, and 4. Considering objective 1, the circuitry is considered real-time because the impedance check signal, which enables contact impedance estimation, is extracted just 36 ms after being requested. However, at this stage of the project, post-processing is required to obtain the impedance value. As mentioned in Future Work (Section 8.1), real-time results could be achieved by adding code to the NIC software to calculate and display the value directly on the screen. Regarding objective 2, while simultaneous acquisition of EEG and impedance check signals is technically incompatible, the duration of the impedance check signal (36 ms) and its measurement frequency (once every 10 minutes) result in such minimal EEG signal loss that it can be considered acceptable. The goal was primarily to ensure no significant loss of EEG information. Finally for objective 4, the impedance estimation error exceeded 10% for low impedance values. However, it is believed that integrating the impedance check circuitry directly into the Enobio® device could help resolve this issue. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 120 8.1. Future work Having experimentally validated that the designed circuit meets the design specifications, including its critical compatibility with the existing Enobio® circuitry, the next step is to integrate this design into the commercial device. • Hardware integration: The impedance check circuit should be incorporated into the current Enobio® PCB, followed by experimental tests to evaluate its performance similarly to the process described in Section 5. • Software integration: Enobio® is not just a standalone device but includes the additional technologies that enable its operation and interaction with the user. The impedance checker functionality should be added to the NIC software, allowing users to view realtime impedance values as they are estimated. It is recommended that the sample extraction and calculations be handled directly by the software application, freeing the microcontroller from this task. Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 127 [61] ‘What is the Electrical Return Path in a PCB? | PCB Design Blog | Altium’. Accessed: Sep. 06, 2024. [Online]. Available: https://resources.altium.com/p/what-return-current-path- pcb [62] ‘Lab Circuits - Información Técnica - Construcciones multicapa’. Accessed: Sep. 07, 2024. [Online]. Available: https://www.lab-circuits.com/es/construccionmulticapa#tablePrettyPhoto/0/ [63] ‘Lab Circuits - Productos - Parámetros de fabricación multicapa’. Accessed: Sep. 08, 2024. [Online]. Available: https://www.lab-circuits.com/es/fabricacionmulticapa#tablePrettyPhoto/29/ [64] ‘Copper Pour and Via Stitching: Do You Need Them in a PCB Layout? | Blog | Altium Designer’. Accessed: Sep. 08, 2024. [Online]. Available: https://resources.altium.com/p/copper-pour-and-stitching-do-you-need-them-pcb- layout [65] Barry Olney, ‘Ground Pours - To pour or not to pour?’, In-Circuit Design Pty Ltd, 2010. [66] I. Biomédica and A. G. Cazorla, ‘“VALIDACIÓN Y MEJORA DE UN MÉTODO BASADO EN IMPEDANCIA PARA LA MEDICIÓN DE LA PERFUSIÓN CEREBRAL” TFG presentado para optar al título de GRADO en’. [67] ‘Hoja de datos de ADS1298, información de producto y soporte | TI.com’, p.65, Accessed: Sep. 15, 2024. [Online]. Available: https://www.ti.com/product/es-mx/ADS1298 [68] ‘Hoja de datos de ADS1298, información de producto y soporte | TI.com’, p.71, Accessed: Sep. 15, 2024. [Online]. Available: https://www.ti.com/product/es-mx/ADS1298 [69] ‘Hoja de datos de ADS1298, información de producto y soporte | TI.com’, p.79, Accessed: Sep. 15, 2024. [Online]. Available: https://www.ti.com/product/es-mx/ADS1298 [70] ‘Factor de emisión de la energía eléctrica: el mix eléctrico. Cambio climático’. Accessed: Sep. 22, 2024. [Online]. Available: https://canviclimatic.gencat.cat/es/actua/factors_demissio_associats_a_lenergia/ [71] ‘BOE.es - DOUE-L-2011-81307 Directiva 2011/65/UE del Parlamento Europeo y del Consejo, de 8 de junio de 2011, sobre restricciones a la utilización de determinadas sustancias peligrosas en aparatos eléctricos y electrónicos.’ Accessed: Sep. 22, 2024. [Online]. Available: https://www.boe.es/buscar/doc.php?id=DOUE-L-2011-81307 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 128 Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 129 Appendix A: Impedance checker simulation circuits A.1. Impedance checker single channel simulation circuit Vhc 0.223 V7 15 V8 -15 PULSE(0 3 0 1u 1u 10.001 10.002) V9V12 2 V13 wavefile=EEG_4.wav R10 5000k R11 5k R12 5000k R13 5k V14 wavefile=EEG_3.wav SD SDCOM U9 LTC2058 SD SDCOM U3 LTC2058 PULSE(0 3 10.001 1u 1u 0.001 10.002) V2 R1 11k Z 100 R_IN1 10k R_IN2 10k R_IN3 10k R_IN4 10k SD SDCOM U11 LTC2058 SA SB D IN Vdd GND EN Vss U7 ADG786 SA SB D IN Vdd GND EN Vss U8 ADG786 R3 500k V5 3 U2 ADA4528-1 R4 481k U14 ADA4528-1 U15 ADA4528-1 R25 220k R26 220k U16 ADA4528-1 R2 10k V10 1.5 R9 1k R21 1k CMS 0.223 DRL 0.223 U4 ADA4528-1 PULSE(0 3 0 1u 1u 10.000 10.002) V1 SD IN GND Vdd U1 ADG782 R5 50k R6 50k R7 20k Vdd Vss VIN IN VddVss VddVss +EEG -EEG -VIN +EEG Vcms_eeg VddVss Vcms Vcms_eeg VIN -VIN V_EN V_EN V_EN ADC+ V_EN V_EN ADC- V_EN Vcms V_EN Vcms V_DRL Vcms V_EN V_PGA V_EN V_PGA .tran 0 20 0 0.000025 DIGITAL INPUT SIGNALS SIMULATION MODELS - EEG SIGNAL SOURCES + VOLTAGE SOURCES CMS ELECTRODE SIMULATED INPUT SIGNAL IMPEDANCE CHECKER POWER ELECTRODE MODEL ADS1298 VINP VINN RLDOUT RLDREF RLDINV MUX - 000 COMMON MODE VOLTAGE PGA RLD AMPLIFIER --- C:\Users\anna.farres\Documents\EEG system with real-time impedance checker\Phase 2 - Design of the circuit and simulations\3. Passive amplification circuit\4. DC component differential amplification single supply\amplification_circuit_DC_measurament.asc --- Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 130 A.2. Impedance checker 8-channel simulation circuit Vhc_CH1 0.223 V7 15 V8 -15 PULSE(0 3 0 1u 1u 0.001 0 .002) V9V12 2 V13 wavefile=EEG_1.wav R10 500 0k R11 5k R12 500 0k R13 5k V14 wavefile=EEG_2.wav SD SDCOM U9 LTC 2058 SD SDCOM U3 LTC 2058 PULSE(0 3 0.001 1u 1u 0.00 1 0.00 2) V2 R1 11k Z_CH1 100 R_IN1 10k R_IN2 10k R_IN3 10k R_IN4 10k SD SDCOM U11 LTC 2058 SA SB D IN Vdd GND EN Vss U7 AD G786 SA SB D IN Vdd GND EN Vss U8 AD G786 R3 500 k V5 3 U2 AD A45 28-1 R4 481 k U14 AD A45 28-1 U15 AD A45 28-1 R19 50k R24 50k R25 220 k R26 220 k R2 10k CMS 0.223 DRL 0.223 U4 AD A45 28-1 SD IN GND Vdd U23 ADG782 R49 20k Vhc_CH2 0.223 R5 11k Z_CH2 200 R_IN5 10k R_IN6 10k R_IN7 10k R_IN8 10k SD SDCOM U1 LTC 2058 SA SB D IN Vdd GND EN Vss U5 AD G786 SA SB D IN Vdd GND EN Vss U6 AD G786 R6 500 k U10 AD A45 28-1 R7 481 k U12 AD A45 28-1 U13 AD A45 28-1 R8 50k R14 50k R15 220 k R16 220 k R17 10k U17 AD A45 28-1 SD IN GND Vdd U18 ADG782 R18 20k Vhc_CH3 0.223 R20 11k Z_CH3 500 R_IN9 10k R_IN10 10k R_IN11 10k R_IN12 10k SD SDCOM U19 LTC 2058 SA SB D IN Vdd GND EN Vss U20 AD G786 SA SB D IN Vdd GND EN Vss U21 AD G786 R22 500 k U22 AD A45 28-1 R23 481 k U24 AD A45 28-1 U25 AD A45 28-1 R27 50k R28 50k R29 220 k R30 220 k R31 10k U26 AD A45 28-1 SD IN GND Vdd U27 ADG782 R32 20k Vhc_CH4 0.223 R33 11k Z_CH4 1k R_IN13 10k R_IN14 10k R_IN15 10k R_IN16 10k SD SDCOM U28 LTC 2058 SA SB D IN Vdd GND EN Vss U29 AD G786 SA SB D IN Vdd GND EN Vss U30 AD G786 R34 500 k U31 AD A45 28-1 R35 481 k U32 AD A45 28-1 U33 AD A45 28-1 R36 50k R37 50k R38 220 k R39 220 k R40 10k U34 AD A45 28-1 SD IN GND Vdd U35 ADG782 R41 20k Vhc_CH5 0.223 R42 11k Z_CH5 2k R_IN17 10k R_IN18 10k R_IN19 10k R_IN20 10k SD SDCOM U36 LTC 2058 SA SB D IN Vdd GND EN Vss U37 AD G786 SA SB D IN Vdd GND EN Vss U38 AD G786 R43 500 k U39 AD A45 28-1 R44 481 k U40 AD A45 28-1 U41 AD A45 28-1 R45 50k R46 50k R47 220 k R48 220 k R50 10k U42 AD A45 28-1 SD IN GND Vdd U43 ADG782 R51 20k Vhc_CH6 0.223 R52 11k Z_CH6 5k R_IN21 10k R_IN22 10k R_IN23 10k R_IN24 10k SD SDCOM U44 LTC 2058 SA SB D IN Vdd GND EN Vss U45 AD G786 SA SB D IN Vdd GND EN Vss U46 AD G786 R53 500 k U47 AD A45 28-1 R54 481 k U48 AD A45 28-1 U49 AD A45 28-1 R55 50k R56 50k R57 220 k R58 220 k R59 10k U50 AD A45 28-1 SD IN GND Vdd U51 ADG782 R60 20k Vhc_CH7 0.223 R61 11k Z_CH7 10k R_IN25 10k R_IN26 10k R_IN27 10k R_IN28 10k SD SDCOM U52 LTC 2058 SA SB D IN Vdd GND EN Vss U53 AD G786 SA SB D IN Vdd GND EN Vss U54 AD G786 R62 500 k U55 AD A45 28-1 R63 481 k U56 AD A45 28-1 U57 AD A45 28-1 R64 50k R65 50k R66 220 k R67 220 k R68 10k U58 AD A45 28-1 SD IN GND Vdd U59 ADG782 R69 20k Vhc_CH8 0.223 R70 11k Z_CH8 50k R_IN29 10k R_IN30 10k R_IN31 10k R_IN32 10k SD SDCOM U60 LTC 2058 SA SB D IN Vdd GND EN Vss U61 AD G786 SA SB D IN Vdd GND EN Vss U62 AD G786 R71 500 k U63 AD A45 28-1 R72 481 k U64 AD A45 28-1 U65 AD A45 28-1 R73 50k R74 50k R75 220 k R76 220 k R77 10k U66 AD A45 28-1 SD IN GND Vdd U67 ADG782 R78 20k U68 AD A45 28-1 V1 1.5 R79 1k R80 1k V3 wavefile=EEG_3.wav R9 500 0k R21 5k R81 500 0k R82 5k V4 wavefile=EEG_4.wav SD SDCOM U16 LTC 2058 SD SDCOM U69 LTC 2058 V6 wavefile=EEG_5.wav R83 500 0k R84 5k R85 500 0k R86 5k V10 wavefile=EEG_6.wav SD SDCOM U70 LTC 2058 SD SDCOM U71 LTC 2058 V11 wavefile=EEG_7.wav R87 500 0k R88 5k R89 500 0k R90 5k V15 wavefile=EEG_8.wav SD SDCOM U72 LTC 2058 SD SDCOM U73 LTC 2058 Vdd Vss VIN IN VddVss VddVss EEG_CH1 EEG_CH2 -VIN Vcms_eeg_CH1 VddVss Vcms Vcms_eeg_CH1 VIN -VIN V_EN V_EN V_EN AD C_CH1+ V_EN V_EN AD C_CH1- V_EN Vcms Vcms V_EN V_EN Vo_CH1 Vcms_eeg_CH2 VddVss Vcms VIN -VIN V_EN V_EN AD C_CH2+ V_EN V_EN AD C_CH2- V_EN Vcms V_EN V_EN Vo_CH2 Vcms_eeg_CH3 VddVss Vcms VIN -VIN V_EN V_EN AD C_CH3+ V_EN V_EN AD C_CH3- V_EN Vcms V_EN V_EN Vo_CH3 Vcms_eeg_CH4 VddVss Vcms VIN -VIN V_EN V_EN AD C_CH4+ V_EN V_EN AD C_CH4- V_EN Vcms V_EN V_EN Vo_CH4 Vcms_eeg_CH5 VddVss Vcms VIN -VIN V_EN V_EN AD C_CH5+ V_EN V_EN AD C_CH5- V_EN Vcms V_EN V_EN Vo_CH5 Vcms_eeg_CH6 VddVss Vcms VIN -VIN V_EN V_EN AD C_CH6+ V_EN V_EN AD C_CH6- V_EN Vcms V_EN V_EN Vo_CH6 Vcms_eeg_CH7 VddVss Vcms VIN -VIN V_EN V_EN AD C_CH7+ V_EN V_EN AD C_CH7- V_EN Vcms V_EN V_EN Vo_CH7 Vcms_eeg_CH8 VddVss Vcms VIN -VIN V_EN V_EN AD C_CH8+ V_EN V_EN AD C_CH8- V_EN Vcms V_EN V_EN Vo_CH8 V_EN Vcms V_DRL Vcms_eeg_CH2 Vcms_eeg_CH3 Vcms_eeg_CH4 Vcms_eeg_CH5 Vcms_eeg_CH6 Vcms_eeg_CH7 Vcms_eeg_CH8 VddVss VddVss EEG_CH3 EEG_CH4 VddVss VddVss EEG_CH5 EEG_CH6 VddVss VddVss EEG_CH7 EEG_CH8 EEG_CH8 EEG_CH7 EEG_CH6 EEG_CH5 EEG_CH4 EEG_CH3 EEG_CH2 EEG_CH1 VIN_CH1 VIN_CH2 VIN_CH3 VIN_CH4 VIN_CH5VIN_CH6VIN_CH7 VIN_CH8 .tran 0 0 .002 0 0.0000 25 DIGITAL INPUT SIGNALS SIMULATION MODELS - EEG SIGNAL SOURCES + VOLTAGE SOURCES CMS ELECTRODE SIMULATED INPUT SIGNAL IMPEDANCE CHECKER POWER ELECTRODE MODEL ADS1298 VINP1 VINN1 COMMON MODE VOLTAGE SIMULATED INPUT SIGNAL ELECTRODE MODEL VINP2 VINN2 SIMULATED INPUT SIGNAL ELECTRODE MODEL VINP3 VINN3 SIMULATED INPUT SIGNAL ELECTRODE MODEL VINP4 VINN4 SIMULATED INPUT SIGNAL ELECTRODE MODEL VINP5 VINN5 RLD A MPLIFIER SIMULATED INPUT SIGNAL ELECTRODE MODEL VINP6 VINN6 SIMULATED INPUT SIGNAL ELECTRODE MODEL VINP7 VINN7 SIMULATED INPUT SIGNAL ELECTRODE MODEL VINP8 VINN8 RLDOUT RLDREF RLDINV --- C:\Users\anna.farres\Documents\EEG system with real-time impedance checker\Phase 2 - Design of the circuit and simulations\3. Passive amplification circuit\4. DC component differential amplification single supply\amp_mult_chan.asc --- Development and validation of a passive real-time impedance checker compatible with simultaneous EEG acquisition 131 Appendix B: Impedance check PCB design B.1. PCB schematics 1 1 2 2 3 3 4 4 D D C C B B A A 1 NEUROELECTRICS S.L.U. Avda. Tibidabo 47B 08035 Barcelona Spain 5 01.01.02 05/09/2024 Product: Size: Date: Revision: Sheet of A4 Approved by: Drawn by: Document: Anna Farrés Francesc PastorTopSheet.SchDoc Impedance checker Variant: [No Variations] CH1 CH1_IN CH2_IN CH2 CH1_EN CH2_EN CH1_IM CH2_IM CH1_ADS CH2_ADS CH1_ADS_SEL CH2_ADS_SEL Designator Input_circuit.SchDoc CH1 CH2 CH1_IM CH2_IM CH2_IM_OUT_S CH1_IM_OUT_S CH2_IM_IN_S CH1_IM_IN_S CMS Designator Impedance_measurament.SchDoc CH1_IN CH2_IN CMS CH1_EN CH2_EN CH1_IM_IN_S CH2_IM_IN_S CH1_IM_OUT_S CH2_IM_OUT_S CH1_IM CH2_IM CH2_ADS_SEL CH1_ADS_SEL CH2_ADC- CH2_ADC+ CH1_ADC- CH1_ADC+ DRL Designator Connectors.SchDoc CH1_ADS CH2_ADS CMS CH1_ADC+ CH1_ADC- CH2_ADC+ CH2_ADC- DRL Designator ADS1298.SchDoc 1 1 2 2 3 3 4 4 D D C C B B A A 2 NEUROELECTRICS S.L.U. Avda. Tibidabo 47B 08035 Barcelona Spain 5 01.01.02 05/09/2024 Product: Size: Date: Revision: Sheet of A4 Approved by: Drawn by: Document: Anna Farrés Francesc PastorInput_circuit.SchDoc Impedance checker Variant: [No Variations] 1 R3 1 R4 1 R1 1 R2 CH1_IN 3 1 220k PCH1_1 31 2 20k PCH1_2 CH1_I+ CH1_I- CH1_Rpot 1 R7 1 R8 1 R5 1 R6 CH2_IN 3 1 220k PCH2_1 31 2 20k PCH2_2 CH2_I+ CH2_I- CH2_Rpot CH1_Z CH2_Z CH1_EN CH2_EN CH1_Z CH2_Z CH1 CH2 GND GND D1 1 S1B 2 VSS 3 GND 4 S2B 5D2 6 S2A 7 IN2 8 IN3 9 NC 10 S3A 11 D3 12 S3B 13 VDD 14 S4B 15 D4 16 S4A 17 IN4 18 IN1 19 S1A 20 EP 21 U1 ADG788BCPZ-REEL7 CH1_IN_IC CH2_IN_IC 2 1 P1 2 1 P2 2 1 P4 2 1 P3 2 1 P6 2 1 P5 CH1_IM CH2_IM +3V_A 100nF C2 GND CH1_ADS CH2_ADS CH1_ADS_SEL CH2_ADS_SEL 2 1 CH1_ADS 2 1 CH2_ADS PIC201 PIC202 COC2 PICH10ADS01 PICH10ADS02 COCH10ADS PICH10I001 COCH10I0 PICH10I001 PICH10IN0IC01 COCH10IN0IC PICH10Rpot01 COCH10Rpot PICH20ADS01 PICH20ADS02 COCH20ADS PICH20I001 COCH20I0 PICH20I001 PICH20IN0IC01 COCH20IN0IC PICH20Rpot01 COCH20Rpot PIP101 PIP102 COP1 PIP201 PIP202 COP2 PIP301 PIP302 COP3 PIP401 PIP402 COP4 PIP501 PIP502 COP5 PIP601 PIP602 COP6 PIPCH10101 PIPCH10102 PIPCH10103 COPCH101 PIPCH10201 PIPCH10202 PIPCH10203 COPCH102 PIPCH20101 PIPCH20102 PIPCH20103 COPCH201 PIPCH20201 PIPCH20202 PIPCH20203 COPCH202 PIR101 PIR102 COR1 PIR201 PIR202 COR2 PIR301 PIR302 COR3 PIR401 PIR402 COR4 PIR501 PIR502 COR5 PIR601 PIR602 COR6 PIR701 PIR702 COR7 PIR801 PIR802 COR8 PIU101 PIU102 PIU103 PIU104 PIU105 PIU106 PIU107 PIU108 PIU109 PIU1010 PIU1011 PIU1012 PIU1013 PIU1014 PIU1015 PIU1016 PIU1017 PIU1018 PIU1019 PIU1020 PIU1021 COU1 POCH1 POCH10ADS POCH10ADS0SEL POCH10EN POCH10IM POCH10IN POCH2 POCH20ADS POCH20ADS0SEL POCH20EN POCH20IM POCH20IN 1 1 2 2 3 3 4 4 D D C C B B A A 3 NEUROELECTRICS S.L.U. Avda. Tibidabo 47B 08035 Barcelona Spain 5 01.01.02 05/09/2024 Product: Size: Date: Revision: Sheet of A4 Approved by: Drawn by: Document: Anna Farrés Francesc PastorImpedance_measurament.SchDoc Impedance checker Variant: [No Variations] CMS CH1_Buff_IN CH2_Buff_IN CH1_Buff_OUT CH2_Buff_OUT CH1_Amp_IN CH1_Amp_OUT CH2_Amp_OUT CH2_Amp_IN + - 3 21 U3A ADA4528-2ACPZ-R7 + - 5 67 U3B ADA4528-2ACPZ-R7 V- 4V+ 8 EPAD 9 U4C ADA4528-2ACPZ-R7 + - 3 21 U4A ADA4528-2ACPZ-R7 + - 5 67 U4B ADA4528-2ACPZ-R7 V- 4V+ 8 EPAD 9 U3C ADA4528-2ACPZ-R7 +3V_A +3V_A C0805C106J8RACAUTO D1 1 S1B 2 VSS 3 GND 4 S2B 5D2 6 S2A 7 IN2 8 IN3 9 NC 10 S3A 11 D3 12 S3B 13 VDD 14 S4B 15 D4 16 S4A 17 IN4 18 IN1 19 S1A 20 EP 21 U2 ADG788BCPZ-REEL7 CH1_Buff_IN CH1_Amp_IN CH2_Buff_IN CH2_Amp_IN CH1_IM_IN_S CH2_IM_IN_S +3V_A GND CH1 CH2 CH1_Buff_OUT CH1_Amp_OUT CH2_Buff_OUT CH2_Amp_OUT CH1_IM CH2_IM CH1_IM_OUT_S CH2_IM_OUT_S GND GND GND 10k R14 10k R15 10k R16 10k R17 11k R10 11k R11 11k R12 11k R13 11k R26 11k R27 11k R28 11k R29 499k R18 499k R19 499k R20 499k R21 499k R30 499k R31 499k R32 499k R33 481k R23 481k R22 481k R25 481k R24 GND GND GND 100nF C3 100nF C5 100nF C4 PIC301 PIC302 COC3 PIC401 PIC402 COC4 PIC501 PIC502 COC5 PIR1001 PIR1002 COR10 PIR1101 PIR1102 COR11 PIR1201 PIR1202 COR12 PIR1301 PIR1302 COR13 PIR1401 PIR1402 COR14 PIR1501 PIR1502 COR15 PIR1601 PIR1602 COR16 PIR1701 PIR1702 COR17 PIR1801 PIR1802 COR18 PIR1901 PIR1902 COR19 PIR2001 PIR2002 COR20 PIR2101 PIR2102 COR21 PIR2201 PIR2202 COR22 PIR2301 PIR2302 COR23 PIR2401 PIR2402 COR24 PIR2501 PIR2502 COR25 PIR2601 PIR2602 COR26 PIR2701 PIR2702 COR27 PIR2801 PIR2802 COR28 PIR2901 PIR2902 COR29 PIR3001 PIR3002 COR30 PIR3101 PIR3102 COR31 PIR3201 PIR3202 COR32 PIR3301 PIR3302 COR33 PIU201 PIU202 PIU203 PIU204 PIU205 PIU206 PIU207 PIU208 PIU209 PIU2010 PIU2011 PIU2012 PIU2013 PIU2014 PIU2015 PIU2016 PIU2017 PIU2018 PIU2019 PIU2020 PIU2021 COU2 PIU301 PIU302 PIU303 COU3A PIU305 PIU306 PIU307 COU3B PIU304 PIU308 PIU309 COU3C PIU401 PIU402 PIU403 COU4A PIU405 PIU406 PIU407 COU4B PIU404 PIU408 PIU409 COU4C POCH1 POCH10IM POCH10IM0IN0S POCH10IM0OUT0S POCH2 POCH20IM POCH20IM0IN0S POCH20IM0OUT0S POCMS