## 2 Materials and Methods
### Evaluation Methods  
#### 2.2.1 Calibration and Accuracy Evaluation  
For the calibration of the potentiostat, one of the four internal calibration resistors is selected, which corresponds to the value of the selected TIA feedback resistor (100 \(\Omega\), 10 k\(\Omega\), 1 M\(\Omega\), and 100 M\(\Omega\), with a tolerance of 0.1%). The designed potentiostat is set to two electrode configurations, and the electrodes are set to contact each side of the calibrated resistor using the analog switch TMUX1104. The DAC is set to sweep the output voltage in the range of 0 to 5 V, which is related to the nominal operating range of the potentiostat \(\pm\)2.5 V. At each DAC output value, the ADC reads the value of the electrometer and the current-to-voltage (I/E) converter in which the electrometer value is used to set the right voltage between the WE and RE, while the I/E converter value is used to measure the actual voltage value of the cell. Using the least-squares regression method, the measured voltage and current values are then used to calculate a linear transfer function (y = ax + b).  
Figure 4: The designed EC-PEC chamber with the assembled cell (**a**), the top view (**b**), and its components (**c**).  
In this equation, y represents the TIA voltage, x is the applied voltage measured by the electrometer, a is the calculated slope (gain coefficient), and b is the calculated intercept (offset voltage). Because of the non-ideal properties of the components, this calibration is crucial to ensuring measurement accuracy. Electrochemical and photoelectrochemical measurements involve the measurement of current generated during redox reactions. Therefore, calibration of the measurement circuit ensures the accuracy and precision of the current obtained in electrochemical and photoelectrochemical experiments. The accuracy of this procedure calibration for the designed potentiostat is directly related to the accuracy of the 24-bit ADC AD122C04 when the calibrated values are calculated on the returned data of the ADC.  
Because the excitation light source uses monochrome LED lights with different wavelengths and electrical parameters, each LED was applied to the current, which is the maximum DC forward current mentioned in the datasheet of each LED. To calibrate the current source on the excitation LED light source, a digital multimeter (Fluke 87V) was used to measure the current, in which the current was controlled by the DAC AD5622. After the current source is calibrated, it is set to the suitable value for each LED used in the excitation light source. The spectrum of the excitation light source is measured by a Stellar-net PS300 spectroradiometer.  
An external resistor array was used to assess the current measurement range of the designed potentiostat. The array consisted of eight resistors with varying values: 100 \(\Omega\), 1 k\(\Omega\), 10 k\(\Omega\), 100 k\(\Omega\), 1 M\(\Omega\), 10 M\(\Omega\), 100 M\(\Omega\), and 1 G\(\Omega\). Fixed voltages, with values of 1 V or 0.1 V depending on the theoretical value calculated by Ohm's law, were applied on each resistor in this array to achieve different current ranges. The resistor with the highest resistance (1 G\(\Omega\)) had a tolerance of 1%, while the remaining resistors had a tolerance of 0.1%. The evaluation resembled an imperometric technique commonly used in EC methods. The process was carried out for 60 s at each resistor value with a sampling interval of 20 sps. This sampling rate allows us to minimize the noise from the powerline because of the 50/60 Hz rejection and its harmonic signal coming from the AD5122C04 with a decrease of over \(-\)80 db. In this way, the intrinsic accuracy of the device was evaluated by analyzing the variation in the measured current values.