1 Introduction

Organic dyes were proverbially used in spinning, leather, printing, pharmaceutical and other industry [1, 2]. But the dyes wastewater produced a great threat to human health and ecological environment. Therefore, it is necessary to remove the organic dyes from the wastewater. The dyes removal methods include chemical oxidation [3], photodegradation [4], ion exchange [5], adsorption [6,7,8,9,10] and membrane separation [11]. Among them, a promising method to purify contaminated water is generally adsorption by porous polymers [12,13,14,15,16,17] due to its simple operation process, low cost, effective and no toxic intermediates. The traditional adsorbents such as activated carbon [18, 19], chitosan nanoparticles[20], molecular sieves [21], SiO2-Co core shell nanoparticles [22] and Cr-doped ZnO [23] were the most commonly used in industrial wastewater treatment because these materials have a good affinity for anionic or cationic organic dyes such as MO or MB [24]. However, a problem that cannot be ignored faced by these traditional porous adsorbents was low adsorption capacity and complicated preparation process. Hence, it is necessary to develop new types of adsorbents with high adsorption capacity for dyes in industrial wastewater.

Recently, hyper-crosslinked porous polymers (HCPs) has attracted much attention by researchers due to its ultra-high surface area, rich pore structure and diversified synthesis methods [25,26,27,28]. Generally, the removal efficiency and selectivity for dyes mainly depends on the functional groups of the adsorbents. For instance, Wang et al. [29] proposed heterocyclic-modified hyper-cross-linked polymers (HCLPs) for the adsorption of phenol due to the possibly exist acid-base interaction between the phenol and the embedded N, O, and S atoms. Guang et al.[30] prepared oxygen-containing functional groups into porous organic polymer, which can not only improve its hydrophilicity, but also provide a strong interaction with dye molecules. Song et al.[31] prepared carboxyl-modified hyper-cross-linked polymer (HCP-COOH) to remove various water-soluble contaminants. Wu et al.[32] prepared covalent triazine frameworks (CTFs) for high-efficient removal of anion dyes. However, the conventional modification method introducing a lone pair of electron nitrogen atoms onto the porous adsorbents was often using the post-modification technology, which has many disadvantages such as complicacy, substrate dependently and a high throughput of waste production. At the same time, some expensive monomers, sparse metal catalysts, and multi-steps for synthesis is also limited. Thus, searching for sustainable methods to synthesize functionalized porous materials for extract dyes efficiently from aqueous solutions was farther significant.

Tan et al. have successfully developed a new type of “knitting” method to synthesize hyper-crosslinked porous polymers (HCPs)[33]. The preparation of HCPs is mainly based on Friedel-Crafts reaction, which involves the aromatic building blocks as an external crosslinker [34, 35]. Various type of aromatic monomers can be used to develop polymer networks with a variety of pore structures due to its simplicity and the variety of synthetic methods. Moreover, the conventional synthetic methods of HCPs required low-cost reagents, and easy to control reaction conditions result in production of high yield products. The diversity of the building blocks coupled with the different synthetic approaches make HCPs into a valuable platform for the exploration of new porous organic polymers. This may be enormous potential to solve challenging energy and environmental issues. However, as far as we know, the carbazole-based functionalized hyper-crosslinked porous polymer synthesized by the “knitting” strategy have not been reported.

In this work, we used the carbazole and pyrrole as the aromatic building blocks, the formaldehyde dimethyl acetal (FDA) as an external crosslinker and the anhydrous FeCl3 as catalyst. Through one step Friedel-Crafts alkylation reaction, the above aromatic building modules were directly knitted by the methylene bond into a carbazole-based hyper-crosslinked porous polymer (HCP-CP) with a high surface area and predominant microporosity. The adsorption behaviors consisted of pH effects, adsorption isotherms, adsorption kinetic and recycling of adsorbent HCP-CP were evaluated in detailed. The results showed that the novel carbazole-based hyper-crosslinked porous material can be a species new kind and highly efficient dyes adsorption material.

2 Materials and methods

2.1 Reagents and materials

All chemical reagents are commercially available and the purity of reagents are AR. Carbazole (96%), pyrrole (99%), anhydrous ethanol (99.7%), anhydrous methanol (99.5%), dichloromethane(99.5%), sodium hydroxide (96%), hydrochloric acid (36%), methyl orange (MO, IND,96%), methylene blue (MB, IND,90%), Rhodamine B (RB, IND,90%), Reactive brilliant blue (NR, IND,90%), 1,2-dichloroethane (99%), anhydrous ferric chloride (98%), formaldehyde dimethyl acetal (FDA) (98%) were all shopped from Aladdin Reagent Co., Ltd.

2.2 The preparation of the carbazole-based hyper-crosslinked porous polymer (HCP-CP)

As shown in Scheme 1, the carbazole (8mmol 1.3374 g) and pyrrole (8mmol 0.5550mL) dissolve in the 1,2-dichloroethane (DCE, 40mL) into a double-necked flask. Then add 3mL formaldehyde dimethyl acetal (FDA, 32 mmol) and anhydrous FeCl3(16mmol, 2.59 g) into the above solutions under nitrogen atmosphere. The commixtures were heated up to 80℃ and the reaction was then continued stirring for 24 h. When the reaction was over, collected the products and washed repeatedly with anhydrous methanol until the filtrate becomes clear. Then the filtered crude sample was depurated by Soxhlet extraction with methanol for 24 h. The sample was dried in vacuum at 80℃ for 12 h to obtain HCP-CP adsorbent.

Scheme 1
scheme 1

The synthesis route of carbazole-based hyper-crosslinked porous polymer HCP-CP

2.3 Characterization of HCP-CP adsorbent

The crystalline of the sample was determined by X-ray powder diffraction method. The X-ray powder diffraction (XRD) data was collected on a D8 ADVANCE X-ray diffractometer (Bruker) by CuKα (λ = 0.154 18 nm) at room temperature. A scanning electron microscope (SEM) was used to be characterized the shape of the sample. A transmission electron microscope (TEM) was used to show the transmission image of the material. The thermal stability of the sample was analyzed by a thermogravimetric differential thermal analyzer in a nitrogen atmosphere with a heating rate of 10 ℃/min and a heating value of 800 ℃. Fourier transform infrared spectrometer (FTIR) was applied to characterize the structure of the sample. Nitrogen adsorption-desorption experiments were carried out on specific surface area analyzer Micromeritics ASAP 2460 at 77 K. The specific surface areas were calculated using the Brunauer–Emmett–Teller (BET) method and the Langmuir method.

2.4 Adsorption experiment

The 3 mg HCP-CP adsorbent was added into a volumetric flask containing 6mL different kinds of dyes (such as MO and MB) with different concentrations under mechanical shaker at 150 rpm for 12 h. The primitive pH of dyes solution was regulated by acceding 0.1 M HCl or 0.1 M NaOH. After completed of adsorption, the solution was filtered through 0.22 μm microporous PTFE membrane. The residual concentration of dyes was determined by Uv-visible spectrophotometer at the corresponding absorption wavelength of the different dyes (λMO = 465 nm; λMB = 664 nm). The pH value was regulated as 2,3,4,5,6,7,8,9,10 with a concentration of 50 mg/L (MO) and 100 mg/L (MB). A series of dyes initial concentrations ranging from 20 to 1000 mg/L were applied to adsorption isotherm tests. The adsorption time in the mechanical shaker was 5 min,10 min, 15 min, 30 min, 60 min, 90 min, 120 min, 150 min, 180 min, 240 min, 300 min, 360 min, respectively at a concentration of 50 mg/L (MO) and 100 mg/L (MB) to adsorption dynamics tests. In order to enhance the accuracy of the experiment, all experiments were set up three parallel experiments.

The adsorption capacity (qe), dyes removal percentage (R%) of the adsorbent were calculated by the following equations:

$${q_e} = \frac{{\left( {{C_0} - {C_e}} \right) \times V}}{m}$$
(1)
$${\text{R}}\% =\frac{{\left( {{\text{C}}o - {\text{C}}e} \right)}}{{{\text{C}}o}} \times 100\%$$
(2)

Where C0 (mg/L) indicates the initial concentration of dyes. Ce (mg/L) and qe (mg/g) respectively indicate the concentration and amount of adsorbed dye molecules at equilibrium.

2.5 Desorption-adsorption cycle experiment

In order to investigate the reusability of adsorbent, 25 mg adsorbent was put into a volumetric flask containing 10mL with the representation of anionic dye MO (C0 = 50 mg/L, pH = 6, t = 120 min) and cationic dye MB (C0 = 100 mg/L, pH = 8, t = 150 min), respectively. At the end of the adsorption, the dyes loaded with HCP-CP adsorbent was washed with deionized water. Then the above polymers desorbed by different eluent, such as 1 M HCl, 1 M NaOH, anhydrous ethanol, anhydrous methanol and 1,2-dichloroethane. Then the used sample was gathered by filtration, vacuum dried at 80℃ for 12 h and the sample reused for the next cycle adsorption.

The desorption efficiency was calculated as the percentage of the mass of the analyte in the dyes desorbed to the elution medium of the total mass of the analyte adsorbed on the adsorbent. The above cycle was repeated 5 times.

3 Results and discussion

3.1 Characterization of HCP-CP adsorbent

To characterize the chemical structure of HCP-CP, we have performed the infrared spectrum of the adsorbent. As shown in Fig. 1(a), the main absorption bands come from the stretching and bending vibration of carbazole ring at 600-1500 cm− 1. The characteristic peak at 1570 cm− 1 is attributed to the stretching vibration of C-N in carbazole ring, and the vibration peak at 1690 cm− 1 is the vibration peak of C = C double bond. C-H vibration of aromatic ring and aliphatic hydrocarbonis at 2930 cm− 1 and N-H vibration is at 3460 cm− 1. Furthermore, the solid state 13 C cross-polarization magic-angle spinning (CP/MAS) NMR (Fig. 1(b)) was confirmed its structure. The resolved resonance peak at 148.6 ppm arises from the aromatic carbons bonded to the carbazole nitrogen [36]. Two peaks at 123.7 and 110.6 ppm can ascribe to the other carbons in the aromatic rings. Most importantly, the signal at 37.5 ppm indicates the methylene carbon formed by the Friedel-Crafts alkylation reaction. Thus, the carbazole and pyrrole were successfully knitted to get the polymer HCP-CP.

Fig. 1
figure 1

(a) FTIR spectra of the porous polymer HCP-CP; (b) 13 C CP/MAS NMR spectra of HCP-CP

The morphology and crystalline nature of the polymer HCP-CP was examined by SEM, TEM, and XRD. As can be seen from Fig. 2 (a), the morphology of HCP-CP has a good uniformity and forms a clustered spherical structure with a relatively regular shape with sub-micrometer particles. TEM image of Fig. 2 (b) further confirms the SEM result. The HR-TEM images (Fig. S1, Supporting Information) show that the polymer HCP-CP possess amorphous microporosity. In addition, from XRD (Fig. S2(a), Supporting Information) observation and analysis, it strongly confirms that the HCP-CP material has an amorphous structure. Thermal gravimetric analysis (TGA) shows that HCP-CP was comparatively stable (Fig. S2(b), Supporting Information). As can be seen, the first loss of HCP-CP at 100 ℃ may be caused by the loss of solvent molecules outside the pore. The second weight loss occurs at 100-346.3 ℃, which may be due to the gradual loss of guest molecules in pore size. After the second weightlessness, the mass of HCP-CP can remain above 85%, which shows that HCP-CP has good thermal stability. The third weight loss at 346.3℃ is caused by the skeleton collapse of HCP-CP amorphous material. It is worth mentioning that the polymer HCP-CP is insoluble in dilute solutions of NaOH and HCl, as well as common organic solvents, such as dichloromethane, acetone, methanol, THF and DMF, indicating the good chemical stability of the HCP-CP adsorbent.

Fig. 2
figure 2

(a) The SEM image of the porous polymer HCP-CP; (b) the TEM image of HCP-CP

The characterization of the porosity of the material HCP-CP was through nitrogen adsorption-desorption isotherms at 77 K. As shown in Fig. 3(a), the original sharp increase of absorption at low pressure (p/p0 < 0.1) is unique to the type I isotherms, i.e., a significant microporous character. The hysteresis loops up to a relative pressure above 0.9 indicates the macropores and interparticle voids [37]. The existence of a minimal hysteresis in the N2 desorption curve of the polymer HCP-CP suggests a partial mesoporous character. In microporous polymer, this behavior is usually ascribed to the swelling effects of the polymer networks while coming in contact with the adsorbate gas. Moreover, the pore size distribution (PSD) curve (Fig. 3(b)) is calculated based on the nonlocal density functional theory (NDFT) further confirms the HCP-CP mainly the presence of micropore (~ 2 nm). As summarized in Table S1 (Supporting Information), the BET specific surface area of HCP-CP is 486.75 m2·g− 1, which is conducive to improving the dyes adsorption capacity.

Fig. 3
figure 3

(a) The N2 adsorption–desorption isotherms of HCP-CP;(b) the pore size distribution of HCP-CP

3.2 The effect of pH on adsorption of methyl orange and methyl blue by HCP-CP

The adsorption of dye solution by pH value plays a key role in the whole adsorption process [38]. As can be seen from Fig. 4(a), at the pHzpv = 5.8 (zero potential value), the HCP-CP charged of surface has zero net charge. When pH value (pH < pHzpv) is low, the surface of the polymer HCP-CP will be protonated and thus gain positive charge, which is increase the ability to anionic pollutants to a certain extent [39]. When pH value (pH > pHzpv) is high, the surface of the polymer HCP-CP will be negatively charged due to deprotonation, which is conducive to the adsorption of cationic pollutants.

From the Fig. 4(b), the removal percentage of MO by adsorbent HCP-CP increases with the increase of pH at the low pH, which is owing to the H+ on the surface of polymer HCP-CP gradually decreases and the competitive adsorption sites are reduced. With increasing pH, the color of the MO dye solution becomes yellow under both neutral and alkaline conditions. When pH reached pHzpv, the maximum removal percentage of MO was up to 94.32%. Keep raising the pH, the removal percentage of MO reduce, which is the presence of more excess OH ions which interfere the balance of the anionic dyes and compete with the dye anions for adsorption sites. In order to facilitate do the experiment, the optimal pH value for the MO adsorption is 6. However, for the MB adsorption, the pH effect trends are different from the MO adsorption. When pH = 2 ~ 8, the removal percentage of MB increase with the increasing of pH, which due to the increase of deprotonation degree of HCP-CP surface functional groups, leading to the increase of MB removal efficiency. When pH = 8 ~ 10, the removal percentage decreases with the increasing of pH. When pH = 8, the removal percentage reaches the maximum value. At pH 8, the HCP-CP can be acquired negative surface charges, and as a result causing a strong electrostatic attraction between negative surface charge of HCP-CP and MB cations [40,41,42]. Hence, in the following experiments, pH 8 is adopted for the adsorption of MB and pH 6 is adopted for the adsorption of MO.

Fig. 4
figure 4

(a) The pH effect on the zeta potential of the HCP-CP, (b) The pH effect on MB and MO adsorption performance on HCP-CP (MB concentration: 100 mg/L and MO concentration: 50 mg/L)

3.3 Study of the adsorption kinetics by HCP-CP

The different adsorption times (from 1 to 360 min) of MO and MB solution by the polymer HCP-CP were studied. As shown in Fig. 5, in the initial period of adsorption, the removal percentage of MO and MB by the HCP-CP adsorbent increases rapidly, and then slowly. In the initial stage, the particular layered porosity of the polymer is contributed to the rapid dispersion of dyes in the kinetic adsorption. And most of the empty surface adsorption sites can be used for adsorption. When the contact time reached 120 min, the adsorption capacity of HCP-CP to MO began to be constant. When the contact time reaches 150 min, the adsorption capacity of HCP-CP to MB begins to be constant. Therefore, the MO and MB adsorption equilibrium time was 120 and 150 min, respectively.

Fig. 5
figure 5

The curve of different adsorption times of MO and MB on the polymer HCP-CP

Analysis of the adsorption kinetics of HCP-CP, the adsorption data of MO and MB was fitted by using pseudo-first-order kinetic model and pseudo-second-order kinetic model. As show in the Fig. 6 and Table S2 (Supporting Information), the correlation coefficients R2 obtained by the pseudo-second-order model is higher than that of the pseudo-first-order model at 298 K. This indicates that the availability of adsorption sites directly effects of MO and MB on HCP-CP adsorbent.

Additionally, the processes of MO and MB adsorbed by HCP-CP adsorbent were analyzed using the intra-particle diffusion equation. Using the slope and intercept of the linear fitting plots (Fig. S3, Supporting Information), Table S3 summarized the calculated parameters of this model. The adsorption of MO and MB adsorbed by HCP-CP adsorbent can be divided into three parts, namely, outer surface diffusion, intra-particle diffusion and adsorption equilibrium [43, 44].

Fig. 6
figure 6

pseudo-first-order (a) and pseudo-second-order (b) kinetic model adsorption of MO and MB

3.4 Study the adsorption isotherms by HCP-CP

The different original concentration of MO and MB solution adsorption by the polymer HCP-CP at different temperatures were studied. As can be seen from Fig. 7(a) and (c), as the concentration of the adsorbed material increases, the amount of adsorption of the adsorbed material also increases. This is because that with the increase of the original concentration of MO and MB there are more adsorption sites on the surface of the adsorbent to combine with dye ions, resulting in the increase of adsorption capacity. When the initial concentration of MO or MB reaches a certain concentration, the adsorption capacity increases gently. This is because the adsorption sites on the surface of the adsorbent reach equilibrium, the available adsorption sites gradually decrease, and the adsorption capacity tends to saturation[45]. Besides, the adsorption capacity of MO and MB increases with increasing temperature, suggesting the endothermic characteristics of MO and MB adsorption on HCP-CP.

Fig. 7
figure 7

Adsorption isotherms for the adsorption of MO (a) and MB (b) on HCP-CP in the temperature range 25–45 ℃ and the corresponding Langmuir adsorption isotherms plots for MO (c) and MB (d) and the corresponding Freundlich absorption isotherms plots for MO (e) and MB (f)

To investigate the adsorption behavior of MO and MB dyes on HCP-CP surface, the measurement data was fitted with the Langmuir model, Freundlich model and Dubinin-Radushkevich isotherm model. As shown in Fig. 7(c, d) and (e, f) and Table S4 (Supporting Information), the fitting correlation coefficient (R2) of Langmuir model for HCP-CP adsorption of MO (0.99) is greater than that of Freundlich model (0.97), and the fitting correlation coefficient of Langmuir model for HCP-CP adsorption of MB (0.99) is greater than that of Freundlich model (0.96). The results showed that the adsorption of MO and MB on the surface of HCP-CP was more consistent with the Langmuir isothermal adsorption model, which reflects MO and MB adsorption on HCP-CP is monolayer adsorption. Moreover, the maximum adsorption capacity increased from 274.73 mg/g to 349.65 mg/g and 751.88 mg/g to 884.96 mg/g for MO and MB, respectively, as the temperature increased, suggesting the adsorption of MO and MB on HCP-CP is favorable at high temperature conditions. From the Dubinin-Radushkevich isotherm model (Fig.S5 and Table S5, Supporting Information), the average energy value EDR = 9.51 kJ/mol of adsorbed MB, EDR = 8.67 kJ/mol of adsorbed MO, respectively. This indicates that the adsorption process is physical adsorption process.

It is deserved refer to that at room temperature the maximum adsorption capacity of HCP-CP for cationic dye MB (qmax=751.88 mg/g) is more than twice higher than that of anionic dye MO (qmax=274.73 mg/g). These capacity differences may be owning to the stronger electrostatic interaction between the negatively charged nitrogen atoms of HCP-CP with the cationic dye MB than that of MO. Compared with

the other reported adsorbent polymers [46,47,48,49,50,51,52] summarized in Table 1, the adsorption capacity of HCP-CP adsorbent is one of the most promising adsorbents. Meanwhile, the other cationic dye RB and anionic dye NR were also adsorption by the HCP-CP. As shown in the Fig. S6 and S7 (Supporting Information), at different concentrations, the cationic dye (MB and RB) adsorption capacity was higher than the anionic dye (MO and NR).

Table 1 Comparison of MO and MB maximum adsorption capacity on different porous adsorbents

3.5 Desorption and regeneration of HCP-CP

The recycling of adsorbent can save cost and is vital to industrial production. To regeneration the polymer HCP-CP, the ethanol was used to conduct 5 desorption-adsorption cycles on HCP-CP adsorbent. As can be seen from the Fig. 8, after the first cycle, the removal percentage of MO and MB by HCP-CP reached 99%. With the increase of cycles, the removal percentage decreased slightly. After fifth cycles, the removal percentage of MO and MB still exceeds 90%. Hence, the HCP-CP can be reused in a simple way, and it can still maintain good adsorption capacity after 5 adsorption-desorption cycles.

Fig. 8
figure 8

The HCP-CP reusability of (a)MO and (b)MB

3.6 Adsorption mechanism of MO and MB Dyes

Adsorption mechanism of MO and MB dye on HCP-CP polymer was characterized by the FTIR and SEM-EDX. Compared the FTIR spectra of the porous polymer HCP-CP (Fig. S8, Supporting Information) before and after adsorption of the dyes, the N-H peak showed subtle changes, and the frequency band widens, indicating that the N element of the material plays a certain role in the adsorption process [53,54,55]. And the peak at 1025 cm− 1 and 752 cm− 1 disappeared after adsorption. The disappearance of different active functional groups on the HCP-CP after adsorption indicated the possible electrostatic interaction of surface sites with MB ions and MO ions [56, 57].

Furthermore, SEM-EDX analysis was conducted to evaluate the properties of surface morphology and elemental compositions of HCP-CP before and after MO dye and MB adsorption. From the Fig. S9 (Supporting Information) EDX analysis, the main elements contained in the polymer HCP-CP were carbon and nitrogen. After adsorption (Fig. S9(b) and S9(c), Supporting Information), the presence of Na element in the EDX analysis which belongs to MO dye and the presence of Cl element in the EDX analysis which belongs to MB dye. Thus, it was proved that the MO and MB dye molecules were adsorbed on the surface of HCP-CP [58–59]. In all, the electrostatic interaction of surface sites with MB ions and MO ions was possible the main adsorption mechanism.

4 Conclusion

A new carbazole-based hyper-crosslinked porous polymer (HCP-CP) with the main microporous structure and a high surface area (SBET=486.75 m2·g− 1) was successfully synthesized by a simple “knitting” strategy. The synthesized material HCP-CP can effectively remove organic dyes (MO and MB) in aqueous solution. Under the best adsorption condition, the maximum adsorption capacity of HCP-CP material on the cationic dye MB and anionic dye MO was 751.88 mg/g and 274.73 mg/g, respectively. The adsorption mechanism of MO and MB dye on HCP-CP polymer was characterized by the FTIR and SEM-EDX. And the adsorption selectivity also indicated the HCP-CP was better adsorption of cationic dyes MB and RB than that of the anionic dyes MO and NR. Furthermore, the used polymer HCP-CP still retain a removal percentage above 92% after 5 times adsorption-desorption recycle. Hence, this work provided a convenient synthetic route to develop a novel hyper-crosslinked polymer with high capacity for the entrapment of dyes from aqueous solution.