The prototype consists of a single board computer (Raspberry Pi), a microcontroller (ESP32) that can transfer data over Bluetooth, and an EVAL-ADAS1000SDZ Evaluation Board. Signals obtained with Raspberry Pi are displayed on the its original screen. The system is powered by a 2.4 A power bank (Figure 1).
2.1 Adjusting the EVAL-ADAS1000SDZ Evaluation Board for ECG and Thoracic Bioimpedance Measurement
ADAS1000, developed by Analog Devices, is a 5-channel ECG device that can also detect breathing and pulse . Since the ADAS1000 eval board contains two ADAS1000 chips (master and slave), it can measure 10-channel ECG . Slave device can be disabled depending on the user's request. ADAS1000's signal collection channels can be switched on or off depending on the user's request. It offers a variety of configuration options for the preferred application, where the input structure includes a differential amplifier.
ADAS1000 eval board keeps the lead 1, lead 2 and lead 3 data in the register addresses specified on the data sheet in its memory. Other ECG connections (aVR, aVL, aVF, V1 and V2) can be calculated by the user from the data in leads 1, 2 and 3 .
ADAS1000 measures thoracic electrical bioimpedance with respiratory detection function. With the ADAS1000 eval board, impedance can be performed with a bipolar or tetrapolar system. An external instrumentation amplifier and op-amp can be used with the ADAS1000 to further improve thoracic impedance measurement performance . The thoracic impedance measurement is located in one of the leads (lead I, lead II, or lead III) or in an external path through a pair of special pins (EXT_RESP_LA, EXT_RESP_RA, or EXT_RESP_LL).
It can be used as electrode input for respiration thanks to its switching circuit, which includes 5 ECG channels on ADAS1000. In this way, four-electrode measurement can be taken with ADAS1000 . Figure 2 shows the switching circuit and the EXTENDSW control register.
ADAS1000 uses 32 bit data format in its memory (for 2 and 16 kHz data rate). The data received within the frame of this data are placed according to the format given in Figure 3 and the addresses specified and read by reaching these addresses. Data that are not required can be removed from the frame .
The excitation current value for the impedance signal is given on the data sheet as 64 µApp, 32 µApp, 16 µApp or 8 µApp. The frequency of the current can be determined from the values given in the data sheet (from 46.5 kHz to 64 kHz) .
An external op-amp and instrumentation amplifier on the ADAS1000 eval board is used in the four-electrode system. Configurations are set by jumpers as specified in the user manual. The configuration is shown in Figure 4. The RESPCTL memory of the ADAS1000 eval board must be set as indicated in ADAS1000 eval board user guide .
In this configuration, RA and LA leads are used to inject current into the thorax area, and voltage variation is detected through EXT-RESP_RA and EXT-RESP_LA paths. The voltage change from the electrodes is sent to the receiver pins of the instrumentation amplifier, minimizing the common mode signals.
2.2 Architecture of the System
In this study, as mentioned before tetrapolar electrode configuration was used for TEB measurements. In order to correlate it with the TEB measurements taken, the ECG signal was taken over the ADAS 1000 eval board using a single lead. SPI communication has been performed between ADAS1000 eval board and ESP32. ECG data and thoracic impedance measurements at a frequency of 50 kHz and a current value of 64 µApp were taken in real time with the ADAS1000 eval board over ESP32 and sent to the Raspberry Pi via bluetooth. Thoracic impedance, ECG, Delta_Z and dZ / dt signals were created using the python software development program in the Raspberry Pi, and the signals were processed. For the graphical user interface (GUI) development Qt dersigner is used. Results are shown on raspberry pi original screen. The whole system is powered by a power supply that connects to the Raspberry Pi with a 2.4 A output.
During the measurement, 5 ends of 10 connected ECG cables and Ag / AgCl ECG electrodes were used. The Sramek configuration is used for electrode connection.
With the prototype, measurements were taken from healthy volunteers for 5 seconds. The age group of volunteers is 20-45. They consist of male and female volunteers between 150-180 cm in height and 50-85 kg in weight. All subjects gave their informed consent for inclusion before they participated in the study. In addition, the approval of the Scientific Research and Publication Ethics Board of Başkent University Science and Engineering Sciences was obtained in order to conduct the research.
2.3 Software Development
The configuration given in Figure 4 is set on the ADAS1000 eval board and the eval board has been communicated with the ESP32. Arduino ide has been used for programming the ESP32. With the software developed; REPCTL, EXTENDSW, ECGCTL, FRMCTL memory values are calculated according to the information given in the data sheet and added to the ADAS1000 register addresses. The 32-bit dataframe given in Figure 3 is used in the ESP32 software. On this format, only the memory addresses required for this study (0x40 (header), 0x11 (Lead 1 / LA), 0x12 (Lead 2 / LL), 0x13 (Lead 3 / RA) and 0x1B (RESPM)) were taken. The data are printed on the serial monitor of the Arduino ide by specifying the memory addresses at the beginning in the hexadecimal number system. While measuring with ADAS1000, a data rate of 2 kHz has been selected in accordance with the values given on the data plate. Since this data rate may disrupt the synchronization of the ESP32, it was preferred to take a measurement in 4 data frames and the data was printed on the serial screen in this format. The data on the serial monitor of Arduino ide was sent to Raspberry Pi via bluetooth and subjected to the software developed by Python.
The data sent by ESP 32 was separated according to memory addresses in software and an excel file was created for rawdata. The excel file created is shown in Figure 5. The first columns show the register addresses in the ADAS1000 eval board, the other columns show the hexadecimal equivalents of the measurements taken for the data in these addresses. This data was transferred to arrays according to register addresses via software and 3 * 8 bits of data were obtained for each measurement. Bitwise process was applied to these data, and a single decimal value recorded at the register address for each measurement was obtained against 3 hexadecimal values. Arrays with decimal values were converted into voltage data in the light of the information given in Table 43 and Table 45 in ADAS1000 datasheet.
500 Hz data rate format is used in measurements taken with ESP32. Measurements are taken every 2 ms within the frame of this data rate. According to this, time axis was created in Python and ECG and respiration graphics were drawn in real time according to this time axis (Figure 6).
64 µApp value was chosen as the ADAS1000 excitation current in accordance with the values given in the datasheet. This value complies with the safe value specified in the IEC 60601 standard for patient safety. The thoracic impedance value was obtained by using Ohm's law with the measured amplitude and used excitation current values. In the TEB signal received with the developed system, there is a baseline drift depending on the EMG signals. With the software, this baseline drift was destroyed and the Delta_Z signal was created.
The first derivative of the Delta_Z signal gives the ICG signal. The frequency range of the ICG signal is 0.8-20 Hz. There are also breathing (0.04 - 2 Hz) and motion artifacts (0.1 - 10 Hz) in this band range . Muscle activity was eliminated by passing the Delta_Z signal through a band-pass filter in the 0.7-7 Hz range. The first derivative of impedance change against time was taken, then the ICG signal was obtained by passing through a 16 Hz low-pass filter. The obtained signals are displayed on the user interface prepared with QT Designer.