Phosphorus, chemical base and other renewables from wastewater with three 168-L microbial electrolysis cells and other unit operations

species such as Na + , K + , Ca 2+ , Mg 2+ and NH 4+ from wastewater. The chemical base remobilized phosphate quantitatively from iron phosphates contained in digested sewage sludge. Phosphate extracts contained ammonia and upon magnesium (Mg 2+ ) addition struvite crystalized. Inductively Coupled Plasma Mass Spectrometry (ICP-MS) on heavy metals, Direct Mercury Analysis (DMA), Liquid Chromatography Mass Spectroscopy (LC-MS/MS) on organic micropollutants, metagenomics sequencing, Scanning Electron Microscopy (SEM-EDS), and X-Ray Diffraction (XRD) indicated that a highly pure struvite-fertilizer was pro- duced. Microbial electricity co-generation was verified by electrochemical characterisation and microbiome analysis using 16S rRNA V4-V5 methodology. Geobacter , Dechloromonas , Desulfobulbus and cyanobacteria were the principal electrogens found. All in all, renewable chemical base as well as phosphate were obtained in high quantities and other renewables became accessible such as the critical material magnesium and other com-https://doi.org/10.1016/j.cej.2020.124502 pounds of importance like ammonia, potassium, calcium, solid P-free sludge useful as biofuel and purified water. In general, the process recycles important compounds from waste, in a close to traceless manner while purifying wastewater.

• Three 168 L microbial electrolysis cells were constructed and used in three locations.
• Renewable phosphate was quantitatively recovered from digested sewage sludge.
• Chemical base, ammonia and other compounds were obtained from wastewater.
• Struvite was analysed with new metagenomics method for microbial contaminants.

Introduction
80% of mined phosphorus rock is transformed into fertilizer and the rest used in many other products [1]. Phosphate rock is extracted in large quantities from daylight mines whose quality declines as deposits of premium quality are no longer available [2]. Most current phosphate mines will reach peak production and become depleted at the end of the century [3]. Significant phosphate production is currently maintained in Morocco, China and USA. Most countries depend on these productions to a considerable degree [4]. Long and short term phosphate shortages endanger sufficient food production. Therefore, many governments seek to stabilize domestic phosphate supply to prepare for an eventual fertilizer shortage [2].
Phosphate is lost to the environment after use and no effective means known to collect it from there. It takes geological times to naturally concentrate phosphate into sediments [5]. A faster phosphate accumulation system are plants growing preferably on marginal land. Therefore bio-refineries are a major option for future phosphate supply [6]. From today's perspective, the best alternative for renewable phosphate supply is digested sewage sludge containing 3-4% elemental phosphorous. This accumulation in WWTPs is the result of iron salt addition to wastewater during treatment to remove phosphate and avoid eutrophication of rivers, lakes and sea shores receiving treated effluents. Various techniques were developed to recover phosphate from FeP type sewage sludge [7]. Unfortunately, all these methods are costly and often not sustainable. Today, most phosphate recoveries of industrial interest are based on the incineration of digested sewage sludge, followed by the extraction of phosphate from the ashes what requires acids that additionally liberate toxic metals. Due to the future legal obligation in Switzerland, Germany and other countries to recover phosphate from waste, mono-incineration furnaces become more and more installed as municipal waste incineration plants are no longer feasible as phosphate is much harder to recover from those ashes. For this reason wet basic phosphate recovery, before incineration, is preferable for better phosphate recovery free of toxic metals as discussed in this paper. Wet recovery approaches are hardly a mature technology and currently out-competed by mono-incineration. A breakthrough is seeked where, in the most ideal process, the potential energy contained in wastewater is used to propel intended wastewater refining to recover phosphate and other compounds.
There is an emerging concept related to microbial fuel cell (MFC) mediated sewage sludge treatment using microbial power generated Fig. 1. A) Multi-product MEC concept sketch for wastewater and sewage sludge refining into soluble phosphate and renewable chemical base as well as for a number of other products, consider that the process in this work was divided into three stages (indicated by the yellow arrows) (see Pilot-MEC dimensions in the materials and methods section). B) Current and proposed MEC based sewage sludge discharge. The central aim is phosphate recovery from sewage sludge before disposal, fulfilling newly issued legal requirements to ensure phosphate supply. The MEC process enables phosphate recycling and sustainable sewage sludge disposal. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) from wastewater to enable phosphate recovery and other compounds contained in wastewater [8]. This approach is unique in its conception as it intends to recover all principal components in wastewater, including other critical materials, and use the energy contained in wastewater (Fig. 1A). In fact, sewage sludge is transformed in a traceless manner into products while cleaning wastewater. Ideally no waste is produced and consequently no landfills needed (Fig. 1B). This bioelectric phosphate recovery process was performed initially with a dual chambered microbial fuel cell. Sewage sludge containing iron phosphate was inserted into the cathode and phosphate was remobilized in up to 82% [8]. However, due to low power densities, phosphate remobilisations lasted between one to three weeks.
The bioelectric phosphate recovery approach has since evolved into several process variants as reviewed by Goglio et al. (2019) [9]. A major acceleration of the MFC based P-recovery process from FeP-minerals was possible by changing the process conditions from MFC to MEC. Now, phosphate remobilisation was faster and completed within hours and became quantitative [10]. In contrast to phosphate remobilisation from sewage sludge, direct isolation from aqueous solutions is another strategy using bioelectric systems (BES). Within a single chamber MEC, an applied voltage deposited phosphate as crystalline struvite on cathodic electrodes. In this manner, 20-40% of phosphate was removed from an MFC anolyte medium [11]. A similar experiment with a single chamber MFC using swine manure resulted in 5-27% of phosphate recovery [12]. Phosphate in municipal wastewater is similarly diluted as in swine manure or cultivation broths usually used in MFCs. 3.4 mg/L of soluble and 0.87 mg/L of particulate phosphorus were found in a typical WWTP [13]. To recover all phosphate despite its low concentration, wastewater is treated with metal salts such as FeCl 3 and others [14]. This eliminates phosphate quantitatively from wastewater and concentrates it up to 7500 times (~30 g/kg) as analyses of digested sewage sludge showed. Agricultural use of such sludge as fertilizer or direct disposal in landfills are more and more prohibited [15]. Therefore, iron phosphate containing sludge is burned and ashes discarded in landfills. One alternative to the current sewage sludge disposal practises is the use of a task specific bioelectric system such as described in this paper (Fig. 1A). It ideally combines phosphate recovery with energy generation from wastewater that contains phosphate [10]. Moreover, the obtained P-free sludge is a biofuel for the production of CO 2 -reduced green cement or heat and electrical power from its combustion (Fig. 1B).
In this work three pilot microbial electrolysis cells (Pilot-MECs) of 168 L each were constructed from polyester with electrodes made from reticulated vitreous carbon (RVC) ( Fig. 2A). The reactors were placed in different WWTPs to generate renewable chemical base from municipal wastewater. The base was transferred to a stirred tank reactor to remobilise phosphate from sewage sludge. The phosphate extracts were converted into an NP-fertilizer. The process was examined for best performance and divided into three stages (I-III) to study an eventual industrialisation. The production of renewable chemical base from municipal wastewater included the analysis of predominant solutes such as calcium, magnesium and ammonia and their impact on phosphate recovery. The renewable chemical base was intended to be of high OH − concentration to enable fast phosphate remobilisation from digested sewage sludge containing FeP. Resulting alkaline phosphateammonia mixtures were examined for direct struvite crystallisation upon magnesium addition. To assess fertilizer purity, toxic heavy metals, microbial contaminants and micropollutants were assayed. The copowering microbiomes of the Pilot-MECs were characterized by polarisation curves and 16S rRNA V4-V5 sequencing method. The accumulation and isolation of additional renewable chemicals was examined in view of refining wastewater into products in a traceless manner.

Pilot microbial electrolysis cell construction
Pilot-MEC construction plans were realized with CAD software (Inventor 2015). As the stability of larger bioelectric reactors was largely unknown to us a compartmentalized structure with an external holding steel frame was designed to ensure structural stability and permit limited maintenance in case of problems while running it constantly. Three Pilot-MEC reactors were built in a polymer workshop of Lonza Ltd. in Visp (Switzerland). Transparent Simolux PETG polyester polymer (Simona, Germany) was chosen for the body of the reactor. The Pilot-MEC was based on a shared/common anolyte chamber of 168 L (2.42 m long, 31.6 cm large, 34.6 cm high) (Fig. 2E). The channel like anodic compartment had an inclined bottom for sand and other particle sedimentation to keep membranes and anodes functional during the base production process. A Pilot-MEC was a stack of 32 MEC units with cathodes of 40 mL each. The cathodes (Fig. 2F) were attached at the outside of the 2.4 m long anodic chamber and interconnected as a cascade by polyurethane tubing. In each cathodic chamber a RVC (ERC aerospace corporation, USA) electrode (4.9 × 2.8 × 0.5 cm 3 ) was fixed. In the adjacent anodic compartment, a total of 96 RVC anodes (10.0 × 8.5 × 0.5 cm 3 ) were organized as 32 sets of anode triplets (Fig. 2D). The cathodes were separated from the anode by Nafion N117 cation exchange membranes (Ion Power, Germany). 0.98 L to 1.48 L of aqueous catholyte was filled into the cathodic cascade including an expansion flask after the last cathodic unit. The catholyte was recirculated (< 32 mL/min) with a peristaltic pump (Watson Marlow 400, 2.5-50 rpm, USA) through the cathodic cascade until the expected pH was reached. The pH was monitored in the expansion flask with a pH probe (InPro 4250 SG of Mettler Toledo, Switzerland). Once the reactor was assembled, the 32 RVC cathodes were directly platinized by electrodeposition in the reactor's cathodes.

Installation of pilot-microbial electrolysis cells in three wastewater treatment plants
The newly constructed Pilot-MECs were deployed to three different Swiss municipal WWTPs (Fig. 2B). The first one to Châteauneuf-Sion, where it was placed in a room with reduced daylight. The second Pilot-MEC was transported to Martigny-WWTP (24 km from Châteauneuf-Sion) (Fig. 2C), it was installed in a dark machinery room. The third Pilot-MEC was placed in the Worblental-WWTP (85 km from Châteauneuf-Sion) outdoors with the biological lagoons; during the winter the Pilot-MEC was moved into a nearby room. In all three locations wastewater from the respective clarifiers was fed to the reactors.

Stage I: renewable chemical base from pilot microbial electrolysis cell
A parallel electrical circuit was set up with the 32 MEC units of the Pilot-MEC and connected to a Thurl PL330 power supply (32 V-3 A) (Thandar Instruments, UK) (Fig. 2G). An applied potential of 2.5 V (rarely 6.0 V) was maintained until a high catholyte pH resulted. Electrolysis currents were calculated from potentials recorded by a VC-960 digital multimeter (Voltcraft, Germany) over a 10 Ω resistor (Voltcraft Resistor R-Box, Germany) by the Ohm's law (I = U/R).
Wastewater was fed continuously (0.2 mL/min), semi-continuously or in batch mode to the central anodic compartment (~145 L). The 32 MEC cathodes were supplemented or newly filled with 0.98 L to 1.48 L demineralised water. In some cases the cathodes were purged with 5 L demineralized water before new experimentation. Under an applied voltage (usually 2.5 V) the catholyte was enriched with cations (mostly Na + , K + and NH 4 + ) from the anode while generating chemical base (OH − ). Mg 2+ and Ca 2+ also migrated through the membrane but precipitated with the generated hydroxide as Mg(OH) 2 and Ca(OH) 2 . In semi-continuous production, fractions of 300-500 mL highly basic solutions were harvested and replaced with demineralized water. In all process modes, the catholyte was recirculated at 25 mL/min passing through all cathodes and the expansion flask (Erlenmeyer of 500 mL

Stage II: phosphate remobilisation from wet iron-phosphate digested sewage sludge
Phosphate remobilisation from wet digested sewage sludge was performed in a 10 L jacketed stirred tank reactor (Orb 10 L Jacketed Reactor, Syrris Ltd) with external heat exchanger (VC F20, Julabo GmbH). Stirring, pH, temperature, and sludge loads were chosen in view of experimental needs. Initially, commercial caustic soda (NaOH pellets) was used in reference experiments at the 5-L scale (semi-renewable process). Process parameters corresponded to model conditions as performed at 50 mL scale, to examine if kinetic data matched [16]. Then, self-produced renewable base (5 L per batch) from the Pilot-MEC with a pH = 12.6-13.0 was used accordingly (fully renewable process). Up to 100 g/L of dewatered digested sewage sludge as obtained from respective WWTPs (dry matter content of 28.6 to 30.0%) was added and the suspension mechanically stirred (400-800 rpm) at 25°C and in specific cases at 50°C. At defined times, samples were taken and phosphorus content determined by ICP-OES (Varian 720-ES ICP Optical Emission Spectrometer). Once phosphate was remobilised, the biphasic suspension was separated with a tubular centrifuge (CEPA / Carl Padberg Zentrifugenbau GmbH), the nozzle was set to a 3 mm diameter with a flow rate of 500 mL/min and centrifuged at 35000 rpm

Stage III: struvite crystallisation from phosphate-ammonia mixtures
Phosphate-ammonia-hydroxide solution as obtained from phosphate remobilisation (Stage II) was subjected to struvite crystallisation [17,18]. 5 L of reaction mixture as obtained from Stage II was filled into a cylindrical flask and stirred at room temperature (22°C). Concentrated 0.1 M HCl was added to lower the pH to 9.0. Alternatively, the pH was regulated by CO 2 bubbling at 100 mL/min until the required pH was reached. Then a 1.2 equivalent of MgCl 2 ·6 H 2 O was added (> 98%, Fluka Chemicals, Switzerland) per mole of phosphate. Ammonia (NH 3 ) concentrations were used as extracted in Stage I and the content not adjusted; it corresponded usually to a 2.5 fold excess in respect to phosphate concentrations. The crystallisation occurred while stirring (6 h/180 rpm/22°C) and then the mixture was kept idle overnight. The resulting crystals were centrifuged (Awel Centrifugation MF 20-R, Awel Industry) for 15 min at 7500 rpm/22°C and dried overnight at < 40°C in a laboratory oven (FN 500, Blanc-Labo SA, Switzerland).

Heavy metal, micropollutant and microbial contaminant analyses
Heavy metals: Elemental quantification of toxic metals was performed on sewage sludge, liquid extracts and fertilizers with Inductively Coupled Plasma Optical Emission Spectroscopy, ICP-OES (Varian 720-ES). For higher precision ICP-Mass Spectroscopy, ICP-MS (NexION 300D, Perkin Elmer) was used. For mercury a Direct Mercury Analyser (DMA) was employed.
In ICP analyses, 50 mg of dried digested sewage sludge, struvite crystals or other material was weighted into a screw cap Teflon container and 5 mL of 69% HNO 3 was added. The mixture in the sealed container was heated by microwave induction to 120°C during 2 min. The temperature was further increased to 160°C within 5 min and maintained for 20 min before analysis with the respective ICP method.
Mercury content was determined with a DMA 80 (Milestone Srl., Italy). Here 100 mg of material was heated in the DMA to 650°C for 12 min vaporizing all Hg, which was then co-condensed with Au as amalgam on a gold trap and quantified after reheating with an AAS-Hg detector.
Microbial contaminants: they were analysed with a metagenomics method described in the respective section below. The 16S rRNA V4-V5 enabled to detect also hard to cultivate microbial contaminants and species, respectively. The isolated DNA material indicated the quantity of overall probable microbial contaminations, which was verified with rarefaction plots from the metagenomics data analysis.
Micropollutants: Twelve recommended organic micropollutants were searched (ENVILAB AG, Switzerland) ( Table 6). These micropollutants were known to be contained in wastewater and considered problematic by Swiss authorities while no regulations about allowed concentrations exist for renewable fertilizers. The struvite samples containing expected micropollutants were dissolved with nanopure water and analysed by LC-MS/MS (ISO certified). The detection limit was 0.3 ng/g of micropollutants in struvite (1.5 ng/g for less well detectable micropollutants).

X-ray diffraction and scanning electron microscopy
Powder x-ray diffraction spectroscopy (XRD) for structural identity was performed with a D8 Discover Bruker AXS diffractometer, using non-monochromatized Cu-Kalpha radiation in Bragg-Brentano geometry. Obtained data were fitted with the Le Bail method. Scanning electron microscopy (SEM) and energy dispersive x-ray spectroscopy (EDS) was employed for elemental composition analysis using a SEM-FEG LEO1525 scanning electron microscope (Zeiss) with a EDX SMAX 20 detector (Oxford Inst.) at 20 kV and 8.5 mm WD. The samples were coated with~20 nm of gold using a SCD 050 sputter coater (Baltec).

16S rRNA sequencing
Biofilm samples from the three Pilot-MECs located in the WWTPs Sion (Châteauneuf), Martigny and Ittigen (Worblental) were analysed for their microbiomes. DNA material was extracted and send to the IMR-Next-Generation-Sequencing (NGS) facility to perform 16S rRNA V4-V5 amplicon analyses (IMR = Integrated Microbiome Resource at Dalhousie University, Canada). Biofilm samples were taken with sterile swabs (MW104, Dryswab™) and a sterile spatula was used (sterilized with ethanol) to break out small RVC-Anode parts to ensure the inclusion of electrogenic microbes attached to the RVC's surface. The sampling was performed on 5 out of 96 anodes in the MEC unit drawers 1, 4, 8, 12 and 16 (counting them from the wastewater entry point of the Pilot-MEC ( Fig. 2D and E). The sampling was performed on anode surfaces in vicinity to Nafion membranes. The rRNA/DNA extraction was realized with a FastDNA™ Spin Kit for soil samples (MP Biomedicals, USA). At least 1 ng/µL of DNA was prepared for sequencing and verified by DNA quantification using a Qubit TM dsDNA HS Assay Kit (Introgen, Switzerland).

Overview on the three-stage phosphate recovery from wet digested sewage sludge
Phosphate recovery from wet sewage sludge was well possible but not free of challenges. The phosphate recovery with the Pilot-MEC had in quint essence to overcome Ca 2+ interferences. Calcium was abundantly contained in wastewater and just scarcely released from digested sewage sludge. For an industrialisation Ca-interference has to be controllable. The work showed that the Ca-problem was resolved to a high degree and the engineering of quantitative phosphate recovery from wet sewage sludge is possible at the pilot level by the newly developed three-Stage process ( With the optimized triple-Stage processing a total of 97% of phosphate was recovered from sewage sludge using optimal parameters. However, in practice, when using renewable base the efficiency was somewhat lower. The results showed that further process integration is possible in order to enhance sustainability and recycling aspects of the process by generating other renewable products at the same time (Fig. 1A).

Renewable chemical base, solutes and other materials from pilot microbial electrolysis cells
The pilot microbial electrolysis cells generated renewable chemical base (OH − ) containing seven well present compounds: Na + , K + , Mg 2+ , Ca 2+ , NH 3 , Mg(OH) 2 and Ca(OH) 2 (Stage I, Table 1). An important catholyte pH rise was possible due to restricted proton migration preventing expected neutralisation in the cathode. The reasons for the major proton retention were threefold. There was a retarded release from anodic biofilms and slow transport in the electrolyte [19]. Another important cause was the carbonate buffering of wastewater used as anolyte. As a consequence, the retained protons were replaced by other cations (M n+ and NH 4 + ) present in wastewater [20]. Nevertheless, protons were transported with ammonium through the Nafion membrane and neutralized with cathodic hydroxides to form ammonia and water (NH 4 + + OH − → NH 3 + H 2 O) (Fig. 4D). This reaction reduced the electrochemical base generation efficiency. The neutralisation-loss accounted by theory for up to 20%, when estimated from ammonia concentrations found in wastewater. The degree of the adverse ammonia mediated neutralisation with just produced chemical base depended on process duration and was in general not significant and reduced the efficiency in the best case only by 3-4%. Coincidentally, ammonia was a welcomed component in struvite generation (Stage III) and remained in solution due to its polarity [21,22]. Ammonia was present in a 2.5 fold excess in view of ortho-phosphate concentrations. This was largely sufficient for direct struvite crystallisation. Ammonium recovery with the MEC process (Fig. 3) potentially reduces ammonia removal (denitrification) cost, which was estimated here to be about 15% if all wastewater passes through the MEC. The renewable base contained with potassium a third important fertilizer macro component beside N and P. Potassium was not isolated as it is not a depleting resource and served like Na + as counter ion in generated renewable chemical base leading to NaOH/KOH mixtures (Fig. 4A). The third kind of cationic species were Ca 2+ and Mg 2+ , which migrated into the cathodic chamber and precipitated due to the basic catholyte as Mg (OH) 2 and Ca(OH) 2 (Fig. 4A). With a basicity above pH = 12, Mg(OH) 2 was fully precipitated due its low solubility product (K sp(Mg(OH) 2 = 5.61 × 10 −12 ) [23]. Conversely, Ca(OH) 2 precipitated from the same mixture but only~70% was recovered = 1.9 g of Ca(OH) 2 . Magnesium precipitated quantitatively with 850 mg of Mg(OH) 2 at a pH of 12.8 (per 1.5 L of catholyte). Ca 2+ fully precipitated when a pH above 13 was reached (Fig. 4A). The difficulty to recover 100% of calcium was related to the solubility of Ca(OH) 2 even under very basic conditions, K sp(Ca(OH)2 = 4.02 × 10 −6 [23]. Magnesium is a critical material [24] while calcium has no immediate value. Nevertheless, calcium hydroxide is useful in cycling heat Table 1 Renewable chemical base (OH − ) generated in 168-L Pilot-MECs with municipal wastewater as anolyte. Experiments were performed with 2.5 V of applied potential. storage systems [25]. Moreover renewable Ca(OH) 2 would lead to CO 2 free cement production. The dehydration of Ca(OH) 2 into CaO is CO 2free and requires less energy than the clinker process transforming CaCO 3 into CaO liberating CO 2 . In addition, phosphate free sewage sludge resulting from phosphate recovery during the MEC process (Stage II) is a CO 2 -neutral biofuel and also useful in cement fabrication where waste biofuel-sludge is traceless discarded (Fig. 1B). Mg(OH) 2 , Ca(OH) 2 as well as the MgCa(OH) 4 mixtures [26] are suitable for phosphate fertilizer production (Fig. 3). Yet, the isolation of the Ca (OH) 2 and Mg(OH) 2 was difficult as the Pilot-MEC architecture was not laid out to deal with these precipitates in a quantifiable manner. It was recoverable upon applying a specific wash procedure. More research is needed to investigate this recovery aspect by an improved cathode design. All in all, there are renewable side products that are recoverable while isolating phosphorous from sewage sludge with an MEC.

Phosphate recovery from iron phosphate contained in digested sewage sludge
Phosphate remobilisation from sewage sludge was scaled-up (Stage II) 100 times from model experiments [16]. At the 5-L scale phosphate remobilisation was performed initially with commercial chemical base (NaOH). It was the first of two process types examined, called the semirenewable process consisting of sewage sludge and commercial chemical base ( Table 2). This reaction was performed in a stirred 10 L jacketed reactor with a heat exchanger to execute the process under standard conditions for later comparison with model and experiments realized under fully renewable conditions ( Table 3). The obtained results matched with the established model [16], indicating that linear scale up is possible. Remobilisation experiments with renewable chemical base produced with Pilot-MECs (fully renewable process, Table 3) led to somewhat lower phosphate remobilisations than under semi-renewable conditions ( Table 2). The remobilisation effectiveness drop, in the fully renewable process, was related to Ca 2+ -traces present in the renewable base and not yet understood interferences with other solutes such as NH 3 and many additional trace compounds (Table 3).
In the scale-up process, dewatered sewage sludges from WWTPs were mixed in defined proportions with commercial or renewable chemical base. Against initial assumptions, no sludge pre-treatment was needed confirming reflections made from model experiments that sludge milling was not needed [10,16]. The renewable base rapidly dissolved FePs in sewage sludge and no physical pre-treatment was needed. The sludge's surface area was from this finding considered porous and/or FePs preferably found at the particle surface, a kinetically insignificant hurdle in contrast to rate determining parameters such as base concentration, stirring and temperature. These later parameters were essential to accelerate the recovery process if correctly adjusted (Fig. 5). The reaction rates depended in the first place on a high pH > 12.7 which should not drop below 12 during batch processing. As an example, in the successful phosphate remobilisation reaching 92.9% of phosphate recovery (Table 3, Entry 6) hydroxide consumption was 71%. Beside reduced yields at lower pH more toxic metals were potentially released from processed sludge what had to be avoided. It was therefore concluded that the pH at the end of the remobilisation process should not drop below pH = 12. The second important kinetic parameter was stirring, which was more decisive than  seen in smaller scale model experiments [16]. The reason was that mechanical stirring was more effective than magnetic stirring in model experiments. The mechanical stirring was enhanced from 400 rpm to 800 rpm. An initial increase of 200 rpm reduced the phosphate remobilisation time by a factor > 2 (Fig. 5D). Temperature rise was equally influential (Fig. 5C) but not recommended as heating consumes more energy than stirring. All in all, phosphate remobilisation was scaled up and became close to quantitative.

Struvite identification, toxic metals content, microbial contaminations and micropollutants
X-ray powder diffraction spectroscopy identified obtained crystals clearly as struvite (Fig. 7A, Table 4). SEM analysis confirmed that struvite crystals were obtained (Fig. 7C-F) and EDS results showed that only minor quantities of potassium and calcium were enclosed in the crystalline struvite powder (Fig. 7B). High purity is required for products made from renewable phosphate as private consumers, the food   industry and others are reluctant to adopt renewable products made from waste [27]. Struvite was considered in the proposed process (Fig. 3) as an appropriate fertilizer generated from phosphate-ammonia mixtures as obtained in Stage II. MgCl 2 was added to phosphate containing solutions and the basicity adjusted to pH = 9 using HCl solution or CO 2 bubbling. After single crystallization struvite contained minor quantities of unwanted heavy metals as indicated by ICP-MS and DMA assays ( Table 5). The ICP-MS enabled to accurately quantify critical metal pollutants such as: Zn, Cu, Cr, Ni, Pb, Cd, and Hg (Table 5). Low levels of metal contaminants were detected in the produced fertilizer and the analysed samples (A and B) were purer than required by legislation [28]. The reason for the high purity from toxic metals was related to three factors (i-iii): (i) The renewable chemical base contained no relevant quantities of toxic metals as the strong base precipitated many cationic contaminants during base production. (ii) Similarly, toxic metals in sewage sludge remained enclosed in the sludge matrix during phosphate remobilisation or were reprecipitated like the highly concentrated Fe 2+/3+ (Fig. 1A and materials section). (iii) Struvite crystallisation reduced metal content further leading to low levels of toxic metal contaminants in crystalline struvite (Table 5). Micropollutants were equally examined by LC-MS/MS in struvite. It contained 10 out of 12 specifically screened micropollutants that are of interest in WWTP effluents as mentioned by Swiss legislation to protect the environment (Table 6). In contrast to micropollutants in wastewater, there were no standards found for renewable fertilizers. The analysis was therefore performed similarly to an effluent analysis by dissolving struvite samples in nanopure water. The low quantities (0.6-13.0 ng/L) of detected micropollutants were in line with observations made for struvite generated directly from wastewater. In these investigations micropollutants did not adsorb on struvite crystals, what explains the low levels of micropollutants found in the struvite (Bagnes and Worblental) ( Table 6). Nevertheless, the detected micropollutants were probably adsorbed on impurities that became inclusions due to imperfect crystallisation [29]. The central question was, if generated struvite could be used in agriculture. This was not possible to answer due to the lack of a legal basis for such fertilizers. In addition, there is a large variety of possible micropollutants in renewable fertilizers and the question, which to search and being problematic remained unclear at this stage of investigation. To illustrate how broad this question is can be seen with the work of Hospido et al. (2010) [30]. They reported about micropollutants in sewage sludge and how to eliminate them. Only two of them were equally detected in our struvite samples ( Table 6, entries 2 and 5). Comparing phosphorous equivalents with micropollutants in well treated sewage sludge and in analysed struvite, it contained one to two magnitudes less micropollutants than expected in sewage sludge. This indicated that an unproblematic use of such fertilizers should be possible. But field trials have to be conducted to understand if recrystallization or other purification measures are needed to ensure safe agricultural use [30].
Microbes were the third kind of contaminants and neither regulated by legislation or covered by related investigations. Viable microbes were not expected due to the high pH process. However, spores and debris thereof could not be excluded. To detect all possible microbial contaminants DNA material was extracted and metagenomic analysis performed using 16S rRNA V4-V5 methodology. This procedure was not applied before for microbial contaminant examination in struvite. The analysis resulted in a qualitative assessment of microbial pollutants (Fig. 8). DNA material extraction from struvite for later NGS analysis showed that only minor microbial contaminants were present with 24.1 ng/mg (Bagnes) and 5.9 ng/mg (Worblental) of DNA material. By a DNA mass comparison with sewage sludge there was a reduction of 83.9% and 96.4% of DNA material in struvite. The isolated DNA content in struvite corresponded to some degree to micropollutant quantities assayed in the same fertilizer samples (Table 6). This low microbial pollutant content was confirmed by low flat alpha rarefaction plots for the two samples. The detected contaminants in the phylum were Firmicutes and Proteobacteria (Fig. 8). On the genus level Lysinibacillus, Solibacillus, Brevundimonas and Bacillus. Firmicutes and Proteobacteria are not toxic and were found before to enhance plant growth due to their capacity to resist toxic metals and even accumulate them [31].

Calcium interference in phosphate remobilisation, origin and prevention
From the five principal cations (Na + , K + , Ca 2+ Mg 2+ and NH 4 + ) in renewable chemical base, only Ca 2+ jeopardized phosphate remobilisation (Stage II). Ca 2+ combines well with phosphate to form CaPs such as apatite (Ca 5 (PO 4 ) 3 OH) and others which reprecipitate into sewage sludge matrix and limit recovery [32]. The kinetics for CaP precipitation during phosphate remobilisation appeared slow when using pure Ca-free chemical base. This corresponded to observations made before [10]. Conversely, experiments with renewable chemical base from Pilot-MEC contained measurable calcium concentrations, which were significant enough to precipitate all remobilized phosphate and no phosphate was recovered (Table 3, Entries 1-2). Therefore, Ca 2+ traces had to be eliminated from renewable chemical base before phosphate remobilisation. This measure enabled high phosphate recoveries using the fully renewable process (Stage II) ( Table 3, Entries 5-6). While calcium contaminations in renewable chemical base became controllable, sewage sludge was a second source of Ca 2+ contaminations. Digested sewage sludge contained Ca 2+ bound in the sludge matrix in an unknown manner, which was slowly released. To understand the kinetics of Ca 2+ release from sewage sludge, a representative sample containing 35.7 g Ca 2+ per kg of sludge was examined by dialysis. Ca 2+ release was slow as expected and therefore confirming the idea of not interfering in case of fast phosphate remobilisation processing (Table 3). An ICP-OES based elemental analysis supported the kinetic observations as it indicated a 1:1 stoichiometry of Ca 2+ and Table 5 Heavy metals in produced struvite according to ICP-MS and a) DMA analyses. Bold numbers are initial heavy metal contents in sewage sludge, which were superior to legally allowed concentrations in renewable fertilizers. b) Legal limits for heavy metal content in renewable fertilizers [28].

Calcium trace removal from renewable chemical base
Bivalent calcium and magnesium cations were contained in sizable quantities in all municipal wastewaters (see materials section). They readily diffused through Nafion membranes into the cathodes and precipitated there as a mixture of calcium and magnesium hydroxides. The precipitation became more complete the higher the pH rose (Fig. 4A). Against initial concerns, there was no relevant Ca 2+ and Mg 2+ precipitation inside the cation exchange membranes nor on top of them using 2.5 V of applied voltage that reduced the membrane's permeability for Na + and K + . Increasing the voltage to 6.0 V the membranes became clearly covered with Ca(OH) 2 and to a lesser extent by Mg(OH) 2 on the cathodic and anodic side ( Fig. 6C and D). The reactors capacity to generate renewable chemical base was reduced as seen from dropping electrolysis currents. Deposits were equally found on RVC cathodes (Fig. 6E). Excessive Ca(OH) 2 deposits in the cathodes were removed preferably with 1 M acetic acid to re-establish the Pilot-MECs performance to a good degree.
Renewable chemical base contained most of the time Ca 2+ traces while no Mg 2+ impurities were observed. Ca 2+ failed phosphate recovery fully when present in higher concentrations (Table 3, Entries 1-2). However, besides being a thread to the phosphate remobilisation process, Ca(OH) 2 and Mg(OH) 2 are potential resources being recovered from wastewater with the MEC process. Magnesium in particular is a critical material while calcium has far less value. It is noteworthy, that renewable calcium hydroxide from wastewater-MEC is of interest for green cement production.
Ca-trace-removal from renewable chemical base was examined with four methods i-iv: (i) integrative Ca 2+ removal consisting in generating very basic catholytes of pH > 13. However, reaching such high pH values required prolonged processing time (Fig. 4A) and no measure, except higher applied voltages, was found to speed up the base generation process. The prolonged processing was needed as illustrated by comparing the logarithmic pH and the concentration axes in Fig. 4A.
(ii) Conversely, a complete Ca 2+ elimination was rapidly possible from solutions with a pH = 12.8 by adding Na 2 CO 3 to the renewable chemical base. Here Ca 2+ traces were removed as CaCO 3 precipitated due to a lower solubility product (K sp(CaCO3) = 1.5 × 10 −7 [33] than K sp(Ca (OH)2 = 4.02 × 10 −6 [23]). (iii) Another removal method consisted in exchanging Ca 2+ with Na + which was attached to an Amberlite resin. This proved convenient for larger volumes of catholytes (1.5-5 L). (iv) Finally, an explorative Pilot-MEC related method was the use of CO 2 (Fig. 3). CO 2 was bubbled through the renewable chemical base, removing Ca 2+ traces forming CaCO 3 precipitate as described in point (ii). It was envisioned as a means to recycle CO 2 produced within the anodic compartments of the Pilot-MEC (Fig. 3). The four methods (i-iv) showed that Ca 2+ can be removed and recovered from renewable chemical base generated in a Pilot-MEC. It was attempted to evaluate the most economic calcium removal process among the four methods. CO 2 bubbling was considered as most effective in case CO 2 was obtained directly from the MEC process or eventually the WWTP that produces CO 2 in excess due to the methanisation of sewage sludge. CO 2 bubbling was comparable to NaHCO 3 addition. Conversely, NaHCO 3 has to be purchased enhancing production costs. The removal of Ca 2+ by the electrochemical method was seen to require considerable applied power ( Fig. 4 A and B), longer reaction time and Ca(OH) 2 deposits on the membranes and cathodes were an inevitable complication due to higher pH values. The Amberlite cation exchange method required regeneration what was found to be simple but required an acid as a simple exchange with NaCl or KCl was not efficient enough. Moreover, Amberlite use needs to be compatible with wastewater as heavy metal adsorption is expected, implying related regeneration efforts as an unknown factor. Therefore, the integrative use of CO 2 as depicted in Fig. 3 remained the most interesting method. This was in line with sustainability and possible process economics.

Microbiomes and power, similarities and differences among three Pilot-MECs
The biofilms in the three Pilot-MECs grew self-organized from microbes contained naturally in respective municipal wastewaters. Electrogens and other microbes became attached during acclimatisation by the application of an external voltage (1.0 V) what was verified by polarisation experiments (Fig. 6A and B). The voltage contribution of the biofilms to the electrolysis was 0.56 V. The mature biofilms were exposed to Pilot-MEC production conditions of usually 2.5 V, set as optimal as a series of experiments indicated (Fig. 4B) with three anodes what was equally found to be optimal from experimental trials (Fig. 4C). The applied voltages turned bioanodes stronger as concluded from polarisation experiments visible as higher power maxima after base generation.
To understand the biofilms electrocatalytic properties, the anodic microbiomes were analysed by the 16S rRNA V4-V5 method with biofilm samples collected after 9-12 months of Pilot-MEC use. 15 out of 288 bioanodes were examined. This resulted in five qualitative metagenomic sample analyses of different sections of the Pilot-MEC. The data showed variable but mostly a repeating microbiome pattern (Fig. 9).
As expected a large number of anodic microbes were detected in the different Pilot-MECs. The phylum was dominated by Proteobacteria with 42-74% indicating the presence of electrogenic microbes [34] (Fig. 9A). The next sizable phylum were Bacteroidetes with 7-27% and thirdly Firmicutes with 2-18%. Unexpectedly, cyanobacteria were detected on the anodes in the Pilot-MEC of the Worblental WWTP with 7-24%, in particular Euglenozoa (3-30%). No cyanobacteria grew in the Pilot-MEC in the Châteauneuf WWTP while in the Martigny Pilot-MEC traces (0.37%) were detected. The fact that cyanobacteria grew only in the Worblental Pilot-MEC was related to its daylight exposure. This was possible because the reactor was constructed from transparent polyester and placed outside by the treatment lagoons in the summer season. In the two other WWTPs, the Pilot-MECs were operated the whole time in the dark (Martigny) or much reduced daylight (Châteauneuf).
Cyanobacteria were reported before to be electrogenic [35], however, the existence of cyanobacteria in MFCs is not widely discussed and from a conceptual perspective a curiosity [36]. Cyanobacteria generate unwanted oxygen what is a conflicting faculty endangering growth and survival of many other electrogens. This problem is known and examined for Geobacter which is usually deactivated by oxygen [37].
More detailed information about anodic biofilms was obtained from genus data (Fig. 9B). The 16S rRNA V4-V5 method provided here for 60% of detected species a conclusive identification. More than half of the genus belonged to microbes with a relative abundance superior to 1%. The rest (40%) consisted of incomplete genus information (Fig. 9B, grey bars). The high number of microbial species on the bioanodes of the three Pilot-MECs was expected and presumably required to digest diverse organic waste compounds found in municipal wastewaters. It is noteworthy, that some of the expected electrogenic microbes were found. This concerned in particular Geobacter which was present in two of the three Pilot-MECs. Geobacter was absent in the third Pilot-MEC (Worblental-WWTP) probably due to the presence of cyanobacteria as considered already from phylum data. The same presence-absence pattern applied to Dechloromonas which grew in the two "Geobacter reactors" (Châteauneuf and Martigny) and not in Worblental Pilot-MEC. The absence of Geobacter and Dechloromonas in the latter Pilot-MEC confirmed the hypothesis that cyanobacteria's oxygen release was the probable cause for the absence [37]. The third well present electrogene was Desulfobulbus which grew in all three Pilot-MECs providing facultative anaerobic properties [38,39].

Phosphate recovery economics
The economic analysis was performed for typical MEC utilisation with an applied potential of 2.5 V. To simplify the analysis, the process was divided into several unit operations: base production, base filtration to remove calcium and magnesium hydroxides, precipitation of calcium traces, phosphate remobilisation, struvite formation and isolation (Fig. 3). The specific electricity consumption to generate 5 L of  base (pH = 12.80) with an applied potential of 2.5 V was experimentally determined as 14.5 kWh/kg NaOH (Fig. 4E). Considering an electricity price 10 cts per kilowatt-hour [40], the formation of 0.32 mol of hydroxide was 1.83 cts (including ammonia isolation). In the filtration step, the potential benefits from calcium and magnesium hydroxide recovery were assessed. The amount of each recoverable compound/element from 5 L of base of pH = 12.80 was determined, there was 2.80 g of Mg(OH) 2 and 3.28 g of Ca(OH) 2 . The average market price was 0.235 CHF/kg [41] for the first and 0.18 CHF/kg [42] for the latter, the potential benefits for their sale would be 0.18 cts for 5 L of base. For the phosphate recovery process calcium traces have to be removed from the base. The chemical removal required the addition of 4.15 g of Na 2 CO 3 (0.16 CHF/kg [41]) for a total cost 0.07 cts. Even though the addition of sodium carbonate is costly, there are 3.92 g of calcium carbonate that was recoverable from this step, with a potential benefit of 0.12 cts based on a market price for CaCO 3 of 0.30 CHF/kg [41]. After the remobilisation process, a maximal quantity of 9.28 g of phosphate (PO 4 3− ) was recoverable (with 5 L of base) from dehydrated Phylum and genus were identified by 16S rRNA V4-V5 and represented in coloured bars. Not identified genus above 1% are plotted as light grey bars and named according to the next higher taxonomy classification. All genus < 1% are represented as a single dark grey bar = "others". Anode identification: Châteauneuf anodes: S1 to S5, Worblental W1 to W5 and Martigny M1 to M5.
sewage sludge and converted into struvite yields to 23.5 g of fertilizer.
However, struvite formation caused additional costs due to the use of carbon dioxide gas (0.015 CHF/m 3 [43]) and magnesium chloride addition (0.295 CHF/kg [41]). The extra cost for the production of struvite was estimated to be 0.34 cts (0.01 for the CO 2 and 0.33 for the MgCl 2 ). When adding all costs and potential benefits together a global production cost of 0.83 CHF per kilogram of struvite was estimated. This estimated production cost did not include filtration, centrifugation and drying, manpower and fix costs. The struvite market price varied at the time of calculations between 188 and 763 $/ton [44]. This corresponds to an average market price of 0.465 CHF per kilogram of struvite. The economic balance of the process after struvite sale was thus −0.36 CHF/kg. By comparison, if caustic soda was bought (0.40 CHF/ kg [45]) on the market instead of MEC self-production, the production cost for one kilogram of struvite was estimated to be 0.36 CHF, which turns the economic balance to 0.11 CHF per kilogram of struvite. With a reuse of magnesium and calcium recycling the price could equally be reduced, what has to be considered in future work. This analysis showed that the MEC based process needs to become more performant in order to be competitive with current daylight mining of phosphate rock sediments.

Conclusions
A three-Stage (I-III) phosphate recovery process using digested sewage sludge as phosphorous source was developed. The phosphate recovery was efficient with up to quantitative phosphate remobilisations using wet sewage sludge. Beside phosphate recovery, renewable chemical base was generated from wastewater, which is an alternative to the chlorination process employed in the chemical industry. In addition, there was co-accumulation of ammonia, magnesium and calcium, potassium as well as sodium in the Pilot-MEC cathodes. Phosphate remobilisation was up to quantitative at high pH > 12. Sludge particle size was not influential on reaction rates enhancing process feasibility. Elemental analysis showed that obtained struvitefertilizers fulfilled legal requirements in view of toxic metals. Other contaminants were 10 organic micropollutants in low concentrations as well as minor microbial contaminations.
All in all, the newly developed three-Stage phosphate recovery process is of interest for quantitative phosphate recovery from wet sewage sludge containing iron phosphates. In addition, it is suitable for the extraction of other chemicals and materials from wastewater such as: ammonia, critical magnesium, calcium, potassium, P-free biofuel and pure water.

Declaration of Competing Interest
The authors are University employees and have no conflicts of interests with the submitted work.