High Density Resistive Array Readout System for Wearable Electronics

This work presents a wearable sensing system for high-density resistive array readout. The system comprising readout electronics for a high-density resistive sensor array and a rechargeable battery, was realized in a wristband. The analyzed data with the proposed system can be visualized using a custom graphical user interface (GUI) developed in a personal computer (PC) through a universal serial bus (USB) and using an Android app in smartphones via Bluetooth Low Energy (BLE), respectively. The readout electronics were implemented on a printed circuit board (PCB) and had a compact dimension of 3 cm × 3 cm. It was designed to measure the resistive sensor with a dynamic range of 1 KΩ–1 MΩ and detect a 0.1% change of the base resistance. The system operated at a 5 V supply voltage, and the overall system power consumption was 95 mW. The readout circuit employed a resistance-to-voltage (R-V) conversion topology using a 16-bit analog-to-digital converter (ADC), integrated in the Cypress Programmable System-on-Chip (PSoC®) 5LP microcontroller. The device behaves as a universal-type sensing system that can be interfaced with a wide variety of resistive sensors, including chemiresistors, piezoresistors, and thermoelectric sensors, whose resistance variations fall in the target measurement range of 1 KΩ–1 MΩ. The system performance was tested with a 60-resistor array and showed a satisfactory accuracy, with a worst-case error rate up to 2.5%. The developed sensing system shows promising results for applications in the field of the Internet of things (IoT), point-of-care testing (PoCT), and low-cost wearable devices.


Introduction
Wearable device technologies have been widely used in various head-to-toe applications such as environmental analysis, biomedical, physical, and physiological monitoring, primarily as accessory-type such as gloves, headsets, watches, wristbands, and textiles [1][2][3][4][5]. In current years, wearable systems with unique sensing materials and device structures have proved to be highly sensitive in mimicking the human olfactory system and tracking biophysical and biochemical signals, including skin temperatures, body movements, heart rates, pulse oximetry, blood pressures, breathing, wound healing, as well as continuous biofluid monitoring, for instance, sweat and interstitial fluids. In most cases, accessorytype wearable devices fail to provide an accurate electrode-based physiological detection capability due to unreliable body contact. Therefore, many recent research interests have moved to attachable body devices, including patch and sticker type devices [6][7][8][9][10]. Flexible sensing electrodes are required to implement these attachable devices, and modules should be miniaturized to provide comfortable body wearing. The use of flexible sensor arrays in point-of-care testing (PoCT) has been regarded as a promising approach to monitoring patients out of the hospital and lessening the burden on public healthcare systems in caring for older adults or patients with chronic diseases [11,12].
One of the most popular sensors for a wearable device is a resistive sensor, which has a sensing element whose resistance changes as a function of the target physical or

System Description and Specification
The wearable system consists of the following modules: (1) a flexible customized or commercial resistive sensor array to detect target analytes such as biomarkers and chemicals; (2) a readout board to collect, process and transmit sensor data to a personal computer (PC) or a smartphone; and (3) a user-friendly graphical user interface (GUI) to control the device and display the obtained data, as shown in Figure 1. The hardware comprising readout electronics and a battery was housed in a wristband chassis. The system and the sensor array specifications targeted in this work are tabulated in Table 1. The resistance range of the piezoresistive and thermoelectric sensor varied from a few ohms to kiloohms [2,11], whereas the chemiresistive sensor varied up to a few megaohms [23]. Thus, an input resistance range of 1 KΩ-1 MΩ was targeted in this work to cover a variety of resistive sensors. ohms to kiloohms [2,11], whereas the chemiresistive sensor varied up to a few megaohms [23]. Thus, an input resistance range of 1 KΩ-1 MΩ was targeted in this work to cover a variety of resistive sensors.  Electronic skin (e-skin) for blood pressure and body temperature monitoring; electronic nose (e-nose) for environmental harmful/toxic gas detection

Readout Board
A readout board was required to measure the resistance change of the sensor as a function of the target physical or chemical reaction. A resistance-to-voltage (R-V) conversion was employed in the proposed readout circuit using a voltage divider concept consisting of a target resistive sensor ( ) and a reference resistor ( ). The function of the readout board involved the following: (1) collecting and multiplexing the sensor output, which was the voltage divider output; (2) processing the collected sensor output and then converting it to the digital form using an analog-to-digital converter (ADC); and (3) sending the converted digitalized data to a PC or smartphone using wired or wireless communication. The subsystems of the readout board were as follows: (1) multiplexers (MUX); (2) a digital potentiometer (DPOT); (3) a microcontroller unit (MCU); (4) a micro-universal serial bus (USB); (5) a Bluetooth unit; and (6) a power management circuit consisting of voltage regulators and a battery management circuit, as illustrated in Figure  2. The readout circuit was fabricated on one top and one bottom printed circuit boards (PCBs). The top PCB contained the MUX and the DPOT, whereas the bottom PCB consisted of the MCU, the BLE unit, and the power management block.

Readout Board
A readout board was required to measure the resistance change of the sensor as a function of the target physical or chemical reaction. A resistance-to-voltage (R-V) conversion was employed in the proposed readout circuit using a voltage divider concept consisting of a target resistive sensor (R sensor ) and a reference resistor (R re f ). The function of the readout board involved the following: (1) collecting and multiplexing the sensor output, which was the voltage divider output; (2) processing the collected sensor output and then converting it to the digital form using an analog-to-digital converter (ADC); and (3) sending the converted digitalized data to a PC or smartphone using wired or wireless communication. The subsystems of the readout board were as follows: (1) multiplexers (MUX); (2) a digital potentiometer (DPOT); (3) a microcontroller unit (MCU); (4) a micro-universal serial bus (USB); (5) a Bluetooth unit; and (6) a power management circuit consisting of voltage regulators and a battery management circuit, as illustrated in Figure 2. The readout circuit was fabricated on one top and one bottom printed circuit boards (PCBs). The top PCB contained the MUX and the DPOT, whereas the bottom PCB consisted of the MCU, the BLE unit, and the power management block. 2.1.1. Top PCB Electronics S1-S60 in Figure 2 represents the 60 two-electrode resistive sensors connected to the readout board via a flexible PCB (FPCB) connector "FH29B-120S-0.2SHW(05)" (Hirose-Connector, Kanagawa, Japan). One electrode of each resistive sensor was connected to the supply voltage ( ) provided by the power management block of the readout board, while the other electrode of each sensor was connected to the multiplexer input. To individually address the 60 different sensors, two 32 × 1 MUX "ADG732BSUZ" (Analog Device, Norwood, USA) were utilized. Due to the broad resistance range of the target sensor (1 KΩ-1 MΩ), using a fixed value of in the voltage divider circuit resulted in a voltage saturation at the ADC input, especially for the sensors that fell in the extreme corners of the target resistance range. To avoid this problem, the value was tuned similar to the value using a dual-channel 8-bit DPOT "AD5242BRZ1M" (Analog Device, Norwood, USA). The resistance value of the DPOT ( ) can be varied from 60 Ω to 1 MΩ by programming the registers. The DPOT had three terminals: A, B, and wiper. The wiper position of the DPOT was programmed by the Inter-Integrated Circuit (I 2 C) protocol and can be set to 256 distinct positions. Corresponding to the wiper position, the of the readout system can be set and calculated using Equation (1): where is the resistance between the DPOT "A" terminal and the wiper terminal, D is the decimal equivalent of the binary code between 0 and 255 which is loaded in the 8-bit register, is the nominal end-to-end resistance and equals to 1 MΩ, and is the wiper resistance contributed by the ON-resistance of the internal switch and equals to 60 Ω. 2.1.1. Top PCB Electronics S1-S60 in Figure 2 represents the 60 two-electrode resistive sensors connected to the readout board via a flexible PCB (FPCB) connector "FH29B-120S-0.2SHW(05)" (Hirose-Connector, Kanagawa, Japan). One electrode of each resistive sensor was connected to the supply voltage (V DD ) provided by the power management block of the readout board, while the other electrode of each sensor was connected to the multiplexer input. To individually address the 60 different sensors, two 32 × 1 MUX "ADG732BSUZ" (Analog Device, Norwood, MA, USA) were utilized. Due to the broad resistance range of the target sensor (1 KΩ-1 MΩ), using a fixed value of R re f in the voltage divider circuit resulted in a voltage saturation at the ADC input, especially for the sensors that fell in the extreme corners of the target resistance range. To avoid this problem, the R re f value was tuned similar to the R sensor value using a dual-channel 8-bit DPOT "AD5242BRZ1M" (Analog Device, Norwood, USA). The resistance value of the DPOT (R re f ) can be varied from 60 Ω to 1 MΩ by programming the registers. The DPOT had three terminals: A, B, and wiper. The wiper position of the DPOT was programmed by the Inter-Integrated Circuit (I 2 C) protocol and can be set to 256 distinct positions. Corresponding to the wiper position, the R re f of the readout system can be set and calculated using Equation (1):

Bottom PCB Electronics
where R WA is the resistance between the DPOT "A" terminal and the wiper terminal, D is the decimal equivalent of the binary code between 0 and 255 which is loaded in the 8-bit register, R AB is the nominal end-to-end resistance and equals to 1 MΩ, and R W is the wiper resistance contributed by the ON-resistance of the internal switch and equals to 60 Ω.

Bottom PCB Electronics
The sensor data collected from the top PCB was sent to a MCU "CY8C5888LTILP097" (Cypress Semiconductors, San Jose, USA), also called PSoC5LP, on the bottom PCB. The PSoC5LP family provides a combination of a 32-bit Arm ® Cortex ® -M3 processor with a flexible, configurable block of an analog subsystem, digital subsystem, routing, and general purpose input/outputs (GPIOs), which enables a high level of integration in a wide variety of applications. The analog multiplexer output was digitalized using an internal PSoC5LP 16-bit ADC operated in the single-ended mode with a rail-to-rail output. Once the digitalized ADC output (ADC voltage ) was obtained, the unknown value of R sensor can be calculated using Equation (2): where R sensor is the unknown sensor resistance, R re f is the reference DPOT resistance, V DD is the supply voltage, and ADC voltage is the digitalized ADC output. The ADC step corresponded to 76 µV, which could detect a 0.1% variation of the sensor output with a resistance range between 1 KΩ and 1 MΩ (i.e., 1 Ω change for the 1 KΩ base sensor resistance and 1 KΩ change for the 1 MΩ base sensor resistance). The readout board was designed to operate at a V DD of 5 V. The power could be provided to the board by using a USB cable or a rechargeable battery. A 3.7 V and 500 mAh lithium-ion polymer battery (LiPo) was employed in the prototype, which fit the 3 cm × 3 cm wristband chassis. To provide a constant 5 V supply, a step-up/boost converter "TPS61240IDRVRQ1" (Texas Instruments, Dallas, USA) was adopted. A low-dropout (LDO) voltage regulator "TLV75733PDBVR" (Texas Instruments, Dallas, USA) was selected to provide a constant voltage V CC of 3.3 V to the BLE technology. The processed information was transferred to the user's smartphone via a BLE unit "SPBTLE-1S" (STMicroelectronics, Geneva, Switzerland). The BLE unit was interfaced with the MCU through the Universal Asynchronous Receiver/Transmitter (UART) protocol at a baud rate of 115,200 bits per second. The board also included a type B micro-USB "UJ2-MIBH2-4-SMT-TR" (CUI device, Lake Oswego, OR, USA), which powered the system and communicated with a PC using USB 2.0 standards. The detailed specifications of the components considered during the design are listed in Table 2. The photos of the assembled top and bottom PCBs are shown in Figure 3. The small form factor is an essential criterion to make the device suitable for wearable applications.
To obtain a small form factor, two 0.2 mm thick PCBs were designed to stack them back-toback, instead of designing the readout circuit on a single large PCB. Two two-layered PCBs were preferred as a substitute for a four-layered PCB to reduce the fabrication cost. Both the dimensions of the top and bottom PCBs were 3 cm × 3 cm, making the device suitable for wearing as a wristband. The "Eagle 9.4.2" software (Autodesk, San Rafael, CA, USA) was used to design the layout of the two-layer readout PCBs.
form factor is an essential criterion to make the device suitable for wearable applications.
To obtain a small form factor, two 0.2 mm thick PCBs were designed to stack them back-to-back, instead of designing the readout circuit on a single large PCB. Two two-layered PCBs were preferred as a substitute for a four-layered PCB to reduce the fabrication cost. Both the dimensions of the top and bottom PCBs were 3 cm × 3 cm, making the device suitable for wearing as a wristband. The "Eagle 9.4.2" software (Autodesk, San Rafael, USA) was used to design the layout of the two-layer readout PCBs.

Firmware and Algorithm
To develop the firmware for the readout board, the following subsystems of PSoC5LP were utilized, as shown in Figure 4:

Firmware and Algorithm
To develop the firmware for the readout board, the following subsystems of PSoC5LP were utilized, as shown in Figure 4: The source code was written in the embedded C programming language and was compiled using a "PSoC Creator 4.  The flow chart of the proposed system is presented in Figure 5. After the system initialization was completed, a supply voltage was applied to the sensors. The finalized was obtained after tuning the to match the value of . A few steps were required in the firmware to achieve tuned . First, the value of was set to mid-range ( ), and was obtained. Using the and Equation (2), the value of was calculated. During the next step, the value of was set to the computed value of in the previous step. Thus, the process automatically balanced the value of to and avoid the voltage saturation problem caused by the fixed , which resulted in accurate values. The 60 sensors were measured one after the other in series, and equating to was performed every time before reading each sensor, using the firmware coding. Thus, the process was repeated 60 times until all the sensor values were calculated, and the obtained sensor data ( ) were transferred to a PC via USB or a smartphone via BLE. The source code was written in the embedded C programming language and was compiled using a "PSoC Creator 4. The flow chart of the proposed system is presented in Figure 5. After the system initialization was completed, a supply voltage was applied to the sensors. The finalized R sensor was obtained after tuning the R re f to match the value of R sensor . A few steps were required in the firmware to achieve tuned R re f . First, the value of R re f was set to mid-range (R mid ), and ADC voltage was obtained. Using the ADC voltage and Equation (2), the value of R sensor was calculated. During the next step, the value of R re f was set to the computed value of R sensor in the previous step. Thus, the process automatically balanced the value of R re f to R sensor and avoid the voltage saturation problem caused by the fixed R re f , which resulted in accurate R sensor values. The 60 sensors were measured one after the other in series, and equating R re f to R sensor was performed every time before reading each sensor, using the firmware coding. Thus, the process was repeated 60 times until all the sensor values were calculated, and the obtained sensor data (R sensor ) were transferred to a PC via USB or a smartphone via BLE.

User interface: GUI and Smartphone Application
A customized GUI was developed to connect the readout board and the PC using a USB Communication Port (COM port). The GUI written in Python provided a real-time display plot to visualize the captured sensor data from the device and saved the obtained sensor data in a Comma Separated Values (CSV) format file. The "Tkinter" GUI framework and the "matplotlib" library were utilized to build the mentioned functionalities. Meanwhile, the USB communication was established using the "pySerial" library, and all the libraries were compiled into a single executable file using the "pyinstaller" library. Figure 6 illustrates the sensor setting window and the experiment window of the customized GUI. The sensor setting window of the GUI consisted of 60 checkboxes to individually select/unselect a sensor and a connectivity check button. If the device was connected successfully, the button would turn green and showed "Connected"; otherwise, it showed "Disconnected" in red. The experiment window allowed the user to set the target experiment duration, perform sensor calibration, visualize the resistor values in a graph, select the X-axis to linear or log scale and start/stop the experiment.

User Interface: GUI and Smartphone Application
A customized GUI was developed to connect the readout board and the PC using a USB Communication Port (COM port). The GUI written in Python provided a realtime display plot to visualize the captured sensor data from the device and saved the obtained sensor data in a Comma Separated Values (CSV) format file. The "Tkinter" GUI framework and the "matplotlib" library were utilized to build the mentioned functionalities. Meanwhile, the USB communication was established using the "pySerial" library, and all the libraries were compiled into a single executable file using the "pyinstaller" library. Figure 6 illustrates the sensor setting window and the experiment window of the customized GUI. The sensor setting window of the GUI consisted of 60 checkboxes to individually select/unselect a sensor and a connectivity check button. If the device was connected successfully, the button would turn green and showed "Connected"; otherwise, it showed "Disconnected" in red. The experiment window allowed the user to set the target experiment duration, perform sensor calibration, visualize the resistor values in a graph, select the X-axis to linear or log scale and start/stop the experiment. Meantime, the user can also use a smartphone application as a user interface to receive the data from the readout board. The "BLE Scanner" application (Bluepixel Technologies LLP, Ahmedabad, India) was used as a prototype to display the raw resistance values of the sensors, which were transmitted by the BLE unit in the board. The SPBTLE-1S BLE module was compliant with Bluetooth ® specifications v4.2 with an embedded ceramic antenna that operated at 2.4 GHz. The device was recognizable with the name "BlueNRG-1" in the "BLE Scanner" application to connect with the readout board. Once the connection was made, communication could occur between the readout board and the smartphone through BLE. Meantime, the user can also use a smartphone application as a user interface to receive the data from the readout board. The "BLE Scanner" application (Bluepixel Technologies LLP, Ahmedabad, India) was used as a prototype to display the raw resistance values of the sensors, which were transmitted by the BLE unit in the board. The SPBTLE-1S BLE module was compliant with Bluetooth ® specifications v4.2 with an embedded ceramic antenna that operated at 2.4 GHz. The device was recognizable with the name "BlueNRG-1" in the "BLE Scanner" application to connect with the readout board. Once the connection was made, communication could occur between the readout board and the smartphone through BLE.

Case Analysis 1: Test Setup with a Discrete Resistor Array and Electrical Testing Results
The proposed system was tested electrically for verification, and Figure 7a illustrates the test setup. To mimic the 60-sensor array, an electrical equivalent model with a 60-resistor array was fabricated on a PCB, as shown in Figure 7b. The 60-resistor array was realized by 0.1%-tolerance thin-film discrete resistors, where the resistance varied from 1 KΩ to 1 MΩ. The resistor array was connected to the readout board using an FPCB jumper cable. The USB cable connected the readout board and the customized PC GUI to power up the board. In the GUI, the resistance values of 60 sensors were displayed (Figure 7c), which varied with respect to time, and the results were saved in the CSV format file to record the sensor response. Figure 7d shows the system response displayed in the smartphone. Table 3. Sixty sensor readings-expected versus measured sensor resistances.

Sensor
(Ω)   To validate the error rate of the proposed system, Equations (3)-(5) were utilized: where R exp is the expected sensor resistance value measured using a digital multimeter "Agilent 34401A" (Keysight Technologies, Santa Rosa, USA) and R meas is the measured sensor resistance value obtained using the proposed readout board. In a span of 60 s (1 min), 60 sensor data were collected 51 times, resulting in 3060 sensor samples. These samples were used to calculate the error rates as per Equations (3)- (5). The maximum, minimum, and average values of the measured sensors resistances and the corresponding values of error rates are listed in Table 3. The sensor response R exp versus R meas(avg) showed a linear trend over the target measurement range, as depicted in Figure 8. The worst-case error rate reported during the experiment was under 2.5%. Since it was tedious to display the system's transient response for all 60 values of the sensors, the transient response is illustrated for a span of one minute in Figure 9, with only six different sensor resistances, which were 1 MΩ, 750 KΩ, 500 KΩ, 100 KΩ, 50 KΩ, and 10 KΩ. Table 3. Sixty sensor readings-expected versus measured sensor resistances.

Case Analysis 2: Test Setup with a Force-Sensitive Resistor and Sensor Testing Results
As the second case analysis, the developed system was tested by interfacing with a commercially available force-sensitive resistor "FSR-406" (Interlink Electronics ® , Camarillo, USA). The "FSR-406" varies its resistance, depending on the force applied to the sensing area. The non-actuated sensor resistance is larger than 1 MΩ, and its resistance decreases exponentially as per the force applied on the sensing area. The sensor had a sensing area of 0.75" × 1.5" and can sense applied force in the range of 10 g to 10 Kg. During the experiment, "FSR-406" was connected to the readout board, as illustrated in Figure 10a, and the sensor response measured by the readout board (R board ) was recorded throughout the applied weight range from 50 g to 750 g. Simultaneously, the sensor response measured by a digital multimeter (R dm ) was also captured using the digital multimeter "Agilent 34401A" (Keysight Technologies, Santa Rosa, USA). Ten readings were taken and averaged to obtain both R board and R dm . The comparison results between R board , R dm , and the corresponding error rates calculated during the experiment are listed in Table 4. The response of the designed readout board showed a close correlation with the response measured using a digital multimeter, demonstrating a satisfactory performance as illustrated in Figure 10b. Due to the unstable response of "FSR-406" at lower weights, the experiments were conducted for weights of 50 g and above to avoid inaccurate results.
orded throughout the applied weight range from 50 g to 750 g. Simultaneously, the sensor response measured by a digital multimeter ( ) was also captured using the digital multimeter "Agilent 34401A" (Keysight Technologies, Santa Rosa, USA). Ten readings were taken and averaged to obtain both and . The comparison results between , , and the corresponding error rates calculated during the experiment are listed in Table 4. The response of the designed readout board showed a close correlation with the response measured using a digital multimeter, demonstrating a satisfactory performance as illustrated in Figure 10b. Due to the unstable response of "FSR-406" at lower weights, the experiments were conducted for weights of 50 g and above to avoid inaccurate results.

Discussion and Conclusions
The overall system performance is summarized in Table 5. In a span of 60 s (1 min), 60 sensor readings were collected and stored in the CSV file 51 times, resulting in a total of 3060 sensor measurements. This led to a processing speed of 51 Hz, equivalent to 19.6 ms, to collect, process and transmit the data from a single sensor to the GUI. The pro-

Discussion and Conclusions
The overall system performance is summarized in Table 5. In a span of 60 s (1 min), 60 sensor readings were collected and stored in the CSV file 51 times, resulting in a total of 3060 sensor measurements. This led to a processing speed of 51 Hz, equivalent to 19.6 ms, to collect, process and transmit the data from a single sensor to the GUI. The processing speed often depends on the input resistance range. Thus, the system targeting solely piezoresistive sensors provided a somewhat faster response due to the lower target resistance. However, typical e-nose gas detection systems, which target chemiresistive sensors of a wide range up to 1 MΩ, offer a processing speed of 0.1 Hz to 10 Hz (10 s to 100 ms per sensor) [33]. Compared with those systems, the proposed method provides a processing speed of 51 Hz (19.6 ms per sensor), which is significantly faster. Also, an application such as a comprehensive breathing analyzer requires a sampling frequency range of 0.1 Hz to 0.8 Hz [5], which can be easily satisfied by the proposed system. The readout system achieved a worst-case error rate of less than 2.5%. These variations were caused by the combination of the supply voltage fluctuation of regulators by ±2%, the DPOT error rate of ±0.5 least significant bit (LSB), the 0.1% tolerance of thin-film discrete resistors in the resistor array, and the ADC conversion error. The system power consumption was around 95 mW, and the majority of the power was consumed while the BLE was transmitting the data to the user. The low-power-consumption profile makes the device suitable for battery-powered wireless sensor networks. The possible limitation of the system can be its scalability to adopt a more extensive size array. The expansion of the system to more than 60 sensors makes the system bulkier and might not be appropriate for wearable electronics. As future work, the prototype will be tested chemically by interfacing with chemiresistive gas sensors to detect the target analytes of various concentrations.
To summarize, a compact universal-type resistive sensor array readout based on the R-V conversion is presented. This work demonstrates the novelty and potential application of an integrated wearable sensing system with the following attributes: a low-cost system with a wireless communication capability, a facility to accommodate a high-density resistive sensor array, and portable readout electronics with a small form factor of 3 cm × 3 cm. The system behaves as an electrophysiological sensing interface for wearable healthcare monitoring systems, supporting multi-functionality hybrid sensing, and can be implemented as a readout for e-skin or e-nose. These advantages, especially low-cost, small size, and low power consumption, allow the device to be utilized in battery-powered wireless sensor network applications and next-generation self-sustainable integrated wearable systems in the IoT era.