1 Introduction

Everybody requires clean and safe drinking water. However, finding the same is becoming increasingly difficult due to population growth, excessive urbanization and industrialization. Even groundwater can no longer be considered ‘safe’ since overuse of agricultural pesticides and fertilizers result in the leaching of several harmful contaminants including nitrate. Nitrate is a highly soluble and stable ion which makes its presence in drinking water quite dangerous and a serious health concern since it can result in the blue baby syndrome [1, 2]. Rural areas where agriculture is the dominant activity are especially vulnerable to nitrate contamination of groundwater. Households in rural India constitute 68% of the total households in the country and at least 65% of these rural households rely on groundwater as a source of drinking water [3]. Thus the removal of nitrate from drinking water is absolutely essential for making it safe for consumption. Further, nitrate is one of the priority pollutants in India under the National Drinking Water Mission.

The most common contaminant identified in ground water is dissolved nitrogen in the form of NO3. Nitrate can be of natural or anthropogenic origin. It is formed by the reaction of atmospheric nitrogen and oxygen due to lightning and large amounts of this atmospheric nitrate can enter soil and water due to precipitation. Anthropogenic sources of nitrate in surface and ground water are agricultural and urban practices like excessive use of fertilizers, presence of septic tanks and discharges of industrial wastewaters from food and metal industries [4]. Nitrate occurs naturally at low levels in most waters but it is particularly prevalent in groundwater that has been impacted by agricultural, commercial, or industrial activities. Of specific concern are crop fertilization activities and discharges from animal operations, wastewater treatment facilities, and septic systems [5]. In other cases, nitrate originates by conversion of organic nitrogen. Ammonification and nitrification are processes that normally occur above the water table generally in the soil zone, where organic matter and oxygen are abundant [6]. Groundwater is particularly susceptible to contamination to a large extent along its flow paths in shallow phreatic or unconfined to semi-confined aquifers which are well connected through a horizontal network of fissures, pores and weathered mantle. In India, in a CGWB survey of 15,640 shallow wells all over India, 2429 wells had nitrate concentrations greater than  45 mg/L which is the drinking water standard for nitrate in India [6]. The national average concentration of nitrate in these wells was 155.9 mg/L (standard deviation of 145.4 mg/L) while the maximum nitrate concentration observed was 1750 mg/L in Jalna, Maharashtra [6].

Guidelines for nitrate and nitrite in drinking water were revised recently by WHO [7]. High nitrate concentrations can lead to the blue baby syndrome [1, 6]. Nitrate should not be more than 50 mg/L as nitrate ion (11 mg/L as nitrate-nitrogen) and nitrite should not be more than 3 mg/L as nitrite ion (0.9 mg/L as nitrite-nitrogen) to prevent the occurrence of methemoglobinemia in bottle-fed infants [7]. This guideline value has been derived from epidemiological studies taking into account the nitrate and nitrite values reported in drinking water in the respective study areas.

Nitrate can be removed from drinking water by adsorption, ion-exchange, heterogeneous catalysis, biological treatment methods, membrane filtration, and electrochemical methods. However, most physicochemical processes either produce a lot of concentrated nitrate rejects whose treatment and disposal become an added problem or form secondary species like ammonia or nitrite which are toxic [8, 9]. Biological treatment can only be applied to waters which have low C:N ratios [8]. Electrocoagulation (EC) is a viable alternative to conventional coagulation (CC) and has several advantages as compared to CC [10, 11]. In EC, the coagulant species, mostly hydroxides of iron or aluminium, are produced in situ which makes it highly effective. The pollutant to be treated is co-precipitated or adsorbed on the coagulant-floc that is formed in solution and is eventually removed either after it settles as sludge or floats to the top [12,13]. EC has been applied widely to remove nitrate from different types of waters including drinking water [14,15,16]. The pH of the solution often increases in EC unlike CC where the pH decreases. Therefore, there is no need for post-neutralization in most cases with EC. The mechanism for EC is simple and no moving parts are required. However, the electrodes need to be replaced from time to time and electricity consumption is greater than in CC.

The general objective of this study was to understand the factors that affect nitrate removal using electrocoagulation, settling, and filtration. Specifically, optimum operating conditions for maximizing nitrate removal using electrocoagulation, settling and filtration were determined. In this study, 27 batch experiments were performed using four types of water to evaluate the efficiency of electrocoagulation for nitrate removal to meet drinking water standards. Operating parameters such as voltage, initial concentration, initial pH, electrocoagulation time and settling time were varied and their effect on nitrate removal efficiency was observed. Experimental results were analysed using MATLAB R2016a and modelled using multiple linear regression equations.

2 Materials and methods

2.1 Sample collection and characterization

2.1.1 Sampling locations

All water samples were collected from the academic cum residential campus of Indian Institute of Technology Kharagpur in Kharagpur, West Bengal, India. The campus lies at the southern extreme of Kharagpur city located in West Bengal, India. The city is famous for having one of the longest railway platforms in the world. It is surrounded by rural areas and agriculture is the dominant activity in this area.

Samples of four different types of drinking waters were collected from different locations as explained below and are shown in the map (Fig. 1):

  1. a.

    Groundwater samples were collected from the tubewell in Dandakaranya pump house, IIT Kharagpur, India. Fresh water samples were collected for each experiment and some were characterized for various water quality parameters. The depth of the tubewell is 250 feet.

  2. b.

    Water from IIT waterworks (water treatment plant) is from river Kansabati. River Kansabati is located around 10 km from IIT Kharagpur. Water was collected from the water treatment plant located inside the campus before treatment.

  3. c.

    Tapwater was taken from the Environmental Engineering and Management lab (EEM lab), Civil Engineering Department, IIT Kharagpur. The water is treated water from IIT waterworks.

  4. d.

    Double distilled water was produced in EEM lab and used for most of the experiments.

Each type of water was collected in clean plastic bottles and preserved till the experiment. Raw (untreated) water samples were collected afresh for each set of experiments.

Fig. 1
figure 1

Map showing various sampling locations in IIT Kharagpur

2.1.2 Sample characterization

Each type of raw water was characterized for alkalinity, hardness, pH, turbidity, conductivity, TDS, Fe, Free and total chlorine as per Standard Methods [17].

2.2 EC experiments

The setup for EC included two mild steel electrodes submerged in a glass beaker (2 L glass beaker) filled with raw water as shown in Fig. 2. The beaker was mounted on a magnetic stirrer (REMI 2ML magnetic stirrer) and conductivity and pH probes (LabQuest, Vernier International, USA) were immersed in the beaker for continuous data acquisition. The dimensions of the MS electrodes were 14.5 × 2.5 × 0.1 cm (Fig. 3) and submerged depth was 6 cm. The effective submerged area of the electrodes was about 97.8 cm2. Previous batch experiments in the same laboratory showed that an inter-electrode distance of 2 cm was optimum for turbidity removal [18]. Therefore, all experiments in this study were conducted with an inter-electrode distance of 2 cm.

Fig. 2
figure 2

Experimental set-up on magnetic stirrer

Fig. 3
figure 3

Electrodes after experiment

The beaker was placed on a magnetic stirrer to facilitate continuous mixing throughout the EC period. The electrodes were connected to a DC power supply (0–30 V and 0–3 A). The raw water was initially spiked with NaNO3 (Merck India) so as to adjust the initial nitrate concentration to the desired value. The voltage was kept constant at a particular value and changes in current, pH, conductivity, turbidity and nitrate concentration were monitored throughout the experiment. Samples were collected every 15 min during the first hour of EC, and then every hour until the end of the experiment. Each sample was filtered through a 0.45 µm Whatman filter before analyzing it for anion concentrations using Ion Chromatography.

Solar experiments were carried out by connecting the two electrodes to the positive and negative ends of a 17 V, 5 W rated solar panel (Solar PV module, Model: SLP005-12). In solar powered experiments, there is no control over the voltage generated since voltage is dependent on sunlight intensity which varies during the day and from day-to-day. Photos of the experimental set-up are shown in Fig. 4a and b. The treated water of this experiment was exceptionally clear as seen in Fig. 4b. All the suspended solids had floated to the top as scum. This phenomenon, called ‘electroflotation’, occurs when the current density is high and a large number of bubbles are generated causing the floc to attach and float up. Sample collection and analysis were done in the same way as in the DC experiments.

Fig. 4
figure 4

a Solar experimental set-up (connected to solar panel on the terrace) b close-up of treated water

A total of 27 experiments (22 of which were performed with DC power supply and 5 were performed with solar power) were conducted using the four types of raw waters. The voltage, initial concentration, electrocoagulation time, settling time and initial pH were varied within certain ranges. Voltage was varied from 10 to 30 V, initial concentration was varied between 45 and 570 mg/L, initial pH from 4.4 to 11, EC time and settling time, both, from 1 to 5 h. These ranges were selected based on experimental results obtained previously in our laboratory.

Electrocoagulation (EC) time is the time for which EC was performed during the experiment. After EC time, the voltage and stirring were switched off and the sludge was allowed to settle. The objective behind doing this was to determine if there was any improvement in nitrate and turbidity removals due to settling.

3 Results and discussion

Electrocoagulation experiments were conducted with four different types of waters: double distilled (DD) water, ground water (GW), tap water, and untreated water from the local water works plant (IIT Water Works).

3.1 Characterization of raw waters

Results of raw water characterization are shown in Table 1. Turbidity of river water was the highest while the pH of groundwater was the highest in these samples. River water samples were taken from the water treatment plant inlet.

Table 1 Characterization of raw waters

3.2 Batch Nitrate experiments with DC power

A total of 22 batch experiments were done and the results are summarized in Table 2. The best removal efficiencies with each of the raw waters are highlighted in bold. Differences in removal efficiencies after EC only and after EC and settling were insignificant in almost all experiments. The final turbidity values ranged from 1 to 115.7 NTU. The average value was 51.9 NTU and standard deviation was 48.9 NTU. The best removal efficiency was observed in Experiment 20 and is described in the next section.

Table 2 Summary of batch experiments for nitrate removal using DC power supply

3.2.1 Experiment 20

The best removal efficiency of 37.0% was observed in Experiment 20 with double distilled (DD) water after EC only and increased to 38.21% after settling, since there were no competing ions to interfere with the removal of nitrate from the raw water. The initial concentration for this experiment was 451.6 ppm and both, EC and settling time were 4 h each. Initial pH was adjusted to ≈10 which increased to 11 while EC was going on and decreased again to 10.7 after settling. Since the voltage applied was low (10 V), the energy consumption was 8.3 Wh/L. The average conductivity was around 1000 µS/cm during the experiment because of the high initial nitrate concentration. Change in anode weight was minimal and high nitrate removal was observed resulting in 53,919 mg of nitrate removed / gram of Fe consumed. The initial turbidity was 0.52 NTU to start with and increased up to 19.8 NTU till EC continued. After that it dropped to 2 NTU at the end of four hours of settling. The final turbidity was well within the limits for drinking water (5 NTU).

3.3 Solar experiments

All solar experiments were performed from 10 am to 4 pm since sunlight was intense during that period. The solar panel was set facing the sun and its position was manually changed twice or thrice per day. A voltage of 14–17 V was obtained during maximum sunlight hours. All solar experiments were conducted with untreated IIT Water Works water and tap water.

The average removal efficiency obtained after EC was 18.51% with a standard deviation of 20.19% while that after settling was 12.78% with a standard deviation of 11.12%. The energy consumed per litre was also substantially lower (5.49 Wh/L), though it should be kept in mind that the sample size is very small. The variability of these experiments is much higher than that of DC powered experiments, though the highest removal efficiency was also much higher than that obtained with DC power. Therefore, coupling the EC apparatus to solar panels seems to have great promise and further experimentation may lead to better results. In 5 solar experiments, the highest removal efficiency of 53% was observed in experiment no. 4 (Table 3) and is described in the following section.

Table 3 Summary of batch experiments for nitrate removal using solar power

3.3.1 Experiment 4—Solar

At a voltage of 14 V, initial concentration of 95.53 mg/L, an EC time of 3 h and a settling time of 5 h, the removal efficiency obtained after EC was 53% (Fig. 5). The removal efficiency decreased as soon as electrocoagulation stopped which is in accordance with the results of Hashim et al. who reported that removal efficiency increased with electrolysis time since a constant amount of coagulant ions are generated [19]. The voltage had dropped down to 10 V between 120 and 180 min. In this experiment, the initial pH was 10.80 and the final pH was 9.24. These results are similar to other studies where the optimal pH range for nitrate removal was between 9 and 11 in one study [20] and 10 and 11 in another study [21]. The energy consumed in this experiment was 6.6 Wh/L. The initial turbidity was 4.4 NTU which stabilized to 58.5 NTU at the end of EC. The final turbidity was 41 NTU. There was a sudden increase in the turbidity during settling which may be due to some disturbance.

Fig. 5
figure 5

Nitrate removal in experiment 4

Results of replicate nitrate experiments shown in Table 2 were analysed for repeatability and the analysis is shown in Table 4. Two sets of experiments with DD water had less variation in comparison to the experiments with IIT Water Works samples. The coefficient of variation was least for experiments 14–15 and very low for experiments 16–18. In all cases, the coefficient of variation for removal efficiency after EC was much less than that after settling indicating greater variability in results after settling.

Table 4 Variability in batch nitrate experiments

Experiments 9–13 (Table 3) were performed with IIT Water Works’ samples and are exact replicates based on experimental conditions. As can be seen in Table 4, removal efficiency in experiment 13 is extremely low and therefore, based on the other results, it is an obvious outlier. Taking only experiments 9–12, the average after EC was 24.7% (standard deviation was 3.29%) and after settling was 25.1% (standard deviation was 5%). These results show that EC experiments for nitrate removal have high replicability.

3.4 Multiple linear regression (MLR) analysis

Experimental results for DD water and DC power were analysed by multiple linear regression using MATLAB R2016a. Several experiments were done with different water types, but regression analysis was done only for experiments with double distilled water since there is no interference due to other ions, compounds or particulate matter.

Five factors which affect the efficiency of defluoridation were chosen based on the literature and our own studies. Thus, five independent (x) and two dependent variables (y) were chosen for analysis. Apart from voltage (x1), initial concentration (x2) and initial pH (x3), two types of ‘time’ were considered – EC time (x4) and settling time (x5) as the independent variables. Two dependent variables, i.e., the removal efficiency after EC (y1) and the removal efficiency after EC and settling (y2) were considered.

All values were standardized prior to analysis by subtracting the mean of all values for a particular variable and then dividing it by the standard deviation, i.e., \({X}_{i}={(x}_{i}-\stackrel{-}{x})/\sigma\) where Xi = standardized value of the variable, xi = the observed value of the variable, \(\stackrel{-}{x} = \) mean of all observed values and σ = standard deviation of all observed values of the variable.

Two statistical models were developed for multiple regression analyses:

Model 1 The first model was used to analyse the parameters affecting removal efficiency after EC, consisting of four independent and one dependent variable. Removal efficiency after EC (y1) was measured immediately after EC was stopped, i.e., before settling started. Hence, in Model 1, settling time (x5) was not considered.

Model 2 The second model was used to analyse all the parameters previously considered in Model 1 as well as the influence of settling time on the total removal efficiency resulting in five independent variables and one dependent variable. In this case, removal efficiency after settling was measured after EC and settling both had taken place. Hence, in this part of analysis, EC time (x4) and settling time (x5) both were considered as independent variables and the dependent variable was (y2).

The general equations for multiple linear regression are as follows:

Removal efficiency after EC: y1 = c1 + a1x1 + a2x2 + a3x3 + a4x4.

Removal efficiency after EC and settling: y2 = c2 + a1x1 + a2x2 + a3x3 + a4x4 + a5x5.

The multiple linear regression equations obtained with standardized values of the variables for Models 1 and 2 are:

$${\text{y}}_{1} = - 2.3{\text{E}} - 16 + 0.33{\text{x}}_{1} + 0.84{\text{x}}_{2} {-}0.05{\text{x}}_{3} + 0.55{\text{x}}_{4}$$
(1)
$${\text{y}}_{2} = - 9.5{\text{E}} - 17 + 0.54{\text{x}}_{1} + 0.38{\text{x}}_{2} + 0.12{\text{x}}_{3} + 1.15{\text{x}}_{4} + 0.34{\text{x}}_{5}$$
(2)

The other parameters are presented in a tabular form below (Table 5).

Table 5 Statistical parameters for Model 1 and Model 2

The R2 and p value of a model are two basic statistical parameters that determine how good a correlation is. R2 indicates how well the model ‘fits’ the data, i.e., the variation, while the p value indicates the significance of the model. In this case, the p value for each term tests the null hypothesis that the coefficients of the independent variables are equal to zero, i.e., that the parameters tested have no effect on the dependent variable. A low p value indicates that the null hypothesis can be rejected. The best scenario is when R2 is high and the p value is low, which means that the model explains a lot of variation within the data and the results are significant. In Model 1, for removal efficiency after EC (Eq. 1), the p value is much lower than 0.05 (at the 95% confidence level) and R2 is 0.9996, which indicates that the null hypothesis is rejected and this model is significant. In Model 2, the second model for total removal efficiency (Eq. 2), a high R2 of 0.9631 was obtained, while the p value is > 0.05. Thus, though the model is a good fit, it is not statistically significant.

The variance impact factor (VIF) gives us a measure of the multi-collinearity of the individual parameters. Severe multi-collinearity (a condition in which predictors are correlated to other predictors in the model) can prove to be a problem since it can increase the variance of coefficient estimates and make the estimates very sensitive to minor changes in the model. In the first model, all independent variables have low multi-collinearity, since the VIF values are close to 1 [22]. However, high multi-collinearity exists in the second model where VIF values are much greater than 1.

Further, since all independent variables were standardized, their coefficients can be compared directly to determine their relative contribution to removal efficiency. From Eq. 1, the most important factor affecting removal efficiency after EC is initial concentration > EC time > voltage > initial pH. These results are similar to those found by other researchers who reported that nitrate adsorption increased with increasing initial nitrate concentration [23,24,25]. They found that adsorption was rapid initially, but then saturated with time. However, some researchers have experimentally found that removal efficiency is indirectly proportional to initial concentration [26].

The model developed for EC removal efficiency for double distilled water (y1) was applied to the experiments performed with other types of water. Non-standardized values were taken so that their units remain the same as the observed values. The data for experiment 1 was not taken as it was an outlier. Good correlation was observed with an R2 value of 0.75 (R = 0.87) Any raw water other than double distilled water contains a certain amount of impurities in terms of dissolved solids, hardness, or co-existing anions. These can lower removal efficiencies which may explain why the R2 is not higher. These results show that Model 1 provides reasonably good predictions for removal efficiencies after EC for all types of raw waters.

3.5 Scanning electron microscopy (SEM)

Scanning electron microscopy (SEM) was performed on the sludge samples and tiny elongated needle-like crystals were seen upon magnification. These crystal structures were present in clusters and are shown in Fig. 6. Further study of the sludge can help us in understanding the chemistry involved in the reactions taking place as EC proceeds.

Fig. 6
figure 6

SEM images of sludge obtained with double distilled water

3.6 Energy dispersive X-ray spectroscopy (EDX) results

EDX spectra for sludge samples were obtained on the basis of areas or points considered. Some nitrogen and oxygen was found in the sludge samples where an area was considered, and relatively less nitrogen was found where point samples were taken. Large quantities of iron and oxygen were present in the sludge samples along with nitrogen and sodium. EDX analysis of the anode scrapings (Table 6) showed oxygen (43%), nitrogen (19.6%), oxygen (43%) and calcium (17.4%) in high amounts along with carbon (10%) and phosphorous (7.3%). This phenomenon suggests that nitrate was being removed primarily by deposition on the electrodes as well as by adsorption on floc.

Table 6 Average Weight Percentages of Elements Found in Nitrate Sludge and Anode Surface

3.7 Cost analysis

For any experiment or method to be useful to the common man or lay person, it has to be economically feasible. The average energy consumption for all the DC powered experiments was 10.86 Wh/L. However, if the 3 experiments which were performed with 30 V are excluded since their removal efficiencies were lower than experiments conducted at 10 V (maximum removal efficiency), the average energy consumption of the remaining experiments was only 7.48 Wh/L. The average energy consumption of all the solar experiments was 5.05 Wh/L, which is lower than that obtained with DC powered experiments. Solar experiment no. 4 in which the highest removal efficiency was obtained had an energy consumption of just 4.4 Wh/L. Thus, parameter optimization can also lead to greater efficiency in energy consumption.

4 Conclusions

After conducting several batch experiments for nitrate removal using different types of raw water and DC or solar power, it is clear that electrocoagulation using iron electrodes can be used for removing nitrate from drinking water and making it safe for consumption. Major findings of this study are:

  1. 1.

    The best nitrate removal efficiencies were obtained at high initial concentrations of nitrate, high EC and settling times and high pH.

  2. 2.

    Optimization of working parameters like initial concentration, voltage, electrocoagulation time and settling time is necessary for further improvement in removal efficiency as well as reduction in energy consumption.

  3. 3.

    The statistical model applied shows that EC time contributes much more to the removal efficiency rather than settling time, and initial concentration is the most important parameter. The statistical model provided reasonably good estimates of the measured values with an R2 of 0.75.

  4. 4.

    The use of solar power coupled with electrocoagulation can substantially improve removal efficiency, decrease working costs and further reduce energy consumption.