## 3 Materials and Methods
### Materials
#### 3.1.2 Perception Layer  
Signal Conditioning and Signal Acquisition Stages  
As clearly seen from Equation (4), alkaline solutions tend to generate negative potential differences. Meanwhile, acidic solutions will have a positive trend, in terms of the voltage generated by the sensor. Therefore, in order to ensure that the electrical waveform is adequate for analog to digital conversion (ADC), an offset voltage must be implemented in the signal conditioning stage. As illustrated in Figure 3, a divider network with a stable voltage input (Texas Instruments, Dallas, TX, USA, TL431) of 2.5 V defines the bias voltage. This offset voltage can be varied by means of a potentiometer (RV1). In the discussion section, we present key modifications to the passive components of this bias stage of the signal conditioning circuitry, which serve to optimize pH detection.  
Figure 2: The implemented sensor consists of: a. Working electrode in contact with sample under study; b. Reference electrode interacting with solution of unknown pH; c. Protective cover; d. Storage solution; and e. Standard BNC connector for interoperability.  
Considering that a potentiometric system is in place, pH measurements should be ideally performed in equilibrium, as emphasized in Equation (2). Therefore, the electrical current generated between working and reference electrodes should be as negligible as possible. This implies that the impedance of offset and detection stages should be various orders of magnitude greater compared to the pH sensor impedance.  
The instrument employs an array of precision operational amplifiers, op-amps (Texas Instruments, TLC4502), with an input impedance of 1 \(\times\) 10\({}^{12}\)\([\Omega]\) and a typical bias current of 1 [pA]. Such a configuration ensures that negligible current flows through the sensor as required by the potentiometric design. Finally, the amplification section is configured as a conventional non-inverting amplifier with the gain determined by resistors R6 and R7, as depicted in Figure 3. In order to facilitate global VF applications, the complete signal conditioning stage can be implemented in a single electronic module ([PERSON], Hong Kong, China PH-4502C). A thorough revision of such integrated modules is suggested, in order to determine expected offset, detection, and amplification performance. Finally, breadboard implementations can be constructed by following the schematic of Figure 3.  
The electrical signal generated by the instrument proposed in this work is the sum of the bias voltage plus the potential difference generated by the pH sensor, as seen in Figure 3. This signal is amplified and acquired by the ADC of a microcontroller. In our case, an ATmega328P (Atmel Corporation, San Jose, CA, USA) microcontroller built into an Arduino UNO board (Smart projects, Ivrea, Italy, Arduino UNO) was used. It is important to note that, in order to enable global adoption, practically any standard microcontroller, such as those of the STM32 Family (STMicroelectronics, Grenoble, Auvergne-Rhone-Alpes, France), the nRF52 series (Nordic VLSI, Trondheim, Trondheim Fjord, Norway), or other member of the ATmega series (Atmel Corporation, San Jose, CA, USA), can be equally employed. Similarly, other integrated modules can be utilized to replicate this instrumentation locally.