## 3 Materials and Methods
### Instrumentation and Acquisition System
#### 3.2.3 Core Module Front End  
The front end is responsible for the intermittent light switching control that allows the sampling of four wavelengths simultaneously. This part of the core board hosts four independent controls to set the emitters' currents and a multiplexing circuit. Previous  
Figure 2: Detailed block diagram showing the ZenTBI architecture, considering the power supply module, core module, current source module, transimpedance amplifier module, and bus board.  
studies on reflectance PPG demonstrated that acceptable signal quality could be guaranteed without exceeding 50 mA LEDs driving currents [22]. Accordingly, each current control was designed to allow a maximum drive current of 100 mA. The first and second controls are the DAQ analogue outputs (A0 and A1) connected to voltage attenuator circuits (RCV). Thus, from LabVIEW, A0 is set between 0 V and 5 V, while A1 can be defined between \(-\)5 V and 0 V. Both outputs were then attenuated down to 0 V to 1 V and \(-\)1 V to 0 V, respectively, using voltage dividers and op-amp buffers. These controls pass through a second attenuation phase at the beginning of the Current source module to finally obtain 0 to 100 mV and \(-\)100 mV to 0 V, respectively. Due to the limited number of analogue output channels on the DAQ card, the third and fourth controls consist of 10 K digital potentiometers (X9C103 SIZT1) configured into two independent voltage dividers. One of them is supplied with 3.3 V and configured with a fixed resistor of 23 K, allowing changes between 0 and 1 V. The other is supplied with \(-\)1.5 V and configured with a fixed resistor of 5 K, creating the last output of \(-\)1 to 0 mV. Each digital potentiometer is controlled from LabVIEW, where three digital signals are generated to activate (CS) the chip, toggle the INC pin to move the wiper, and either increment or decrement the counter in the direction indicated by the logic level on pin U/D.  
The multiplexing circuit generates timed switching signals used to turn on one LED at a time, which allows the independent sampling of light at each wavelength by photodetectors. All four current controls and the analogue ground (0 V) are connected to a double-pole four-throw multiplexer (MC14052 BD). Each multiplexor pole selects one of the three input voltage signals (either positive or negative or ground) and outputs the selected input into a single line, producing two control lines called CTL0 and CLT1. Each control line switches a pair of LEDs. When CTL0 is either positive or negative, CTL1 output is ground (0 V), and vice versa. Due to the antiparallel position of the LEDs in each pair, when one of the control lines is positive, only one LED of the pair, controlled by that control line, is switched \"ON,\" and when negative, the other LED of the same pair is switched \"ON.\" The multiplexer switching time is controlled by an 8-bit Atmel ATtiny 2313-20 SU microcontroller unit (MCU) (Atmel Corp, San Jose, CA, USA) at a frequency of 1 kHz. A byte data sequence is created using the multiplexer's truth table and is written on port-D of the MCU.  
The two control lines of the multiplexer are passed through the bus connector into the current source module, where the voltage is converted into the current required to power the LEDs. The duration time of each LED \"ON\" is calculated by Equation (6). Having a sampling frequency of 1000 Hz, three photodiodes, and four wavelengths, each emitter turns \"ON\" every 2.5 ms.  
\[t=\frac{\
icefrac{{1}}{{f_{S}}}}{n_{o}.photodiodes\times n_{o}.wavelengths} \tag{6}\]  
Equation (6): Duration time of each LED \"ON\" (\(t\)), sampling frequency (\(Fs\)), number of photodiodes (\(n_{o}.photodiodes\)), and number of wavelengths (\(n_{o}.wavelengths\)).