Introduction

Intensive agricultural production to meet the food demands due to population growth has resulted in water and nutrient scarcity and soil desertification (Gustavsson et al. 2011; Avagyan 2011). To meet the increasing food demands excessive fertilizers are being applied in the agricultural fields. The global use of fertilizers for nitrogen and phosphorous have increased by eight and three folds (per m2 cropland per year) over the past 50 years (Gourley et al. 2007; Lu and Tian 2017). This intensified use of fertilizers results in disturbed ecosystems, greenhouse gas emissions, soil acidification and groundwater pollution (Avagyan 2018; Bhattacharyya et al. 2021). Raw minerals rich in P, K and Mg are extracted from finite sources, with high environmental footprints (Kratz et al. 2016). At the same time, massive fertilization with mineral macronutrients in intensive agriculture practices is stripping micronutrients (Co, Mn, Fe, Zn, etc.) and soil organic matter (El-Fouly et al. 2015). This also leads to release of macro-nutrients to environmental compartments through runoff into receiving water bodies, with deleterious effects on ecosystems. On the other hand, 89,000 billion gallons of wastewaters are generated worldwide from various sources, with high concentrations of organic/inorganic carbon and nutrients (Sato et al. 2013; Avagyan 2018). To promote sustainable production, nutrients and water resources should be recovered from wastewater as renewed fertilizers/soil conditioners, to preserve the environment, optimize the resources in agricultural systems and increase circular economy. A summary of nutrient recovery and removal processes and nutrient availability in different wastewater sources are presented in Supporting information (Fig. S1 and Table S1).

A microbial electrochemical system can be envisioned to host exoelectrogenic (electron generating) bacteria on the anode for converting the organic compounds present in various wastewater sources into carbon dioxide and water accompanied by release of electrons to be captured by a complementing phenomenon of nutrient removal mechanism involving electron acceptance facilitated by electroactive bacteria residing on the cathode (Gude 2016, 2018). This process will achieve generation of electricity in the first place, while exploiting the unique metabolic processes that prevail in anode and cathode compartments for targeted removal of carbon and nitrogen compounds. There are many inherent advantages that support the use of microbial bioelectrochemical systems for resource recovery applications. In addition, this process can be used to biodegrade pollutants from various industrial effluents (Mishra et al. 2020), and it can be coupled with other chemical processes (Jayashree et al. 2019). Several different combinations of this process including microalgae- and plant-based systems have been studied (Wu et al. 2021; Tongphanpharn et al. 2021). While this mechanism is attractive, the electrode and membrane materials are expensive and are often clogged by various organic and inorganic materials. These factors hinder their progress toward commercialization. Most of the studies have reported the use of platinum catalyst at the cathode to enhance the electron transfer and reduction reaction (Kokabian and Gude 2013). In addition, the Nafion membrane barrier is another cost-intensive component of these systems (Vidhyeswari et al. 2021). Catalyst-free and membrane-free microbial electrochemical systems have been investigated to eliminate the aforementioned cost-related issues (Kokabian and Gude 2015). However, these configurations have presented their own limitations. Biomass-based carbon materials have been widely studied. Other membrane materials such as cation exchange membranes, such as sulfonated poly-ether ether ketone (SPEEK), sulfonated polystyrene-ethylene-butylene-polystyrene (SPSEBS), CMI-7000, and Hyflon Ion anion exchange membranes, such as AMI-7000; salt bridges; and porous materials such as J-Cloth, glass fiber filters and nylon, non-woven cloth, earthenware pot, and ceramic and terracotta materials were also studied (Rahimnejad et al. 2015; Raychaudhuri and Behera 2020; Mehrotra et al. 2021). However, these alternative membranes are not considerably cheaper than the Nafion membrane and also come with lower performance and high internal resistance issues. Most of the studies have focused on improving the power generation potential, but other resources that can be recovered from these systems received less attention. These resources include valuable nutrients (such as nitrogen, phosphorous, and potassium) and metals. Nature-derived materials such as biochar and terracotta are more suitable for the recovery of nutrients, whereas biochar can be effective for metal removal or recovery.

In this research, we evaluate the potential for energy and nutrient recovery from wastewater originating from municipal and agricultural industries in bioelectrochemical systems constructed by using natural terracotta and agricultural biomass derived biochar materials as construction materials. The system includes electrodes made of biochar and the membrane element replaced by terracotta wall, thereby making the system more sustainable and economically attractive. The anode and cathode materials along with terracotta wall can be reused in agricultural applications to avail micro- and macro-nutrients recovered from these sources. This study presents a detailed analysis of impact of external resistance and COD effect on the treatment of synthetic municipal wastewater treatment in terracotta-biochar bioelectrochemical systems. In addition, the performance of the novel bioelectrochemical system in treating synthetic dairy wastewater has been reported. Finally, discussions and future implications of the novel system are described in detail.

Materials and methods

Biochar prepared from agricultural residues and terracotta can be used as electrodes and as separator in lieu of membranes, respectively. These materials are recoverable and recyclable, i.e., they can be replaced when their adsorption capacities are saturated for use in nutrient recycling applications. Biochar has proven to have sorption capacities of up to 30 mg g−1 and 145 mg g−1 for PO4-P and NH4-N, respectively, in addition to having excellent electron conductivity. On the other hand, terracotta (earthenware) can be used as low-cost and biocompatible air–water separator to construct air–cathode MFCs and to separate anode and cathode. Terracotta-MFCs can deliver special effects such as electro-osmotic drag of water molecules, cations migration and catholyte formation corresponding to the electrochemical activity in bioelectrochemical systems. Terracotta separator may also increase pH and water evaporation from the air–water interface and contribute to salts precipitation and heavy metals recovery. Macronutrients such as N, P, K, Ca, Mg can also be efficiently separated due to this mechanism. Terracotta has shown to absorb 10 g of nutrients per every kilogram. In particular, terracotta sheets have been reported to recover 0.32 g of the ammonia–nitrogen and 0.2 g of phosphorous per kg of the material (Goglio et al. 2019). Furthermore, the ability to diffuse oxygen molecules through the external cathode will allow for the reduction reaction of oxygen to produce water molecules resulting in pH imbalance, i.e., increase in pH generally in the range of 9 and 10. This pH difference between the anode and cathode favors electron flow between the electrodes.

A microbial electrochemical system using biochar electrodes and terracotta separator

A terracotta-biochar-bioelectrochemical-system (TBBS) was prepared using a 0.5 L capacity terracotta pot with an outer diameter of 10.4 cm and an inner diameter of 8.9 cm, thickness of 0.7 cm, and depth of 11 cm (Fig. 1a). First, the outer and inner surfaces of terracotta pot were scratched with abrasive material to make uneven surface so that the bentonite and bio-char paste can be adhered to the surface effectively (Fig. 1b). Next, biochar was ground to form a fine powder and about 70 g of biochar and same amount of bentonite clay were mixed in a pot and about 80 ml of distilled water was used to mix them in order to form a paste. Bentonite clay is used as a natural binder to bind the biochar together with terracotta surface. After the formation of paste, it was applied on the inner and outer surfaces of the terracotta pot to form anode and cathode electrodes, respectively. Finally, the paste was wrapped with stainless steel mesh so that it can serve as electron conductor. The TBBS prepared in this method was left for drying for three days. The TBBS was operated in batch mode. In each fed-batch cycle, 500 ml of synthetic wastewater with a COD of 500 mg/L was used and voltage was recorded under different load resistors. The TBBS was inoculated with pre-acclimated aerobic sludge collected from the oxidation ditch of the Starkville wastewater treatment plant. The TBBS was inoculated with 250 ml of domestic wastewater in 250 ml of phosphate buffer (pH 7) to make a total volume of 500 ml. The start-up process for TBBS was done under an open circuit condition and in fed-batch mode.

Fig. 1
figure 1

TBBS (terracotta-biochar bioelectrochemical system) diagram (a), experimental setup for TBBS (b)

Anode inoculum

The anode compartments were inoculated with pre-acclimated aerobic sludge (fed with glucose for five months in a batch reactor) collected from the oxidation ditch of the Starkville wastewater treatment plant (Ghimire and Gude 2019; Ghimire et al. 2021). The primary source of organic carbon fed to the anode of terracotta-biochar bioelectrochemical systems was glucose (468.7 mg/L). The anode compartment was fed with synthetic wastewater prepared with 0.13 g/L of KCl, and NH4Cl, 0.31 g/L nutrient solution in 50 mM phosphate buffer (NaH2PO4 H2O, 2.45 g/L, Na2HPO4, 4.58 g/L, pH = 7) and trace minerals (Freguia et al. 2008; Stuart-Dahl et al. 2020). COD, TDS, NH4+–N, NO2–N, NO3–N, and pH of the samples were analyzed at the start and the end of each batch cycle. Fresh solutions of wastewater were used in each fed-batch cycle.

Analytical methods

COD concentrations were measured using the procedure in Standard Method for Examination of Water and Wastewater (APHA 1998). Total dissolved solids (TDS) concentrations and electrical conductivity of the solution were measured using a conductivity meter (Extech EC400). Colorimetric methods (Hach methods 8039 & 8114) were used to analyze the concentration of ammonium nitrogen (NH4+–N), nitrite nitrogen (NO2–N) and nitrate nitrogen (NO3-N). These were analyzed using a spectrophotometer (Hach DR 2800, Hach Company, Loveland, CO, USA).

Calculations

Fluke (287 true RMS) multimeter was connected in each bioelectrochemical system to record the voltage drop (V) continuously across a 1-kΩ load resistor (R) at a 15-min interval. Ohm’s law as in Eq. 1 was used to calculate the current across the 1 kΩ load resistor (Ghimire and Gude 2019).

$$V = I \times R$$
(1)

Power density (W/m3) was calculated using Eq. 2.

$$P_{{{\text{An}}}} = R \times I^{2} /V_{{{\text{an}}}}$$
(2)

where I is the current flowing through the resistor in ampere and Van is the volume of the anode chamber in cubic meter.

COD removal efficiencies were calculated using Eq. 3

$$\% {\text{ Removal}}\,{\text{efficiency (COD) }} = \frac{{{\text{COD}}_{{\text{i}}} - {\text{COD}}_{{\text{f}}} }}{{{\text{COD}}_{{\text{i}}} }} \times \, 100\%$$
(3)

where CODi and CODf are the initial and final COD (mg/L) concentrations of the anode solution, respectively. Similar expressions as Eq. 3 were used to determine the nitrogen and phosphorous removal efficiencies.

Surface and elemental analysis (SEM and EDX analysis)

Optical observations of the composite sample surfaces (biochar and bentonite mixture) were performed using Zeiss EVO-50 Variable Pressure Scanning Electron Microscopy (SEM). Energy-dispersive X-ray spectroscopy (EDX analysis) was performed using JEOL 6500F Field Emission SEM with attached X-EDS spectrometer and Oxford Instruments INCA Energy + software for electron beam-induced X-ray elemental analysis (includes ultra-thin window (for boron and higher atomic number element detection) and EBSD detector and Oxford Instruments INCA Crystal software for Electron Backscatter Diffraction (EBSD) crystallographic analysis.

Results and discussion

The voltage generation profile of TBBS during start-up period is shown in Fig. 2. During the 1st batch cycle of operation, the open circuit voltage (OCV) has increased to 0.75 V initially and then decreased to about 0 V within 50 h of operation. After 50 h, the second cycle was operated and the produced open circuit voltage was very low due to the loose connection of the conducting wire to the anode electrode. In the third cycle of operation, the anode connection wire was tightened and it was found that the OCV was increased to 0.62 V. More cycles were operated under OCV condition until stable voltage was observed. A constant OCV was observed in 5th and 6th cycles. After the 6th cycle, the TBBS was operated with different load resistors.

Fig. 2
figure 2

The performance of a terracotta-biochar-bioelectrochemical-system at different fed-batch cycles of operation: overall voltage profile of TBBS under open circuit voltage and different external resistors

Effect of load resistor in performance of TBBS

The external resistor is another factor that might affect the power output of bioelectrochemical systems. The TBBS was operated with three different resistors (1000 Ω, 500 Ω, and 100 Ω) to determine the effect of load resistor on its performance which is presented in Fig. 3. The maximum voltage drop was recorded at 0.7 V during the operation of TBBS across 500 Ω resistor. About 0.56 V and 0.25 V of maximum voltage were produced during the operation of TBBS at 1000 Ω and 100 Ω external resistors, respectively. The maximum power produced when the TBBS was operated across the resistor of 500 Ω was 0.98 mW. The maximum power produced during operation of TBBS across 100 Ω and 1000 Ω external resistors were 0.72 mW and 0.31 mW, respectively. The voltage generation potential has varied with external resistor application similar to studies reported on sediment-based microbial fuel cells. In this study, the voltage generation trend can be explained as follows. In general, the anode potential is higher at lower external resistance and vice versa. However, the anode potential is reportedly lower at higher external resistance leading to lower voltage generation. The lower anode potential means that the metabolic activities of the microorganisms residing on the anode biofilm are altered at higher external resistance. There is a possibility of different species of microorganisms that have utilized the organic matter for purposes other than electricity generation such as methane generation. In addition, when the external electrical resistance is high, the equilibrium potential of the cell generates an electric current lower than the maximum sustainable rate of charge transfer to/from the current-limiting electrode. The potential of the cell adjusts to the external resistance. In the latter case, the power generation is sustainable but lower than it could be if the resistance of the external circuit were lower (Menicucci et al. 2006).

Fig. 3
figure 3

Voltage generation profiles of TBBS at external load resistors of 1000 Ω (a), 100 Ω (b), and 500 Ω (c)

The terracotta-biochar bioelectrochemical system included a stainless steel mesh on both inside and outside surfaces which are serving as anode and cathode respectively. The microbial biofilm was formed on the anode surface attached to the stainless steel mesh. In this case, the stainless steel mesh is expected to have performed both current collection and have facilitated microbial community formation (Jung et al. 2018). The microbial community structure of the biofilms (on the anode) in relation to the external resistance has been well studied (Lyon et al. 2010; Liu et al. 2016). Each bioelectrochemical system is unique and its physical, biological and operating characteristics are affected by numerous factors such as the substrate type, biofilm microbiome composition, reactor configuration and cell architecture (including electrochemical cell materials), materials of construction, and any external catalysts and enzymes available for the electron transfer and acceptance (Gude 2016). In this system, naturally available materials such as terracotta and biochar were used to provide distinct benefits in addition to the pollutant removal and energy generation, which is nutrient recovery. Although, the stainless steel mesh would facilitate faster current collection (electron transfer from the anode to the cathode), other limiting factors such as mass transfer of substrates in the biofilm could affect the electron generation and transfer capability resulting in low or high voltage generation potential. It should be noted that different groups of microorganisms could find the conditions conducive under different external load resistance which may have different capability of electricity generation potential (Lyon et al. 2010). Regardless of the high external resistance, some bacterial species are still able to use the anode as an electron transfer intermediate (with the final electron acceptor as oxygen) as evidenced by the power production at 1000 Ω. This demonstrates the flexibility of terracotta-biochar bioelectrochemical systems and the range of reactor configurations that could be used to produce electricity. For this system, the external resistor of 500 Ω appears to result in the maximum power production.

COD removal at different load resistors

The COD removal profiles in TBBS at three different load resistors are shown in Fig. 4. The results showed that the COD removal rate operated with load resistor of 100 Ω and 500 Ω resistor were similar: 0.20 g d−1 L−1 and 0.21 g d−1 L−1 respectively. However, the COD removal rate decreased (0.18 g d−1 L−1) while operating the TBBS with an external load resistor of 1000 Ω for the first 50 h of operation. Furthermore, the results showed that the COD removal percentage increased when the load resistor resistance value was lower.

Fig. 4
figure 4

COD removal profiles in TBBS at different load resistors and different sampling times

At a load resistor of 1000 Ω, nearly 66% of COD removal was observed within 50 h of operation while it was 77% and 78% when operating with load resistors of 500 Ω and 100 Ω, respectively. The rate of COD removal was higher within the first 50 h of operation, whereas the rate of COD removal decreased after 50 h of operation. For example, for TBBS with load resistor of 100 Ω, about 78% of COD was removed in 50 h of operation but in 100 h of operation only 89% of COD removal was observed (Fig. 5). Similarly, the COD removal rates at 500 Ω and 100 Ω were 88% and 81%, respectively, at the end of 100 h of operation. The higher power production at lower external resistance indicates higher energy and substrate conversion efficiency. The resistance to convert the chemical energy into useful metabolic products was low in this case resulting in higher electron and heat release potential. This reflected in the higher COD removal rates at lower resistances (Lin et al. 2016). In addition, the reasons presented in the previous section also apply for the lower COD removal at higher external resistance, i.e., competing metabolic activities by the microbial consortium in the anode biofilm. The competition for the electron donor (COD) between exoelectrogenic bacteria and fermentative and anaerobically respiring microorganisms during the initial period of anode biofilm colonization and their functions can also have significant impact on the COD removal as well as electricity generation. These observations have already been proved in the literature (Picioreanu et al. 2007, 2008).

Fig. 5
figure 5

Percentage of COD removal at different hours of operational cycle: a at the end of 50 h of operation; b at the end of 100 h of operation

Ammonium nitrogen (NH4+–N) removal profile was studied by analyzing samples for NH4+–N concentration at every 12 h of operation. The concentration of NH4+–N decreased with time and the removal of NH4+–N was linearly correlated with operational cycle time. However, only about 38% of ammonium removal was observed within 100 h of operation of the batch cycle. Total phosphate removal with time was studied by analyzing the phosphate concentration in every 12 h of operation. The result showed that the phosphate concentration decreased with time and was linearly correlated with the operational time. About 54% of phosphate removal was observed within 100 h.

Effect of COD concentration on the performance of TBBS

Figure 6 shows the voltage profile generated by TBBS at different COD concentrations of synthetic domestic wastewater. Three cycles were repeated in each COD concentration. The results showed that the voltage generated by TBBS increased with the COD concentration of synthetic wastewater, within the range of 100 to 500 mg/L. The range was chosen to represent most municipal wastewaters and agricultural industry effluents. This cannot be concluded as a general trend at much higher COD loadings as there can a substrate inhibitory effect at higher COD concentrations. However, a previous study showed that higher power generation potentials could be observed at higher COD concentrations (0–3500 mg/L) including a few days of COD stress (del Campo et al. 2013). Figure 7 shows the COD removal profiles in TBBS at different COD concentrations at 100, 250, and 500 mg/L, respectively. The COD removal was about 84% at a COD concentration of 500 mg/L, while the removal rates were 76% and 75% at COD concentrations of 250 and 100 mg/L, respectively at the end of 105 h. This means that the specific COD removal rate was significantly lower at low COD concentrations. However, addition of a co-substrate could enhance the electron transfer and voltage generation potential of the system (Ndayisenga et al. 2021).

Fig. 6
figure 6

Voltage profile generated by TBBS at different COD concentration

Fig. 7
figure 7

COD removal with time at different initial COD concentration

Polarization test

The polarization curves from the bioelectrochemical systems provide important information about the operating conditions of the system, in particular, about the actual capabilities of the system (del Campo et al. 2013). These curves reveal three important parameters: the open circuit voltage (OCV) or the maximum allowable voltage (for a zero current), the maximum intensity reachable (for a zero potential) and the maximum feasible power density. In addition, the shape of the curve gives information about the limiting stage that controls the performance of the system (Fig. 8).

Fig. 8
figure 8

Polarization curve of TBBS

The electricity generation potential in bioelectrochemical systems depends on the electron transfer step between the bacteria and the anode and this step should be thermodynamically favorable at the given conditions. In this study, biochar was used as an anode which should act as a thermodynamically favorable electron acceptor from the bacteria with favorable redox potentials. Different bacteria have different electron transfer mechanisms poised at different potentials which are in turn affected by the external resistance. In this study we did not use any catalyst to promote the electron transfer between the anode and cathode. While the thermodynamics appeared to be favorable for the biochar anode, there are many internal resistance mechanisms that reduce the potential use of the electron transfer to the cathode from the anode. We used stainless steel mesh to accomplish effect collection and transfer of electrons between the electrodes. In addition, exoelectrogens (electricity producing bacteria) should overcome the resistance posed by the system. TBBS should be operated under optimal conditions for power production at an optimal external resistance to minimize losses. The optimal external resistance usually correlates to the internal resistance of the system. To determine the optimum resistance, After the voltage generation was stabilized, polarization tests were performed at various external resistances. Figure 8 shows the polarization test performed in TBBS with synthetic wastewater (COD of 500 mg/L). The polarization curve showed that the TBBS with synthetic municipal wastewater had an open-circuit voltage of 0.54 V and the corresponding maximum power density generated was 0.45 W/m3.

Synthetic dairy wastewater treatment in TBBS

3 g/L of commercial powder milk was added in distilled water which resulted in a total COD concentration of 2500 ± 30 mg/L. The nitrogen and phosphorus sources were provided in the form of (NH4)2SO4 and NaH2PO4, respectively, in this study. Equivalent NH4+–N concentration of 80 mg/L and PO43− concentration of 20 mg/L were used. The COD concentration is in the range of the concentrations reported in different effluents as shown in Table S1. Dairy wastewater composition, in general, constitutes of 1500–5000 mgCOD/L (Elakkiya and Matheswaran 2013; Mardanpour et al. 2012) depending on the process variations and the discharge point in the process (Farizoglu and Uzuner 2011). The newly made terracotta biochar bioelectrochemical system (TBBS) was used to evaluate COD, ammonium nitrogen and phosphate removal in the dairy wastewater. The system was operated in fed-batch mode. Each cycle was operated for 100 h. First three cycles of the system was operated with distilled water in order to compare the voltage production with DWW and DI water.

Voltage generation

Figure 9 shows the voltage generation profile for distilled water and dairy wastewater. The TBBS was first operated with distilled water and it was observed that for the 1st cycle, the maximum voltage was 0.4 V with distilled water and remained constant at voltage of 0.15 V for about 75 h (Fig. 11). Again, second cycle with distilled water was operated and in this cycle the maximum voltage was decreased to 0.3 V and the minimum voltage of 0.1 V was observed after 50 h of operation. Further operating the system with distilled water has decreased the maximum voltage production to 0.12 V and the minimum of 0.004 V was observed. These results showed that for the operation of this system, potential electron acceptance mechanism embedded in the terracotta-biochar construction materials should be considered. There was an electron transfer mechanisms that was established between the chemical compounds of the synthetic dairy wastewater and the terracotta-biochar materials still augmented by oxygen as electron acceptor at the cathode.

Fig. 9
figure 9

Voltage profile produced by distilled water and DWW

The voltage generation phenomenon using distilled water for the first 150 h of operation can be explained as follows. Soils can hold exchangeable cations (positively charged ions) which is called cation exchange capacity. It is an inherent characteristic of soils and cannot be altered significantly. It influences the soil’s ability to hold onto essential nutrients and provides a buffer against soil acidification. Soils with a higher clay fraction tend to have a higher cation exchange capacity similar to organic matter. Sandy soils rely on the high cation exchange capacity of organic matter for the retention of nutrients in the top soil. Soil’ structural stability, nutrient availability, soil pH and the soil’s reaction to fertilizers and other ameliorants. The cation exchange capacity of the material may have facilitated the electrochemical voltage generation without the contribution from the microorganisms. However, as noted, the potential has faded away once the cation exchange capacity was exhausted.

The five cycles operated with DWW were shown in Fig. 10. 1st cycle of DWW produced maximum voltage of 0.32 V, whereas in 2nd cycle the maximum voltage production was about 0.5 V (Fig. 10). Similarly, the maximum voltage produced in 3rd, 4th, and 5th cycle was 0.56 V, 0.42 V, and 0.40 V, respectively. Considering the maximum voltage produced in 3rd cycle (0.56 V) within 500-Ω load resistor, the maximum power production is equivalent to 0.63 mW and maximum power density produced equal to 1260 mW/m3 or 1.26 W/m3.

Fig. 10
figure 10

Carbon and nutrient removal from synthetic dairy wastewater in TBBS: a COD (mg/L); b ammonia nitrogen (mg/L); and c phosphate removal (mg/L)

The power density is comparable or higher than the values reported in the literature. Pant et al. (2016) reported a power density of 0.25 W/m3 at a COD loading of 2800 mg/L (2.8 kg/m3). The COD removal percentage was 83%. Nimje et al. (2012) reported a power density of 0.4 W/m3 at a COD loading of 1600 mg/L (1.6 kg/m3). The COD removal percentage was 86%. Marassi et al. (2019) reported a power density of 1.33 W/m3 at a COD loading of 5200 mg/L (5.2 kg/m3). The COD removal percentage was 67%. Higher COD loading rates resulted in higher power densities in general (Marassi et al. 2020).

COD removal

COD removal was studied by analyzing the COD concentration in every 12 h and presented in Fig. 10a. About 76% of COD removal was observed within 100 h of operational time, which is in the range of COD removal rates (67% to 87%) reported in the literature (Marassi et al. 2019; Nimje et al. 2012; Pant et al. 2016).

Ammonium nitrogen removal

Ammonium nitrogen removal with time was studied by analyzing the sample ammonium nitrogen concentration every 12 h of operation and the data is presented in Fig. 10b. The concentration of ammonium nitrogen decreased with time and the removal of ammonium nitrogen was linearly correlated with operational cycle time. However, only about 38% of ammonium removal was observed within 100 h of operation.

Phosphate removal

Total phosphate removal with time was studied by analyzing the phosphate concentration in every 12 h of operation and the data is presented in Fig. 10c. The result showed that the phosphate was removed with time and was linearly correlated with time. About 54% of phosphate removal was observed within 100 h.

Evaluation of terracotta-biochar material structure and elemental composition

Figures 11a and Fig. 12a show the SEM images of the bentonite-biochar mixture before and after 500 h of operation. Initially, the surface the mixture is smoother (smaller pores) compared to that after 500 h of operation in the terracotta-biochar bioelectrochemical system. In addition, distinct and heterogeneous pore structure can be found on the mixture after the operation. The mixture appeared to be more granular before the use in the system. Somewhat similar observations were made in a study focusing on different types of ceramic membranes (Merino-Jimenez et al. 2019).

Fig. 11
figure 11

SEM image for surface analysis (a) and EDX elemental analysis (b) of bentonite and biochar mixed material served as anode and cathode before its use in the terracotta-biochar bioelectrochemical system

Fig. 12
figure 12

SEM image (a) and EDX analysis (b) of bentonite-biochar mixed material served as anode and cathode in the terracotta-biochar bioelectrochemical system after 500 h of operation

Figure 11b shows the elemental composition of bentonite and biochar mixed sample. As can be seen, the bentonite and biochar mixed sample contains C, O, Al, Si, Fe, Cu, Mg, Na, Ca, and Cu. The weight (%) for each element in terracotta pot sample is shown in Table 1. The bentonite and biochar mixed sample contained 48%, 29.01%, 9.84%, 7.63, 2.11%, and 0.74% of C, O, Fe, Si, Al, and Ca, respectively.

Table 1 Elements and their percentage in bentonite and biochar mixed material

After operating the terracotta biochar MFC for 500 h, a sample was taken from the anode material (bentonite and biochar mixture) and SEM imaging and EDX elemental composition analysis were performed. Figure 12a shows the SEM image of sample, and Fig. 12b shows the EDX analysis of the sample. As can be seen, the bentonite and biochar mixed sample (after 500 h of experimental time) contains C, N, O, Al, Si, S, K, Fe, Cu, Mg, Na, Ca, and Kr. The weight (%) for each element in terracotta pot sample is shown in Table 1. The bentonite and biochar mixed sample contained 35.26%, 28.67%, 10.69%, 6.80, 5.89%, 5.12%, 1.88%, 1.32% and 1.21% of C, O, Si, Al, N, Kr, S, Fe, and Ca, respectively. After 500 h of operation, few new elements were observed in sample than that of sample before experiment. The new elements are N, S, and Kr (Krypton) with abundance of 5.89%, 5.12%, 1.88%, respectively. 5.89% of N in the sample could be due to the adsorption of ammonium nitrogen (present in synthetic wastewater) by biochar and bentonite mixed sample.

It can be noted that the relative abundance of the essential cations in the materials has increased in the bentonite and biochar mixture. For example, the weight percentage of Ca2+ increased from 0.74 to 1.21% and magnesium has increased from 0.44 to 0.45%, while the essential micronutrients such as Na and K have increased from 0.28 and 0.57% to 1.58 and 0.73%, respectively.

Implications of this study

Terracotta is one type of clay material that can be added to agricultural soils for various benefits such as higher water retention and buffer capacity to pH changes. The clay mineral and organic matter components of soil have negatively charged sites on their surfaces which adsorb and hold positively charged ions (cations) by electrostatic force. This electrical charge is critical to the supply of nutrients to plants because many nutrients exist as cations (e.g., magnesium, potassium and calcium). In general terms, soils with large quantities of negative charge are more fertile because they retain more cations (McKenzie et al. 2004). The addition of terracotta increases the cation exchange capacity, i.e., the exchangeable cations such as cations calcium (Ca2+), magnesium (Mg2+), sodium (Na+) and potassium (K+) in soils. Terracotta and biochar materials used in this bioelectrochemical system recover various nutrients which can be added to agricultural soils to increase the nutrient availability and reduce soil acidity due to these base cations.

Considering the electricity generation potential of the terracotta-biochar bioelectrochemical system, it can be viewed as an additional benefit albeit not substantial. There are numerous applications in which the small amount of electricity generated in these systems can be purposely utilized in agricultural fields, such as soil sensors. This process offers some attractive benefits when compared with the anaerobic digesters such as generating clean electricity without the need for transforming the biogas into electricity (Pham et al. 2006). While conventional wastewater treatment systems, especially nutrient removal systems are tagged as energy-intensive processes, the terracotta-biochar bioelectrochemical system is an energy-positive system as net energy is generated in this process. For example, the most commonly used activated sludge process requires around 1322 kW h per million gallons and trickling filter plants require 955 kW h per million gallons, while this system requires comparatively insignificant external power input for its operation (Khan et al. 2017). It has been estimated that the cost of wastewater treatment for an influent flow of 318 m3 h−1 by a microbial fuel cell would be only 9% (∼$6.4 million) of the total cost of treatment by conventional wastewater treatment plant (∼$68.2 million) (Abourached et al. 2016). With the replacement of construction materials with cheaper and sustainable materials such as terracotta and biochar will make these systems economically more attractive.

Conclusion

This study evaluated the feasibility of naturally available (non-synthetic) sustainable materials such as biochar and terracotta in bioelectrochemical systems to recover energy and nutrients. A summary of experimental studies focusing on the use of these sustainable materials in treating both municipal and dairy wastewater sources was presented. The terracotta-biochar bioelectrochemical system developed in this study has demonstrated on par with other systems reported in previous studies. While the energy recovered from the system is only sufficient for very small applications such as powering sensors, the benefits of nutrient recovery and their potential reuse in agricultural systems are the major advantage. The energy recovery potential can be improved by minimizing the ohmic losses, activation overpotentials, mass transfer limitations and other losses. Further mechanistic studies are required to optimize these parameters so that the energy recovery potential can be enhanced. The role of microbial biofilms and microbiome structure should be evaluated in detail as this system utilizes biochar as the anode surface. Finally, it is evident that field-scale studies demonstrating the potential of these materials are critical for advancing the terracotta-biochar bioelectrochemical system applications in agriculture and wastewater treatment.