## 3 Results and Discussion
### External Sampling Cell Efficiency and Ammonium Monitoring  
A dedicated measurement cell was developed to determine the ammonium ion concentration in the bioreactor. This cell sampled the reactor's content once daily, by activating a 12 V DC-powered peristaltic pump. An Ion Selective Electrode (ISE) specific to ammonium ions provided concentration measurements after the sample reached the measurement cell. To ensure that fresh samples were analyzed, the cell system's pumps flushed the cell, removing residual contents from previous measurements and preparing it for new analyses. The cell required minimal weekly maintenance due to sedimentation from suspended solids in the anaerobic substrate. Maintenance included rinsing the cell with deionizedwater and manually activating the pumps to remove accumulated solids from the cell's base. This sampling cell approach was deemed necessary since the ISE electrode used was not suited for continuous measurements in AD systems, as suspended solids could potentially clog the electrode's membrane [48]. Overall, the cell and accompanying pumps performed reliably throughout bioreactor monitoring. The IoT system controlling the pumps offered flexible options, including adjusting sampling frequency, cleaning schedules, and the potential for sample dilutions. This cell was specifically designed for the employed bioreactor, fed with a filtered inoculum (sieved at 1 mm), making it suitable for the BA medium and the chemical substrates used in this study. However, adapting the cell for real wastewater--common in pilot-scale bioreactors--would require redesigning the cell and selecting pumps capable of handling higher solids content. Ammonium ion concentrations measured by the IoT device's ISE electrode and by the reference analytical method (Kjeldahl Distillation) are presented in Figure 8. The ISE electrode consistently underestimated ammonium concentration but reflected similar trends in concentration fluctuations compared to the reference method. In the first 11 days, the underestimation ranged from 4.68% to 14.53% (average 10.31%). From days 11 to 20, the discrepancy increased, with underestimation ranging from 15.17% to 24.21% (average 19.84%). Given this difference, an alternative calibration approach for the ISE electrode was undertaken. For the initial calibration, standard solutions with ammonium ion concentrations of 100 ppm and 1000 ppm were employed (Figure S3). Subsequently, higher concentration standards were prepared by diluting ammonium chloride (NH4 Cl) salt within deionized water. However, potassium and sodium ions present in the anaerobic medium and inoculum likely interfered with the electrode, as indicated in the previous literature [49; 50; 51]. A new calibration was performed using bioreactor-derived samples, adjusting the ammonium ion concentration analytically and preparing a range of solutions by diluting with water or adding NH4 Cl (Figure S4). This revised calibration method improved measurement  
Figure 8: Daily ammonium concentration of the IoT bioreactor measured by ISE ammonium sensor and by the analytical method of Kjeldahl distillation. accuracy, with deviations ranging from \(-4.18\%\) to \(+15.94\%\) (mean \(8.26\%\)) between days 21 and 31. Afterward, the underestimation range increased again from \(9.63\%\) to \(20.08\%\) (average \(16.24\%\)) and a recalibration at this stage could have further refined results. The ISE electrode displayed almost continuously a lower value in comparison with the analytical method. An ISE electrode has been reported to underestimate ammonium ion concentrations in high-solids samples [52]. Solid particles present in the inoculum were likely suspended in the cell interior during sampling, which hindered measurement accuracy by clogging the ISE electrode membrane. This issue could be resolved by filtering the sample, although automatic sampling requires specialized high-cost equipment. Temperature control also plays a significant role in accurate measurement [53].