1 Introduction

Water is the most important material on the earth’s surface. This important material had unique properties, which are tasteless, odorless liquid at room temperature, and appears colorless in small quantities, but its real color is intrinsic blue color due to slight light absorption at red wavelengths. Water covers 71% of the earth’s plant surface, with 97% being salt water and 3% being fresh water [1]. The greatest cause of water shortage is water pollution which is the biggest and the most dangerous obstacle to humanity’s progress. Water pollutants are pesticides, fertilizers, parasites, bacteria, viruses, pharmaceutical products, nitrates, organic dyes, fecal waste, phosphates, plastics, heavy metals, and even radioactive substances [2]. The following are some of the causes of water pollution: global warming, deforestation, industry, agriculture, livestock rearing, dumping of garbage and feces containing water, maritime traffic, and fuel spillages [3, 4]. One of the most dangerous pollutants is organic dyes, especially azo dyes [5, 6]. Acid Brown 14 (AB14) dye is an anionic poisonous aromatic azo dye that has a chemical formula C26H16N4Na2O8S2 and is one of the extensive marketable azo dyes, which was produced from many resources such as textile, printing, and leather processing industries [5, 6]. The non-biodegradable AB14 dye has adverse impacts on living creatures and the surrounding environment [6]. Many various treatment procedures are utilized for water treatment, depending on the type of treated water. Treated water is divided into different types such as surface water, groundwater, and water containing radionuclides. Groundwater and surface water are treated in the same manner; however, surface water needs to be treated and filtered better than groundwater due to the increased quantity of sediment (sand, clay, silt, and other soil particles), bacteria, chemicals, and hazardous substances in surface water supplies. Water treatment processes are adsorption [6, 7], oxidation procedures (photocatalysis) [8,9,10], ion exchange [11], flocculation/coagulation [6], reverse osmosis [12], chemical precipitation [13], biological treatment [6, 14], advanced oxidations processes [15,16,17,18,19], etc. The adsorption technique is said to be more efficient because it is straightforward, effective, and certain not to produce sludge, guaranteeing a safe ecosystem [20]. The effluents are applied in a controlled manner to the surface of the bio-adsorbent in order to remove them from the water body using the specialized method of adsorption [21]. In comparison to other operations, this one is less expensive. The outstanding qualities of the adsorption process include its versatility and simplicity, both in terms of its design and its operation [18]. Additionally, most bio-adsorbents outperform traditional dye treatment techniques by reducing some of their specific drawbacks, including those related to operating efficiency, total cost, energy use, and the production of unfavorable side effects [20]. Activated biomass-based treatments for the removal of dyes from water are thought to have been used most recently among the different current adsorbents [18].

Nitrogen doping is among the most successful strategies for optimizing activated carbon’s adsorption performance by boosting its electronic conductivity, offering additional ion storage sites, and restriction capacitance [22]. When nitrogen is added into the structure of carbon material, the doped nitrogen atoms induce local stress within the six-membered carbon ring, which in turn deforms the structure of the original carbon [23]. This is because nitrogen has one extra electron than carbon does. The lone pair of electrons that nitrogen atoms carry would delocalize the initial sp2 hybrid carbon skeleton electron cloud. This would result in an increase in electron transport and surface reactivity. Nitrogen atoms have a higher electronegativity (3.04) than carbon atoms (2.55). Simultaneously, doped nitrogen atoms can significantly enhance carbon compound adsorption by giving additional free electrons [20]. Recent research has demonstrated that doping a particular quantity of heteroatoms (such as N, S, or P) into carbon materials not only improves their surface constancy but also increases a portion of their pseudo capacitance, hence increasing their total specific capacity [24,25,26]. The electrochemical interface state and features of carbon surfaces, such as isoelectric point, stability, ion adsorption, contact resistance, and self-discharge, are principally determined by the presence of surface groups on carbon materials [27]. The presence of functional heteroatom groups on the carbon material’s surface is expected to enhance their ion adsorption capacity as well as their hydrophilicity/lipophilicity. As a result, it is believed that modifying the surface properties of carbon materials is an efficient strategy to boost the adsorption capacity of carbon-based materials. Nitrogen doping in carbon matrixes can take several forms. There are two types of doping: in-situ doping and post-treatment doping [23]. In-situ doping techniques include chemical vapor deposition (CVD), laser ablation, and solvent-thermal synthesis. Thermal annealing at elevated temperatures, plasma therapy, and irradiation treatment are all examples of post-treatment doping treatments. The in-situ doping of nitrogen-rich precursors is more sophisticated than the post-treatment doping method, and the amount of doping is less. As a result, the synthesis of high nitrogen-doped carbon materials after post-treatment has gotten a lot of attention [28]. NDACs have been widely used in numerous fields to improve several characteristics and mobility by nitrogen-doped activated carbon. Recently, nitrogen-doped carbon compounds have been identified as potential materials for heterogeneous catalyses, such as catalytic hydro-de oxygenation, which is a key step in refining bio-oil before creating high-value chemicals or transportation fuels [29]. Nitrogen doping protects the pore structure of carbon materials and improves their electrochemical characteristics, making them suitable for use as supercapacitors [30,31,32,33]. Additionally, the metal contained within a nitrogen-doped carbon nanosphere was used as a photocatalyst, opening new avenues for environmental pollution remediation. In general, photocatalysis using solar energy is viable for addressing energy shortages and pollution [34]. With a large specific surface area, nitrogen-doped activated carbon could be an excellent adsorbent for removing contaminants such as phenols from wastewater [35]. Furthermore, N self-doped porous activation carbon can be used as an electro-catalyst in manufacturing [36]. Similarly, activated carbon doped with nitrogen can be employed as a novel material with a high CO2 collection capacity [37]. In this paper, a highly effective N-doping activated carbon (NDAC) was successively fabricated via pyrolysis of a mixture of saw dust/ZnCl2 (2:1) at high temperatures (600 °C, 700 °C, and 800 °C) under a flow of ammonia gas. The fabricated NDACs were tested for AB14 dye removal from water. The fabricated NDACs were investigated using FTIR, TGA, DTA, BET, BJH, MP, t-plot, SEM, EDX, and XRD. Different isotherm and kinetic models were used to study the AB14 dye adsorption process.

2 Materials and methods

2.1 Chemical and instrument

Ethanol (C2H5OH), urea (NH2CONH2), zinc chloride (ZnCl2), and Acid Brown 14 (AB14) dye were obtained from Sigma Aldrich, USA. Saw dust was obtained from a local carpenter in Alexandria, Egypt. Ground fish (60% protein) was obtained from the local market. HCl (30–34%) was purchased from SD Fine-Chem Limited (SD FCL), Mumbai, India. UV–visible spectrophotometer (Analytic Jena, model SPEKOL1300) matched with glass cells of 10 mm optical path was used for dye concentration investigation. Shaker (A JS shaker, model JSOS-500), Thermo shaker incubator (GSSI-100 T sh), Nabertherm B180 Tubular Furnace (RT 50/250/13), and pH meter JENCO (6173) were used for the experimental work. Fourier transform infrared (FTIR: Bruker Vertex 70 linked to Platinum ATR model V-100) and scanning electron microscope (SEM: LEO, 1450VP), coupled with EDX unit.

The BET surface area (SBET) measurements of the biochar were made by N2 adsorption at 77 K using an analyzer instrument (BELSORP – Mini II, BEL Japan, Inc.) [38, 39]. BET [40] analysis of the isotherm was carried out to obtain monolayer volume (Vm) (cm3 (STP) g–1), the surface area (SBET) (m2/g), total pore volume (VT) (p/p0) (cm3/g), (C) energy constant, and mean pore diameter (nm). The average pore-radius was calculated by using the following Eq. (1):

$$r\left(nm\right)=\frac{2{V}_{T}\left(mL {g}^{-1}\right)}{{a}_{s,BET}\left({m}^{2} {g}^{-1}\right)}\times 1000$$
(1)

Also, the micropore surface area (Smi) and micropore volume (Vmi) as well as the mesopore surface area (Smes) and mesopore volume (Vmes) of biochar were determined by Barrett–Joyner–Halenda (BJH) methods, respectively, according to BELSORP analysis program software. Pore size distribution is obtained from desorption isotherm using the BJH method [41].

Thermal analyses were made using the SDT650 at a temperature range of 25 to 1000 °C, at 10 °C per minute, as a temperature ramp under 100 mL/min flow of nitrogen gas [18, 21].

2.2 Fabrication of NDAC

Nitrogen-doped activated carbon (NDAC) was produced by uniformly mixing 100 g saw dust with 50 g ZnCl2 in 600 ml distilled H2O. The uniform mixture was dehydrated in the oven for overnight at 125 °C. The dry uniform mixture was carbonized in a tube muffle furnace under the flow of ammonia gas as a nitrogen dopant to obtain the NDAC, where half an hour is needed to reach the targeted carbonization temperature under the flow of ammonia gas atmosphere. The targeted carbonization temperatures were 600 °C, 700 °C, and 800 °C, and these temperatures were kept constant for 1 h under the protection of an ammonia gas atmosphere. Then, the tube muffle furnace was cooled to 200 °C under the flow of ammonia gas. After that, obtained NDAC was filtered, washed with distilled water followed by a small amount of ethanol, and then refluxed for 2 h with 2 N hydrochloric acid. The refluxed NDAC was filtered, washed with DW and ethanol, and dried at 125 °C in an oven for overnight. Afterward, the NDAC was improved greatly by using sonication. Sonication was performed via using 100 ml of distilled water for 0.5 h, decanting solution, washing with 100 ml ethanol, filtration, and drying. Finally, the needed NDAC was obtained and denoted as NDAC600, NDAC700, and NDAC800.

2.3 Point of zero charge (pHPZC)

The approach outlined in the literature was used to obtain the point of zero charge [42, 43]. Briefly, in 9 flasks, 50 mg of NDAC600 was taken in 50-mL 0.1-M NaNO3 solutions. The preliminary pH solution (pHi) was controlled at six values which were 2, 4, 6, 8, 10, and 12, by adding 0.1 M HCl or NaOH. Then, the six flasks were shaken for 24 h at room temperature. The final pH (pHf) of the supernatant liquid was measured, and then, the difference between the initial and final pHs (ΔpH = pHi − pHf) was plotted against pHi. The pH where the ΔpH is equal to zero was ascribed as pHPZC of NDAC600. The pHzpc value of NDAC600 was found to be 8.2, which meant that the adsorbent is basic together with its net surface charge in solution (Fig. 1).

Fig. 1
figure 1

The pHZPC of the NDAC600 at 25 ± 2 °C

2.4 Acid Brown 14 dye adsorption

A stock solution containing 1000 mg/L of AB14 dye was prepared by dissolving 1.0 g in 1000 mL distilled water. The adsorption study of AB14 dye was carried out using the method of batch equilibrium. The solution was examined for the remaining AB14 dye concentration using a visible–UV spectrophotometer at the wavelength (λmax 475 nm). The adsorption capacities of nitrogen-doped activated carbon can be measured using Eq. (2):

$${q}_{t}=\frac{\left({C}_{0}-{C}_{t}\right)}{w}\times V$$
(2)

where qt (mg/g) is the adsorption capacity of the adsorbent at time t; C0 (mg/L) is the initial concentration of AB14 dye; Ct (mg/L) is the residual concentration of the AB14 dye after adsorption had taken place over a period time t (min); V (L) is the volume in a liter of AB14 dye solution, and W (g) is mass of NDAC adsorbent in gram. The elimination percent of AB14 dye from the solution is calculated by means of the following Eq. (3).

$$Removal\;(\%)=\frac{({C}_{0}-{C}_{t})}{{C}_{0}}\times 100$$
(3)

The pH effect on AB14 dye elimination was examined by adding 100 mg of the NDAC600 to 100 mL of 100 mg/L of AB14 dye solutions with initial pH values of 1.5, 3, 5, 7, 9, and 11. The pH readings of the solution were controlled using the solution of 0.1 M of both HCl and NaOH. The suspensions were agitated at 200 rpm for 2 h at room temperature and were sampled for AB14 dye concentration analysis.

The isotherm study was performed using a 100 mL volume of various concentrations of AB14 dye solutions (100 mg/L, 150 mg/L, 200 mg/L, 250 mg/L, and 400 mg/L) using different weights of NDAC600 (50 mg, 100 mg, 150 mg, 200 mg, and 250 mg). The mixture was shaken at 200 rpm for 10 min, 15 min, 30 min, 45 min, 60 min, 90 min, and 120 min at room temperature (25 ± 2 °C).

The impact of NDAC600 dosage on AB14 dye removal was examined by shaking 100 mL of AB14 dye concentration (100 mg/L, 150 mg/L, 200 mg/L, 250 mg/L, and 400 mg/L) using NDAC600 doses (50 mg, 100 mg, 150 mg, 200 mg, and 250 mg) and monitored at different interval times at room temperature.

3 Results and discussion

3.1 Characterization

3.1.1 FTIR analysis

FTIR was used to determine the functional groups of raw saw dust, raw saw dust/ZnCl2/H2O (2:1:12) dried at 105 °C and NDAC600 (Fig. 2). First, the functional groups of raw saw dust were determined through peaks of FTIR graph. The O–H stretching group of alcohol was found at 3334 cm–1 with a strong broad peak. Raw saw dust possessed a strong sharp peak at 1026 cm–1, which represents C-O stretching of primary alcohol (Fig. 2a). FTIR of raw saw dust/ZnCl2/H2O (2:1:12) dried at 105 °C showed that the peak of O–H stretching for alcohol had become stronger and broader at 3342 cm–1, the appearance of a strong sharp peak at 1619 cm–1 representing C = C stretching of α, β-unsaturated ketone and a strong sharp peak of C-O stretching of primary alcohol at 1054 cm–1 (Fig. 2b). FTIR of NDAC600 represented the introduction of a strong broad peak which referred to C-N = C stretching at 2663 cm–1, the introduction of the medium sharp peak of C = C stretching of cyclic alkene a range of 1567 cm–1 and entrance of strong sharp peak at 1124–1025 cm–1 representing C-O stretching of tertiary alcohol (Fig. 2c) [42,43,44].

Fig. 2
figure 2

FTIR analysis of (a) raw saw dust, (b) raw saw dust/ZnCl2/H2O (2:1:12) dried at 105 °C, and (c) N-doped activated carbon (NDAC600)

3.1.2 Analysis of surface area

Adsorption/desorption results of NDAC600 showed type IV of adsorption/desorption isotherms which referred to the relatively strong interaction between sample surface and adsorbate and NDAC600-owned meso pores. Adsorption/desorption results of NDAC700 and NDAC800 gave type I of adsorption/desorption isotherms which referred to the relatively strong interaction between sample surface and adsorbate. NDAC700 and NDAC800 are microporous nitrogen-doped activated carbons (Fig. 3a). According to BET analysis results, NDAC800 possessed the greatest surface area, monolayer volume, and total pore volume which were 784.49 m2/g, 180.24 cm3/g, and 0.3468 cm3/g, respectively (Fig. 3b). While the NDAC600 results showed the highest mean pore diameter (2.3517 nm). The value of the mean pore diameter indicated that NDAC600 possessed micropores with few mesopores. So, BJH, t-plot, and MP analyses of NDAC600, NDAC700, and NDAC800 were performed. BJH analysis by adsorption illustrated that the greatest pore volume (0.0683 cm3/g) was for NDAC600 and the highest pore-specific area (54.124 m2/g) was for NDAC800 (Fig. 3c). BJH analysis is used for measuring pore volume and pore specific area of NDAC600 because adsorption/desorption results of NDAC600 showed the type IV of adsorption–desorption graphs which indicated the presence of mesopores. BJH analysis by desorption results showed that NDAC600 possessed the highest pore volume and pore-specific surface area which were 0.0509 cm3/g and 20.01 m2/g, respectively (Fig. 3d). The t-plot analysis showed type II of t-plot for NDAC600, NDAC700, and NDAC800, which meant that they possessed homogenous micropores. NDAC800 had the highest specific surface area and pore volume which were 964.87 m2/g and 0.3278 cm3/g, respectively (Fig. 3f). While NDAC600 owned the highest micropore diameter (0.777 nm). MP plot is used for measuring specific surface area and pore volume (Fig. 3e). Because t-plot analysis of NDAC600 showed type II of t-plot and possessed distribution peak, which is greater than 0.7, MP analysis can be used. MP analysis of NDAC600, NDAC700, and NDAC800 showed that the peak was at a distribution peak of less than 1 which meant that most of the pores of NDAC600 are micropores and most pores of NDAC700 and NDAC800 are micropores. MP analysis illustrated that NDAC800 had possessed the best results, which were the highest specific surface area (880.293 m2/g) and pore volume (0.3420 cm3/g) (Table 1).

Fig. 3
figure 3

(a) Adsorption/desorption, (b) BET, (c) BJH by adsorption, (d) BJH by desorption, (e) MP, and (f) t-plot analyses curves of NDAC600, NDAC700, and NDAC800

Table 1 The surface area analysis of the prepared activated carbons

3.1.3 EDAX analysis

EDX analysis of NDAC600 possessed 66% of carbon very high amount of nitrogen which was 21.12%, 4.24% oxygen, no sodium, 5.47% chlorine, and 3.1% zinc. The EDX analysis of NDAC700 consisted of 59.95% carbon, 21.43% nitrogen, 12.16% oxygen, low amount of sodium (0.17%), 5.42% chlorine, and 0.86% zinc. EDX analysis of NDAC800 consisted of 69.26% carbon, 17.99% nitrogen, 4.22% oxygen, no sodium, 5.91% chlorine, and 2.63% zinc (Fig. 4 and Table 2).

Fig. 4
figure 4

EDX analysis of (a) NDAC600, (b) NDAC700, and (c) NDAC800

Table 2 Element analysis of N-AC600, N-AC700, and N-AC800 using EDX

3.1.4 X-ray diffraction

X-ray diffraction (XRD) images showed that NDAC800 possessed the highest intensity (~ 900 counts per second) at 2Theta = 25°, which means that NDAC800 had the highest number of atoms which possessed the highest number of electrons in the unit cell of the examined materials. While the raw saw dust impregnated with ZnCl2 (2:1) had the lowest intensity (~ 400 counts per second) at 2Theta = 22.5°, which means that raw saw dust impregnated with ZnCl2 (2:1) had the lowest number of atoms, which possessed the highest number of electrons in the unit cell of the examined materials. Raw saw dust impregnated with ZnCl2 (2:1), NDAC600, NDAC700, and NDAC800 XRD results showed broad peaks, which meant that they are amorphous materials (Fig. 5).

Fig. 5
figure 5

XRD analysis of raw saw dust impregnated with ZnCl2 (2:1) and its NDAC prepared by pyrolysis at 600 °C, 700 °C, and 800 °C under flow of NH3 gas (100 ml/min) (NDAC600, NDAC700, and NDAC800)

3.1.5 Thermogravimetric analysis (TGA and DTA)

Both TGA and DTA analyses of the raw saw dust and the samples that were impregnated with a 2:1 ratio of ZnCl2 provide a clear picture of the range of carbonization temperatures required to create activated carbon. Figure 6a, b displays the TGA and DTA curves of samples that were impregnated with ZnCl2 and raw saw dust, respectively. Three stages of deterioration are involved in the pyrolysis of raw saw dust. The release of water, including moisture and bound water, as well as light volatile components, is thought to be the cause of the weight loss of 9.632% that is observed in the first phase in the temperature range of 50 to 170 °C. The weight loss in the second phase decreases noticeably (by about 55.15% at a temperature range of 170 to 700 °C), which may be due to the depolymerization of cellulose and hemicelluloses. The last step, which occurred between 700 and 950 °C, displayed a slightly decreasing trend and a weight loss of 22.83%, which may have been caused by the breakdown of the lignin moiety in unprocessed saw dust and the recombination of structure and synthesis of the basic carbon skeleton [44]. At 92.31 °C, 443.85 °C, and 790.25 °C, respectively, the differential thermogravimetric analysis (DTA) curve in Fig. 6a exhibits a substantial triple maximum. This suggests that the initial decomposition of raw saw dust occurred between 90 and 800 °C. The pyrolysis process for the saw dust/ZnCl2-activated sample required four phases, as depicted in Fig. 6b. The weight loss in this stage was twice that of the first stage in the pyrolysis of the saw dust sample, and it occurred between 50 and 155 °C for the saw dust/ZnCl2-activated sample. This weight loss may have been caused by the release of H2O from the biomass. The mass was reduced from 155 to 620 °C more gradually in the second and third stages (21.67% and 27.90%, respectively). Meanwhile, a significant portion of the weight loss was caused by the lignocellulose materials’ breakdown process and the release of moisture from the solid-phase ZnCl2. Around 620–950 °C, the final stage revealed a weight decrease of 6.87%. The entire evaporation of the liquid phase from the ZnCl2 at a temperature above 700 °C is most likely what caused the phenomenon. ZnO was converted to metallic zinc at temperatures greater than 800 °C [45, 46]. The DTA of the saw dust/ZnCl2-activated sample presented in Fig. 6b revealed that the two fundamental peaks at 202.65 °C and 521.36 °C were the largest weight loss rates recorded [44]. It is important to note that as the temperature rises from 700 to 950 °C, the mass continues to decrease because carbon dioxide is being released [47]. This indicates that the activation temperature for saw dust should not be more than 800 °C while it is being subjected to a chemical process. As can be observed in the DTG curve shown in Fig. 6a, the greatest rate of weight loss occurred at around 263.71 °C, 699.96 °C, and 852.36 °C, and it came to an end at approximately 986.95 °C.

Fig. 6
figure 6

TGA and DTA analyses of (a) saw dust raw material, (b) 2:1 impregnated saw dust/ZnCl2 under heating temperature from 50 to 1000 °C under flow of N2 and 10 °C ramp temperature

3.1.6 Scanning electron microscope

SEM image of raw saw dust showed its irregular form and low porosity, as presented in Fig. 7a. While the SEM of NDAC600 showed its high porosity and regular form, which may be attributed to the effect of zinc chloride during pyrolysis and the workup followed the pyrolysis, such as refluxing in 2 N HCl and sonication steps used in its cleaning (Fig. 7b).

Fig. 7
figure 7

SEM image of (a) raw saw dust and (b) NDAC600

3.1.7 Testing of prepared NDACs for the adsorption of AB14 dye

The prepared NDACs (NDAC600, NDAC700, and NDAC800) were tested for the adsorption of AB14 dye from water to select the best one to use for the selected dye removal. The obtained results were reported in Fig. 8. The fabricated NDAC600 reported the highest percentage of removal (84.85%), while the fabricated NDAC700 reported the lowest percentage of removal (31.38). Therefore, the NDAC600 was selected to investigate the AB14 dye removal through this study.

Fig. 8
figure 8

Removal test of AB14 dye using NDAC prepared at different temperatures under NH3 gas flow

3.2 Impact of pH, contact time, adsorbent dosage, and starting dye concentration on AB14 dye adsorption

By controlling the degree of ionization of the functional groups present in the dye, solution pH affects the surface characteristics of the bio-adsorbent and aids in the considerable removal of dye from wastewater. NDAC600 was used at 25 °C and 200 rpm to study how the pH of the solution affected the adsorption of the AB14 dye (Fig. 9a). It can be observed that by increasing the pH of the AB14 dye solution from 1.5 to 11, the removal efficiency of AB14 dye decreases. Results revealed that the maximum adsorption of AB14 dye exists in an acidic medium at pH 1.5 with a removal efficiency of 89.03% [48, 49]. Due to the rise in positive charges at the solution interphase and the more positively charged surface of the activated carbon, the high removal efficiency of the AB14 dye anions in an acidic medium can be attributed to electrostatic attraction. Since the point of zero charge is 8.2, the NDAC surface is attracting the acid proton and will be positively charged as a result of electrostatic attraction with the acid protons. The AB14 dye anions were more attracted to this positively charged NDAC surface in an acidic solution.

Fig. 9
figure 9

(a) Impact of pH on the AB14 dye removal % using NDAC600 (1.0 g/L) and 100 mg/L initial dye concentration. (b) Relation between contact time (min) and AB14 dye removal % of different beginning dye concentrations using 1.0 g/L of NDAC600. (c) Effect of different initial dye concentrations and NDAC600 dose on the qe (mg/g). (d) Effect of different NDAC600 doses on the qe (mg/g) for AB14 dye initial concentrations at room temperature

The contact time effect on the removal of AB14 dye at 25 °C using NDAC600 was investigated in the time ranging between 10 and 120 min (Fig. 9b). It was observed that most of the AB14 dye was removed in the first 10 min with a removal efficiency of 92.49% and reached the equilibrium after 15 min at removal efficiency of 92.71%, and from 15 to 120 min, the removal efficiency of AB 14 dye decreases and increases slightly. The removal efficiency after 120 min was 93.21%. This observation can be explained by the fact that at later stages, all of NDAC600’s active sites were completely occupied as a result of the predominance of intermolecular repulsive force, which was slower than the adsorption of more dyes due to its presence on the surface of AC and in the bulk phase [50,51,52].

At the optimal possible circumstances for the reaction, equilibrium experiments of the removal of the dye AB14 were carried out using starting dye concentrations ranging from 100 to 400 mg/L in an aqueous solution. Batch studies were carried out using an adsorbent dose of 0.5 to 2.5 g, a contact time of 120 min, and a uniform stirring speed of 200 rpm. Figure 9c revealed that the adsorption capacity of AB14 dye by NDAC600 increases with the increase in the AB14 dye initial concentration in an aqueous solution and the decrease in NDAC600 dosage. The adsorption capacity at equilibrium (qe) was 628.779 mg/g at 400 mg/L beginning dye concentration and 0.5 g/L adsorbent dosage. Because of the rise in the dye’s initial concentration, which served as a driving force between the solid phase and the aqueous phase, the uptake of AB14 dye has significantly increased [52,53,54,55].

For the elimination of the AB14 dye, the impact of the adsorbent dose (NDAC600) was examined over a broad range of adsorbent amounts ranging from 0.5 to 2.5 g/L. According to published research, the amount of adsorbent used is a key factor in determining the dye molecules’ ability to bind to water at a specific concentration [56, 57]. It can be detected from Fig. 9d that on rising adsorbent dosage from 0.5 to 2.0 g/L, adsorption capacity at equilibrium (qe) of AB14 dye by NDAC600 decreases from 628.779 to 139.171 mg/g. Figure 9d shows that qe at 400 mg/L as the beginning concentration and 0.5 g/L as adsorbent dosage possessed the highest value which was 628.779 mg/g. This might be a result of adsorption site aggregation, which reduces the surface area of AC and restricts the number of adsorption sites that are available there [58].

3.3 Adsorption isotherm models

Figure 10a-e depicts the Langmuir (LAIM) (Eq. (4)), Freundlich (FAIM) (Eq. (5)), Halsey (HAIM) (Eq. (6)), Temkin (TAIM) (Eq. (7)), and Dubinin-Radushkevich (DRAIM) (Eq. (8)) adsorption isotherms for AB14 dye adsorption [59] (Table 3). Table 4 presents the findings that were obtained from the LAIM, FAIM, HAIM, DRAIM, and TAIM for the AB14 dye adsorption. The Freundlich and Halsey models give the best fit for the adsorption of AB14 on NDAC600, followed by the Langmuir isotherm model, according to a comparison of the R2 values derived from the various adsorption models. The Temkin equation is written as Eq. (7), in which AT and BT are constants, T is the temperature in absolute units, and R is the gas constant. Both the AT and BT Temkin constants for NDAC600 came out to be 0.32 and 95.62, respectively [60]. Langmuir makes the assumption that all of the adsorption sites are the same, and that the adsorption that takes place in active sites is unaffected by the fact that nearby sites may be occupied [61]. The LAIM can be represented by Eq. (4), in which qe is the monolayer adsorption capacity of the adsorbent expressed in mg/g, KL is the LAIM constant expressed in L/mg, and Qm is the monolayer maximum adsorption capacity of the adsorbent (mg/g). As a result, a graph of Ce/qe vs. Ce produces a straight line with a slope of 1/Qm and intercepts of 1/(Qm KL). The FAIM can be expressed as Eq. (5), where KF and n are the FAIM constants, which can be determined by the linear plot of log qe versus log Ce. This linear plot can be used to determine the FAIM constants [62]. As opposed to the LAIM, DRAIM does not assume a homogeneous surface or a constant bio-sorption potential. The DRIM can be represented by Eq. (8), in which β is a coefficient that is related to the mean free energy of adsorption (mmol2/J2), qm is the maximum adsorption capacity, and ε is the Polanyi potential (J/mmol), which can be represented by the equation ε = RT (1 + 1/Ce) [63]. The equation for the Halsey isotherm is written as Eq. (6), where K and n are the adsorption constants for the Halsey model. These constants can be found by examining the linear plot of ln qe versus ln Ce [64, 65].

Fig. 10
figure 10

(a) LAIM, (b) FAIM, (c) TAIM, (d) HAIM, and (e) DRAIM for AB14 dye of starting concentration (100–400 mg/L) on AC 8–600 (1.0 g/L) at 25 ± 2 °C

Table 3 The isotherm models equations
Table 4 Isotherm studies data for the adsorption of AB14 dye of different initial concentrations (100–400 mg/L) using NDAC600 dose (0.5 g/L) at room temperature (25 ± 2 °C)

3.4 Error function

Over the course of many years, the error function (EF) has been utilized as a tool for determining which model best represents adsorption [59, 66]. Their primary applications are to quantify the distribution of the adsorbent, to offer mathematical analysis of the results, and, most importantly, to validate the consistency of the experimental findings that were the driving force behind the development of the adsorption isotherm [67]. Equations illustrating error functions are presented in a condensed form in Table 5 [59]. By dividing the calculated value, the hybrid function fractional error, also known as HYBRID error, can be used to improve accuracy when dealing with low-concentration values. In addition to that, the total number of degrees of freedom that the system possessed was used as a factor in the division. HYBRID can be represented by Eq. (9) [68, 69]. The goal of the average relative error (ARE) algorithm is to reduce the amount of fractional error that is introduced across the entire concentration range. It is possible to present the ARE model as Eq. (10) [70]. The nonlinear chi-square test, also known as the X2 test, is a useful test that can be used to explain whether or not the experimental result histogram matched the expected data. The X2 test is a parametric test that is based on the distribution of the difference from the normal distribution [71]. When it comes to the chi-square test, smaller data values refer to their similarity, while larger numbers refer to the difference in the empirical result. The equation for the nonlinear chi-square test, known as X2, is as Eq. (11) [59, 72]. Researchers from a variety of institutions have reported Marquardt’s percent standard deviation (MPSD) in their isotherm studies. The conclusion can be drawn from the geometric mean error distribution, which is given a name based on the number of degrees of freedom in the system [73]. The MPSD is denoted by Eq. (12) [59, 74]. In spite of the fact that ERRSQ is the error function that is utilized the most frequently [75], the magnitude and squares of the errors tend to increase at the higher end of the liquid-phase concentration ranges, which illustrates a better fit for the isotherm parameters derivation [76]. Sum square error ERRSQ is expressed as Eq. (13) [74]. An increase in the errors will produce a better fit, which will lead to a bias toward the high-concentration data [77]. The method used by the sum of the absolute errors (EABS) is comparable to the ERRSQ function. The equation for the EABS can be written as Eq. (14). The actual and predicted values of adsorption capacity that were used for plotting isotherm curves were compared, and the average percentage errors (APE) were determined in accordance with Eq. (15). This revealed whether or not there was a good fit between the two sets of values [74]. The following Eq. (16) [74] provides a formula for calculating the root mean square error (RMS).

Table 5 EF models used to investigate the applicability of the isotherm models

EF values are shown in Table 6, which proves that the TAIM is the best-fitted adsorption model in that it has the least values of error functions while the HAIM results showed the highest value of error functions. This finding is not similar to the data obtained from the R2 value which showed that the FAIM followed by LAIM were the best-fitted isotherm models. However, most of the error function values showed also that the Langmuir isotherm model could be good fitted with the AB14 dye adsorption data.

Table 6 EF analysis of the adsorption isotherm models (AIM) of AB14 dye of different C0 (100–400 mg/L) using NDAC600 dose (0.5–2.5 g/L) at 25 ± 2 °C

3.5 Kinetic adsorption models

In this study, the pseudo-first-order (PFOM) (Eq. 17), pseudo-second-order (PSOM) (Eq. 18), intraparticle diffusion (IPDM) (Eq. 19), Elovich (EM) (Eq. 20), and film diffusion (FDM) (Eq. 21) kinetic models (Table 7) were utilized, and their corresponding representations can be found in Fig. 11a–e. The PFOM is referred to as the Lagergren equation (Eq. 17) [59, 78], where qt and qe are the amounts of ion adsorbed at time t and at equilibrium (mg/g), respectively, and k1 is the rate constant of the PFOM adsorption process (min−1). For the purpose of determining the first-order rate constant k1 and the equilibrium adsorption capacity qe, the slope and intercept of plots of log (qeqt) versus t were utilized. The PSOM kinetics (Eq. 18) [59, 79] where k2 is the equilibrium rate constant of PSOM adsorption expressed as g/mg min. If the PSOM equation can be used to model the data, a linear relationship will be found when plotting t/qt versus t. If this is the case, k2 and qe can be determined by calculating the slope and intercept of the line. Additionally, the IPDM, denoted by Eq. 19, was tested. Equation (19) [670, 81] can be used to calculate the initial rate of intraparticle diffusion. Here, kdif is the intraparticle diffusion rate constant (mg/g min1/2). Equation (20) of EM makes the assumption that the active sites of the adsorbent are heterogeneous [80]. The EM equation has the linear form (Eq. 20), in which α is the initial sorption rate constant expressed in mg/g min, and the parameter β is related to the amount of surface coverage and the activation energy for chemisorption expressed in g/mg. The slope and intercept of a plot displaying qt versus ln t can be used to determine the constant value. The diffusion of the adsorbate across the liquid film that surrounds the adsorbent particle is represented by Eq. (21) and is referred to as FDM. Equation (21) is used to express FDM, and it specifies that KFD is the external film mass transfer coefficient. The slope and intercept of the line that plots ln (1 – F) against t [81] can be used to derive the value of the constant KFD. In Tables 8 and 9, the parameters that were determined to be relevant for these kinetic models are detailed. The calculated value that was obtained from the linear plot and the experimental value of the PFOM qe did not agree with one another. This finding demonstrates that a PFOM cannot be applied to describe the adsorption of AB14 on the NDAC600. According to Table 8, the R2 value that was generated by the PSOM was extremely close to one. The qe values that were calculated from the PSOM yielded results that were comparable to the qe values that were obtained from experimentation for NDAC600. This indicates that the adsorption of AB14 dye on NDAC600 fits the PSOM well and that the adsorption process is controlled by chemisorption, which involves valiancy forces through the sharing or exchange of electrons between the adsorbent and the adsorbate [82]. To test the hypothesis that mass transfer resistance has an effect on the binding of AB14 dye to NDAC600, the IPDM was used (Table 9). The R2 values for this diffusion model were 0.982 for the adsorption of AB14 dye on NDAC600. For the purpose of describing the kinetics of chemisorption on highly heterogeneous surfaces [83], the EM equation makes use of constants for both adsorption and desorption. The adsorption of AB14 dye on NDAC600 had R2 values of 0.985, according to this EM.

Table 7 The used adsorption kinetic model equations
Fig. 11
figure 11

(a) PFOM plot, (b) PSOM plot, (c) EM plot, (d) IPDM plot, and (e) FDM plot of adsorption of AB14 dye of starting concentration (100–400 mg/L) using NDAC600 (1.0 g/L) at 25 ± 2 °C

Table 8 PFOM and PSOM rate constants and calculated and experimental qe values of adsorption of AB14 dye of 100–400 mg/L initial concentration using 0.5–2.5 g/L NDAC600 dose at 25 ± 2 °C
Table 9 EM, IPDM, and FDM kinetic results of adsorption of AB14 dye of 100–400 mg/L initial concentration using 0.5–2.5 g/L NDAC600 dose at 25 ± 2 °C

3.6 Comparison results of Q m of AB14 dye compared to those found in the literature

The Qm of AB14 dye and other azo dye removal using various adsorbents summarized in the literature were compared to the NDAC600 adsorbent (Table 10). This demonstrated that NDAC600 was effective for the adsorption of AB14 dye. The NDAC600 shows Qm (909.09 mg/g) which are comparable to those reported in Table 5 for various adsorbents for the removal of different dyes. İt was noticed that the NDAC600 was more effective in relation to other adsorbents applied for the removal of AB14 and other azo dyes.

Table 10 Comparison of Qm of AB14 and other different azo dyes by various adsorbents

4 Conclusion

In this investigation, nitrogen-doped activated carbon adsorbent (NDAC) was produced from saw dust, zinc chloride, and ammonia at 600 °C for the removal of AB14 dye. NDAC600 was studied by means of FTIR, TGA, DTA, BET, BJH, adsorption–desorption measurement, MP analysis, t-plot, SEM, and EDAX. It was determined how pH, starting concentration, and adsorption dosage affected the elimination. This study revealed that the adsorption of the AB14 dye was pH dependent, with optimal removal at pH = 1.5 and removal efficiency of 89.03%. This good result was attributable to the electrostatic interaction between the positively charged sites of the nitrogen-doped activated carbon adsorbent and the anionic AB14 dye. In addition, the adsorption process of AB14 dye employing nitrogen-doped activated carbon adsorbent was best described by the pseudo-second-order rate model and the Temkin isotherm model. The Temkin model is selected as the optimal adsorption isotherm model due to the fact that its error values were close to zero. The equilibrium adsorption capacity qe was calculated to be 628.779 mg/g, whereas the maximum adsorption capacity (Qm) was calculated using the Langmuir isotherm model to be 909.09 mg/g. The adsorption process was indicative of monolayer sorption of AB14 dye on NDAC600 with a specific surface area of 281.84 m2/g, a monolayer volume of 64.75 cm3/g, and a mesoporous mean pore diameter of 1.6 microns (2.3517 nm). This study demonstrated that nitrogen-doped activated carbon (NDAC600) adsorbent synthesized from saw dust/zinc chloride under ammonia at 600 °C had made significant progress in mitigating water pollution by removing colors from water in a cost-effective, accessible, and environmentally friendly manner.