Introduction

Hydrogels with chemically or physically cross-linked hydrophilic polymer networks are polymeric materials, and they can be designed homo- or copolymers with various functional groups such as amine, hydroxyl, amide, carboxyl, and so on [1, 2]. Hydrogels are soft and flexible materials, and they can hold huge amounts of water or biological fluids in their 3D polymeric networks [2]. The water holding capacity of hydrogel relates to functional groups, pH, solvent, temperature, and so on [1]. Hydrogels have recently attracted growing attention because of their unique properties such as pH, temperature, chemical, electro, shear, and light-sensitive [3]. Hydrogels have been widely used in the fields of biomaterials [1], water treatment [4], antibacterials [5], energy [6], drug delivery [7], and devices (optics, sensors, electronics, and so on) [8, 9].

Chitin is one of the most important natural polysaccharides formed by the repetition of β-(1 → 4)-N-acetyl-d-glucosamine groups [10, 11]. Chitin is found in sea creatures such as mollusks, cetaceans, crustaceans (lobster, crab, shrimp, etc.), the shells of insects, and the structures of microorganisms [12, 13]. N-acetyl-glucosamine groups in the structure of chitin can be converted to more functional glucosamine groups by the deacetylation process [10, 14]. Chitosan (Ks) is obtained by partial deacetylation of chitin, and they have linear amino polysaccharide chains with the glucosamine groups. Ks biopolymers have widespread application areas due to their unique properties such as renewable, biocompatible, biodegradable, anticoagulant, immunological, bacteriostatic, non-toxic, wound closure, wound healing, and antimicrobial [10, 15]. The researchers have investigated the composite Ks in various research areas such as drug release [16], biomedical [17], food [18], pharmaceuticals [19], biosensor applications [20], tissue engineering [21], lithium-ion batteries [22], and wastewater treatment [23].

Polypyrrole (PPy), known as a semi-conductive polymer, has widely been used in various applications such as biomedical (drug delivery, gene delivery, neural interfaces, biosensors, artificial muscles, and tissue engineering) [24,25,26] and sensor [24] due to their good electrical conductivity, ease of synthesis, electric stability, and thermal stability. In recent years, the various composite Ks-PPy materials have been prepared and investigated for use in the removal of the metal ions (chromium ion, etc.) [27,28,29] and the dyes (methyl orange, etc.) [28, 30, 31] from the aqueous solutions.

Water is the main component of every living organism, plays a vital role in all the metabolic processes, and helps in the transportation of the dissolved substances in the organism [32, 33]. Population growth and industrialization increase both the factors that pollute the water and the need for clean water resources [34]. Waste water may contain organic or inorganic substances harmful to the environment. When wastewater is discharged directly into a clean water source (oceans, rivers, lakes, etc.), even low concentrations pollute water resources and cause harmful effects on living organisms and nature [35]. In addition, droughts experienced as a result of global warming reduce our water resources (dams, lakes etc.) despite the increase in demand day by day [36]. Recently, polymeric matrices have attracted the attention of researchers as support materials for nanocomposites [37]. Polymeric matrices reduce the potential environmental health effects by preventing the release of nanomaterials into the environment and increase their efficiency by preventing the aggregation of nanomaterials [38]. It also provides high mechanic and thermal stability, processability, improved membrane permeability, fouling resistance, higher adsorption and photocatalytic activities, and easy recovery of nanomaterials. Thanks to their advanced properties, these polymeric matrices with embedded nanomaterials have wide application potential in wastewater treatment and monitoring processes.

Methyl orange (MO) is one of the well-known anionic dyes used in many industries, including plastic, dyestuff, textile, leather, and so on. Various adsorbents, such as metal organic frameworks (MOF) [39], carbon materials [40], graphene oxide [41] multi-walled carbon nanotubes (MCNT) [42], metal nanoparticle [43], polymer composites [30], have been studied for the removal of MO dyes.

In this investigation, the composite Ks/PPy nanoparticles were synthesized, and these Ks/PPy nanoparticles were embedded in the cross-linked PAAm hydrogel matrix. Moreover, an advanced composite material, PAAm-Ks/PPy-H, was prepared with the quaternization of Ks and PPy functional groups in the Ks/PPy nanoparticles embedded in PAAm hydrogel. The prepared hydrogels were characterized by FT-IR, TG, SEM, Malvern mastersizer hydro 3000, and 4-point probe electrical conductivity and their use as an absorbent in the removal of methyl orange dye from the aqueous solution was investigated.

Experimental

Materials

Chitosan (Ks, low molecular weight, 50,000–190,000 Da, Aldrich), hydrochloric acid (HCl, 36.5–38%, Sigma-Aldrich), pyrrole (Py, 98%, Sigma-Aldrich), ammonium persulfate (APS, 99%, Sigma-Aldrich) chemicals are used to prepare chitosan composite Ks/PPy nanoparticle. Acrylamide (AAm, > 99%, Merck), methylenebisacrylamide (MBA, 99%, Sigma-Aldrich), N,N,Nʹ,Nʹ-tetramethylethylenediamine (TEMED, ≥ 99.5%, Sigma-Aldrich) and potassium persulfate (KPS, 99%, Sigma-Aldrich) chemicals are used in the preparation of hydrogels. Distilled water (Direct-Q® 3 UV, water purification system), and ethanol (EtOH, ≥ 99.8 Sigma-Aldrich) were used throughout the studies.

Synthesis of composite Ks/PPy and preparation of Ks/PPy-H nanoparticles

For the composite chitosan/polypyrrole (Ks/PPy) nanoparticles, 20 mg of Ks was added to 20 mL of 0.1 M HCl acid solution and mixed for half an hour. Then, 8 mmol of PPy was added to the mixture and mixed until homogeneous. The APS solution was prepared to contain 4 mmol of APS dissolved in 20 mL of 0.1 M HCl and was added to the mixture containing Ks and PPy as a redox initiator. The polymerization reaction was continued by stirring at 700 rpm for 10 h at ~ 25 °C and then undisturbed for 12 s. The synthesis of Ks/PPy nanoparticles was completed by adding 40 mL of ethanol (equal to the total volume of HCl solution) to the reaction mixture. The synthesized Ks/PPy nanoparticles were removed from the reaction medium by centrifugation at 5000 g for 7 min. The synthesized Ks/PPy nanoparticles were washed with an ethanol-distilled water mixture (1:1 by volume) and centrifuged at 5000 g for 5 min to remove the unreacted monomer, redox initiator, and excess HCl solution. Ks/PPy nanoparticles were dried at room temperature and stored in a closed tube for further synthesis and characterization.

The chitosan/polypyrrole (Ks/PPy-H) nanoparticles were prepared from Ks/PPy nanoparticles with treatment in HCl solution. After the purification process of the Ks/PPy nanoparticles was completed, they were left in a sufficient amount of 0.5 M HCl acid solution and mixed at 300 rpm for 30 min. The prepared Ks/PPy-H nanoparticles were centrifuged to remove from the HCl solution medium for 5000 g and 7 min and then, the excess HCl solution was removed from the Ks/PPy-H nanoparticles by washing with ethanol–water (1:1 by volume). Finally, Ks/PPy-H nanoparticles were dried at room conditions and stored in a closed tube for further synthesis and characterization.

Synthesis of PAAm and composite PAAm-Ks/PPy hydrogel

For the synthesis of poly(acrylamide) (PAAm) hydrogel, a mixture was prepared by adding 17.1 mmol AAm as the monomer, 0.086 mmol MBA (0.5% by mole of monomer) as the cross-linker and 100 µL TEMED solution (10% by volume) as the accelerator into 8.9 mL of distilled water, respectively. Then, 1 mL of the solution containing 0.086 mmol of KPS was added to the mixture as a redox initiator. The obtained homogeneous mixture was quickly transferred into plastic syringes used as molds with a diameter of about 11 cm and a length of about 1.4 cm. The polymerization reaction was continued for 15 min, and the cross-linked PAAm hydrogel was synthesized in a cylindrical shape. The PAAm hydrogels were removed from the syringes, cut into approximately 5 mm pieces, and kept in distilled water for approximately 1–2 days, changing the water at regular intervals to remove the unreacted monomer, crosslinker, and so on. Finally, the synthesized PAAm hydrogels were dried in an oven at 60 °C for 1–2 days and kept in a closed tube for experimental study and characterization.

The composite poly(acrylamide)-chitosan/polypyrrole (PAAm-Ks/PPy) hydrogel was synthesized similar to the PAAm hydrogel synthesis method. According to this method, 17.1 mmol AAm, 0.086 mmol MBA (0.5% by mole of monomer), and 400 µL TEMED solution (10% by volume) were added to 4.6 mL of distilled water, respectively. In another tube, 120 mg of the previously synthesized composite Ks/PPy nanoparticles (mass ratio of nanoparticles used for hydrogel, 1:11) were homogeneously dispersed in 4 mL of distilled water. The second mixture containing composite Ks/PPy nanoparticles was added to the first mixture containing AAm, MBA, and TEMED. Then, 1 mL of the prepared polymerization initiator solution containing 0.086 mmol KPS was added to this prepared mixture. The obtained mixture was mixed rapidly until a homogeneous and was transferred into a plastic syringe. The final mixture was left in the syringe for 15 min and the cross-linked composite PAAm-Ks/PPy hydrogels were synthesized. The synthesized PAAm-Ks/PPy hydrogels were removed from the syringe and washed to remove impurities (monomer, etc.) in distilled water for 2 days at regular intervals by changing the water.

The preparation of PAAm-H and composite PAAm-Ks/PPy-H hydrogel

Poly(acrylamide) treated with HCl (PAAm-H) and poly(acrylamide)-chitosan/polypyrrole treated with HCl (PAAm-Ks/PPy-H) hydrogels were synthesized similar to the PAAm and PAAm-Ks/PPy hydrogel synthesis methods. Herein, the synthesized swollen PAAm and PAAm-Ks/PPy hydrogels were kept in a sufficient volume of 0.5 M HCl solution overnight for the quaternization. The prepared PAAm-H and PAAm-Ks/PPy-H hydrogels were washed with distilled water to remove excess HCl solution. The synthesized hydrogels were dried in an oven at 60 °C and kept in a closed tube for experimental study and characterization.

Synthesized hydrogel swelling studies and adsorption study

The swelling behavior of synthesized PAAm and composite PAAm-Ks/PPy hydrogels was investigated in distilled water at ~ 25 °C. The dried samples were immersed in excess distilled water to reach equilibrium at 25 °C for about 4 days. The percentage of swelling (S%) was calculated by Eq. (1) in this Formula. Ms and Mk refer to the mass of the swollen hydrogel, and the mass of the dried hydrogel, respectively.

$$ S\% = \left[ {\left( {M_{{\text{s}}} - M_{{\text{k}}} } \right){/}M_{{\text{k}}} } \right] \times 100 $$
(1)

The dried PAAm and PAAm-Ks/PPy hydrogels were weighed and left in distilled water. At certain time intervals, the hydrogel was taken from distilled water, and the excess water on its surface was removed with the filter paper. Then, these hydrogels were weighed, and the obtained values were noted. The swelling studies were performed in 3 repetitions under the same ambient conditions.

The adsorption study was performed using 20 mL of a 10 ppm methyl orange aqueous solution and about 50 mg of hydrogel. The sample hydrogels were stirred under 200 rpm at about 25 °C, and the supernatant was analyzed for MO residual concentrations using a UV–vis spectrophotometer. The adsorption capacity (mg g−1) was determined according to the following equation:

$$ {\text{Adsorption}}\;{\text{capacity}}\;\left( {{\text{mg}}\;{\text{g}}^{ - 1} } \right) = \left[ {\left( {C_{{\text{i}}} {-}C_{{\text{t}}} } \right){/}m} \right] \times V $$
(2)

Ci and Ct, represent the initial and final concentrations, and m and V denote the mass of the hydrogel and the volume of MO aqueous solution, respectively.

Characterization

The structural characterization of the synthesized materials was determined with FT-IR analysis using Perkin Elmer FT-IR Spectrum One device with Attenuated Total Reflection (ATR) technique. FT-IR spectra were recorded in the wavelength range of 4000–650 cm−1 and with a discrimination power of 4 cm−1 using a certain amount of dried sample (2–5 mg) for analysis. TG analyses were performed using Perkin Elmer Diamond thermal analysis systems for the thermal characterization of the synthesized materials. A certain amount (2–5 mg) of dried sample was placed in ceramic capsules and heated in a range of 50–1000 °C in an N2 atmosphere (N2 flow rate of 0.2 L min−1) with a temperature rise rate of 10 °C min−1. Malvern mastersizer hydro 3000 particle size measuring device was used for the size analysis of the synthesized Ks/PPy nanoparticles. Measurements were carried out under room conditions by taking a sufficient amount of suspended mixtures containing 1 mg mL−1 of sample in distilled water. The adsorption experiments were conducted by an Ultraviolet–visible (UV–vis) device, Analytik Jena Specord 210 Plus spectrophotometer. The adsorption study was performed using 20 mL of 10 ppm methyl orange aqueous solution and about 50 mg of the hydrogel at about 25 °C. The electrical conductivity measurements of the Ks biopolymer, the Ks/PPy, and the Ks/PPy-H nanoparticles were determined in pellet form using a 4-point probe temperature-controlled electrical conductivity measuring device (Entek, Electronics). The electrical conductivity of the synthesized hydrogels was also measured by the same device. The electrical conductivity measurements of the dried and swollen hydrogel samples were determined from the central region with 3 replications using a 4-point probe temperature-controlled electrical conductivity measuring device.

Results and discussion

Ks/PPy nanoparticles were synthesized with the polymerization of Py in the Ks biopolymer in an aqueous solution. The composite PAAm-Ks/PPy hydrogels were prepared by embedding the synthesized Ks/PPy nanoparticles. PAAm as the monomer, MBA as the cross-linker, and KPS as the redox initiator were used for the synthesis of the hydrogel. Additionally, TEMED as an accelerator to achieve rapid polymerization while the nanoparticles were homogeneously dispersed in the reaction mixture. The synthesis of composite Ks/PPy nanoparticles is shown schematically in Fig. 1a. The mixtures containing Ks-PPy and APS were prepared for the synthesis of composite Ks/PPy nanoparticles. The first mixture was prepared by adding Ks and Py to 0.1 M HCl aqueous solution and, a second mixture was prepared with the redox initiator APS in 0.1 M HCl aqueous solution. The prepared second mixture containing APS was slowly poured onto the first mixture containing Py as a monomer at 700 rpm and ~ 25 °C, and the polymerization reaction was continued at 700 rpm for 10 s and without stirring for 12 s. The synthesis of Ks/PPy nanoparticles was carried out based on the 2:1 mol ratio of PPy:APS.

Fig. 1
figure 1

The schematic representation of the synthesis of the composite Ks/PPy nanoparticles (a), and the synthesis of PAAm-Ks/PPy hydrogel (b)

The synthesis of PAAm-Ks/PPy hydrogel was shown schematically in Fig. 1b. The composite PAAm-Ks/PPy hydrogel was synthesized using AAm as the monomer, MBA as a crosslinker, KPS as the polymerization initiator, and TEMED as the reaction accelerator. The previously synthesized Ks/PPy nanoparticles were suspended in distilled water. The solution containing appropriate amounts of AAm, MBA, and TEMED was added to the mixture containing Ks/PPy nanoparticles. Finally, the appropriate amount of redox initiator KPS was added and, mixed quickly, and transferred into plastic syringes. The prepared hydrogel was removed from the syringe 15 min after KPS was added.

The FT-IR analysis was carried out to confirm the functional group in the polymeric materials. The FT-IR spectra of Ks biopolymer, the composite Ks/PPy nanoparticle, PAAm hydrogel, and the composite PAAm-Ks/PPy hydrogel are given in Fig. 2. The broad peak between 3600 and 3000 cm−1 in the FT-IR spectrum of Ks comes from the stretching vibrations of the N–H and O–H groups. The vibrations of the aliphatic C–H groups of Ks are observed at 2873 cm−1 and the vibrations of the C=O groups are also observed at 1651 cm−1. The peak at 1586 cm−1 corresponds to the vibrations of the N–H groups, while 1026 cm−1 corresponds to the stretching vibration of the C–O–C groups. In the FT-IR spectrum of Ks/PPy, the characteristics band of the pyrrole ring, C=C, and C–N stretching vibrations are seen at 1542 and 1452 cm−1, respectively. The peaks at 1292 and 1164 cm−1 belong to the C–N stretching from the secondary amine and the C–H in-plane bending, respectively.

Fig. 2
figure 2

FTIR spectra of Ks, Ks/PPy nanoparticles, and PAAm, PAAm-Ks/PPy, PAAm-H, and PAAm-Ks/PPy-H hydrogels

In the FT-IR spectrum of the PAAm hydrogel, the specific peaks of the PAAm hydrogel were observed as the asymmetric N–H stretching of NH2 at 3323 cm−1, the symmetrical N–H stretching of NH2 at 3182 cm−1, the C=O stretching at 1646 cm−1, and the 1599 cm−1. The aliphatic C–H and C–N stretching vibrations were attributed at 2933 cm−1 and 1409 cm−1, respectively. The peaks observed at 3117, 3023, 2807, 1750, 1651, and 1396 cm−1 belong to C–H, N–H, and C–N stretching vibrations in FT-IR spectrum of PAAm-H. It is seen that the stretching vibrations of PAAm-H shifted little according to the FT-IR spectra PAAm. It belongs to the quaternized C–N groups of the peak at 1396 cm−1. It is clear that the FT-IR spectra of the PAAm and PAAm-Ks/PPy hydrogels are similar because PAAm and Ks/PPy have similar bonds such as N–H, C=O, and C-N. In addition, the fact that Ks/PPy contains only 10% by mass of the PAAm hydrogel is another reason why the FT-IR spectra of PAAm and PAAm-Ks/PPy are close to each other. PAAm-Ks/PPy hydrogel has the characteristic band at 3323, 3186, 2925, 1646, 1602, and 1411 cm−1 for asymmetric N–H, symmetrical N–H, aliphatic C–H, C=O, N–H bend, and C–N stretching vibrations, respectively. Herein, the asymmetric N–H stretching vibration of the –NH2, aliphatic C–H stretching vibration, and the C=O stretching vibration were determined from the FT-IR spectra with a shift of 3–5 cm−1. It was observed as shifting in the broadband at 3000–3600 cm−1 to the right due to an electrostatic interaction between –OH functional groups of Ks and –NH groups of PPy. The peaks observed at 3115, 3019, 2804, 1753, and 1390 cm−1 belong to C–H, N–H, and C–N stretching vibrations in the FT-IR spectrum of PAAm-Ks/PPy-H. It belongs to the quaternized C–N groups of the peak at 1390 cm−1. It is seen that the stretching vibrations of PAAm-Ks/PPy-H shifted little according to the FT-IR spectrum of PAAm-Ks/PPy. The FT-IR spectra of PAAm-H and PAAm-Ks/PPy-H are almost the same due to their same functional groups such as N–H, –NH2, and C=O.

The SEM images of Ks/PPy nanoparticles (a) at various magnifications, PAAm (b), PAAm-H (c), PAAm-Ks/PPy (d), and PAAm-Ks/PPy-H (e) were shown in Fig. 3. It is seen that the diameter of the synthesized Ks/PPy nanoparticles is approximately 80–120 nm. The PAAm-H hydrogel appears to have a porous structure after treatment with HCl solution. The Ks nanoparticles embedded the hydrogels are seen in the SEM images of PAAm-Ks/PPy, and PAAm-Ks/PPy-H.

Fig. 3
figure 3

SEM images of Ks/PPy nanoparticles (a) at various magnifications, PAAm (b), PAAm-H (c), PAAm-Ks/PPy (d), and PAAm-Ks/PPy-H (e)

Moreover, the size of the synthesized composite Ks/PPy nanoparticles was determined using a particle size measuring device (Mastersizer 3000) and the obtained graph is given in Fig. 4. Dv(10) = 16.0 nm, Dv(50) = 36.6 nm, and Dv(90) = 114.0 nm were obtained. For example, Dv(90) means that 90% of the synthesized nanoparticles are below the obtained Dv(90) value. According to these results, it was determined that the size of the majority of the synthesized Ks/PPy nanoparticles was below 114 nm. It can be assumed that the synthesized Ks/PPy nanoparticles have a monodisperse distribution due to their close small (about 100 nm).

Fig. 4
figure 4

The size analysis result of the Ks/PPy nanoparticles

The stability of the synthesized composites was investigated by means of TG analysis. The TG and DTG curves of Ks biopolymer, the synthesized composite Ks/PPy nanoparticles, PAAm hydrogel, and composite PAAm-Ks/PPy hydrogel are given In Fig. 5a–d. In Fig. 5a, the TG curve of Ks exhibited three stages of degradation in the temperature range of 25–100, 260–400, and 400–1000 °C due to the evaporation of the moisture, the weight loss of chitosan, and the degradation of continued chitosan, respectively. The weight loss of the Ks is approximately 11.1% due to the evaporation of the moisture in the first stage. The weight loss of the Ks is about 2% at 100–260 °C. It can be seen that the weight loss of Ks is 60% in total at 260–400 °C. The Ks continued to degrade in the last stage at 400–1000 °C. The total weight loss of Ks was calculated as 76.9%. The obtained results might be due to the degradation of the polysaccharide polymer chain and the decomposition of the Ks molecule. The thermal analysis of Ks/PPy nanoparticles is shown in Fig. 5a. The weight loss of Ks/PPy nanoparticles occurred at 12.8% in the temperature range of 25–100 °C after the removal of moisture. There is only approximately 1% weight loss up to 240 °C in the TG curve of Ks/PPy nanoparticles. It is seen that there is a continuous weight loss with an approximately linear curve from 240 to 1000 °C. The total weight loss of Ks/PPy nanoparticles was determined to be 56.5% from the TG curve. Moreover, DTG curves of Ks and Ks/PPy nanoparticles were given in Fig. 5b. There is a sharp peak in the DTG curve of Ks at 297 °C. Ks/PPy nanoparticles have a broad peak at 267 °C. When the percent of total mass losses of Ks and Ks/PPy are compared up to 1000 °C in the TG curves, it is understood that the synthesized composite Ks/PPy nanoparticles exhibit more durable thermal behavior than the Ks biopolymer.

Fig. 5
figure 5

TG and DTG analysis results of Ks, Ks/PPy, PAAm, and PAAm-Ks/PPy

Figure 5c shows the TG curve of the PAAM and composite PAAm-Ks/PPy hydrogel. In the TG curve of PAAm hydrogel, the weight losses occurred at 1.3% up to 100 °C due to the evaporation of the moisture. When the temperature continued to increase, the total weight loss of PAAm was determined to be about 85.4% up to 500 °C and 88.5% up to 1000 °C. The weight loss of the PAAm-Ks/PPy hydrogels was determined about 1% due to the evaporation of the moisture up to 100 °C. The temperature was increased from approximately 180–200 °C to 500 °C, the total weight loss was 77.8% for the PAAm-Ks/PPy hydrogel, and the total weight loss of PAAm-Ks/PPy hydrogels occurred at 82.5% at 1000 °C. The DTG results were given in the PAAm and composite PAAm-Ks/PPy hydrogels in Fig. 5d. It is seen that the peaks are at 384 and 378 °C for the PAAm and composite PAAm-Ks/PPy hydrogel, respectively. It can be said from the obtained data that the composite PAAm-Ks/PPy hydrogel has a slightly higher thermal resistance than the PAAm hydrogel.

Hydrogels are materials that have a high water holding capacity relative to their mass. Therefore, determining their swelling behavior and capacity is an important parameter in the characterization of these materials. The swelling behavior of PAAm and composite PAAm-Ks/PPy hydrogels in distilled water and at room temperature (about 25 °C) was investigated. In Fig. 6, the S% values versus time (min) of PAAm and composite PAAm-Ks/PPy hydrogels are plotted. As seen in Fig. 6, S% values were measured as 296 ± 21% for PAAm hydrogel, 447 ± 45% for PAAm-H hydrogel, and 348 ± 20% for composite PAAm-Ks/PPy hydrogel, and 369 ± 45% for composite PAAm-Ks/PPy hydrogel in one hour. At the 6th hour, S% values of PAAm, PAAm-H, PAAm-Ks/PPy, and composite PAAm-Ks/PPy-H hydrogels were measured as 782 ± 81, 894 ± 79, 988 ± 74, and 926 ± 21%, respectively. S% values of the hydrogels were stabilized and reached approximately maximum values at the end of the second day.

Fig. 6
figure 6

The swelling behaviors of PAAm, PAAm-H, PAAm-Ks/PPy and PAAm-Ks/PPy-H

At the end of the third day, S% values of PAAm, PAAm-H, PAAm-Ks/PPy and PAAm-Ks/PPy-H hydrogels were calculated as 1698 ± 27%, 1855 ± 108, 1949 ± 17% and 2001 ± 145%, respectively. As can be seen from the results, the S% values of the hydrogels are close to each other. However, it is seen that the S% value of PAAm-Ks/PPy-H is slightly higher than the others. It is seen that the composite PAAm-Ks/PPy hydrogel swells approximately 15% more than the PAAm hydrogel. PAAm-Ks/PPy hydrogel has a slightly higher water holding capacity than PAAm hydrogel due to the –NH, –NH2, and –OH functional groups from chitosan and pyrrole. The Ks/PPy nanoparticles with –NH, –NH2, and –OH functional groups increased the water holding capacity of PAAm-Ks/PPy due to hydrogen bonding and electrostatic interactions [34].

The electrical conductivity measurements of the Ks biopolymer, Ks/PPy nanoparticle, PAAm and PAAM-Ks/PPy hydrogels as well as PAAm-H and PAAm-Ks/PPy-H hydrogel were conducted with the 4-point measurement technique. The electrical conductivity of the Ks biopolymer and the composite Ks/PPy nanoparticles was 2.22E−6 mS cm−1 and 5.79E−1 mS cm−1, respectively. The synthesized composite material is approximately 261,000 times more conductive than the Ks. In addition, the electrical conductivity of Ks/PPy-H nanoparticles prepared by doping Ks/PPy nanoparticles with HCl acid was determined and measured as 2.53 mS cm−1. After the doping process, the electrical conductivity of the nanoparticles increased by approximately 4.4 times. Moreover, the electrical conductivity of the dried and swelling PAAm, PAAm-H, PAAm-Ks/PPy, and PAAm-Ks/PPy-H hydrogels was measured, and the results are summarized in Table 1. The electrical conductivity values of the dried hydrogels, PAAm, PAAm-H, PAAm-Ks/PPy, and PAAm-Ks/PPy-H hydrogels were measured as 2.1E−6 ± 6.1E−8, 4.5E−6 ± 7.0E−7, 2.7E−6 ± 4.9E−7, and 3.4E−6 ± 1.5E−6 mS cm−1, respectively. It is seen that the electrical conductivity of the hydrogels treated with HCl acid (PAAm-H etc.) was slightly increased compared to the untreated hydrogels (PAAm etc.). The electrical conductivity of the swollen, PAAm, PAAm-H, PAAm-Ks/PPy, and PAAm-Ks/PPy-H hydrogels was 1.1E−5 ± 9.1E−6, 8.4E−6 ± 5.8E−6, 1.6E−5 ± 1.4E−5 and 2.0E−5 ± 8.7E−6 mS cm−1, respectively. The electrical conductivity of the swollen hydrogels is slightly higher than the dried hydrogels, according to the obtained electrical conductivity results. As can be seen, the PAAm-Ks/PPy-H hydrogel, which is swollen and treated with HCl, has the highest electrical conductivity value compared to other hydrogels in Table 1.

Table 1 Electrical conductivity values of the prepared hydrogels

Consequently, it was determined that swollen hydrogels have higher electrical conductivity than dried hydrogels. Moreover, it is seen that the electrical conductivity of the hydrogels and nanoparticles increases when hydrogels are treated with HCl acid in this study.

The adsorption performances of the PAAm, PAAm-H, PAAm-Ks/PPy, and PAAm-Ks/PPy-H hydrogels were investigated in MO aqueous solution and shown in Fig. 7. The maximum adsorption capacity (mg g−1) values were calculated as 0.06 ± 0.05, 0.87 ± 0.44, 0.79 ± 0.46, and 2.65 ± 0.40 mg g−1 for the PAAm, PAAm-H, PAAm-Ks/PPy, and PAAm-Ks/PPy-H hydrogels, respectively. It is seen that the adsorption capacity of the PAAm-Ks/PPy-H hydrogel is approximately 20-fold higher than the PAAm hydrogel, owing to the Ks/PPy nanoparticles with the quaternized –NH, –NH2, and –OH functional groups. The adsorption performance of the PAAm-Ks/PPy-H is also better than the PAAm-Ks/PPy due to the quaternized –NH, –NH2, and –OH functional groups. The mechanism of MO adsorption for PAAm-Ks/PPy, and PAAm-Ks/PPy-H is about hydrogen bonding and electrostatic interactions [34]. The prepared adsorbents with –NH and –NH2, and –OH functional groups adsorb MO by forming hydrogen bonds and electrostatic interactions. PAAm polymer chains could strongly interact with the Ks/PPy nanoparticles via their –NH2 functional groups. Herein, PAAm hydrogel matrix acted as stabilizer to inhibit the aggregation of Ks/PPy nanoparticles. Ks/PPy nanoparticles can act as a cross-linker to the PAAm hydrogels due to the presence of strong hydrogen bonding and electrostatic interactions [34].

Fig. 7
figure 7

The Adsorption performance of PAAm, PAAm-H, PAAm-Ks/PPy, and PAAm-Ks/PPy-H hydrogels

When PAAm and PAAm-Ks/PPy hydrogels are compared, the PAAm-Ks/PPy hydrogel containing Ks/PPy nanoparticles with –NH, –NH2, and –OH functional groups is more effective than the PAAm hydrogel in the MO adsorption. The functional groups of Ks/PPy nanoparticles establish more hydrogen bonds and electrostatic interactions with MO than PAAm hydrogel, and thus the MO adsorption capacity of the PAAm-Ks/PPy hydrogel from the aqueous medium is higher than the PAAm hydrogel. PAAm-Ks/PPy-H hydrogel is also more effective than PAAm-Ks/PPy for MO adsorption due to its quaternized amine and hydroxyl groups.

The PAAm hydrogel appears to have little effect on methyl orange adsorption. It is seen that the adsorption capacity of PAAm-Ks/PPy hydrogels containing Ks/PPy nanoparticles has increased significantly. For this reason, the adsorption capacity value for Ks/PPy-H was also calculated based on the mass of Ks/PPy nanoparticles in the hydrogel composites. PAAm-Ks/PPy-H hydrogel contains about 91 mg of Ks/PPy nanoparticles per gram (mass ratio of the nanoparticles used for the hydrogel, 1:11). The adsorption capacity of Ks/PPy-H nanoparticles can be calculated as being about 19.6 mg g−1 from the adsorption capacity value of the PAAm-Ks/PPy-H.

There are the adsorption capacity values of various adsorbents reported in the literature such as 0.282 mg g−1 for activated carbon (AC) and 0.432 mg g−1 for entrapped in magnetic alginate beads (AC-MAB) [44], 0.31 mg g−1 for the magnetic iron oxide nanoparticles (SPION) and 10.54 mg g−1 for the magnetically modified multi-wall carbon nanotubes (MWCNT/SPION) [45], 1.22–9.14 mg g−1 for micro-groove chitosan (GCS) beads [46], 4.984–6.993 mg g−1 for magnetic chitosan/poly(vinyl alcohol) hydrogel beads (MCPHBs) [47], 5.01 and 5.56 mg/g for chitosan/organic rectorite-Fe3O4 (CS/Mt-OREC) microspheres [48], ~ 3 mg g−1 for Calcium alginate and 10.7 mg g−1 for calcium alginate/multi-walled carbon nanotubes [49]. Compared with previous studies, Ks/PPy nanoparticles and PAAm-Ks/PPy as adsorbents are effective, stable, cheap, and applicable materials. Moreover, Ks/PPy nanoparticles are environmentally friendly due to their biocompatibility, biodegradability, and nontoxicity. Therefore, these adsorbents have the potential to be used in water treatment systems.

Conclusion

PAAM-Ks/PPy were prepared by embedding the synthesized composite Ks/PPy nanoparticles in cross-linked hydrogel chains. Herein, the composite Ks/PPy nanoparticles were synthesized and characterized by FTIR and TG for the structural and thermal analysis, respectively. The mass loss of the composite Ks/PPy nanoparticles was determined as 56.5% at 1000 °C in the TG analysis, and these nanoparticles exhibit approximately 88% better thermal behavior than the Ks biopolymer. The Dv(90) value of the Ks/PPy nanoparticles was measured as 114 nm. According to SEM images and the Dv(90) value of the Ks/PPy nanoparticles, the majority of the synthesized nanoparticles are 100 nm or smaller. The composite material PAAm-Ks/PPy hydrogel was synthesized by embedding Ks/PPy nanoparticles in PAAm hydrogel, and its structure characterization was performed by FT-IR spectroscopy. The value of the mass loss of PAAm-Ks/PPy hydrogel was determined as 82.5% at 1000 °C. It is determined that the PAAm-Ks/PPy hydrogel has a slightly better thermal resistance. The maximum S% values of PAAm and composite PAAm-Ks/PPy hydrogels were determined as 1698 ± 27% and 1949 ± 17%, respectively. It is seen that the S% values almost stabilize on the second and third days of the swelling study. The composite PAAm-Ks/PPy hydrogel has approximately 15% more water holding capacity than the PAAm hydrogel. This is related to both the functional groups of Ks/PPy and the hydrogen bonds between the nanoparticles and the polymer chains of the hydrogel. Thus, the S% value of the composite PAAm-Ks/PPy hydrogel was increased. The electrical conductivity value of the dried hydrogels is between 2.1E−6 and 4.5E−6 mS cm−1, and the electrical conductivity value of the swollen hydrogels is between 8.4E−6 and 2.0E−5 mS cm−1. It was observed that the electrical conductivity value of the hydrogels increased a little after they were treated with HCl acid. Additionally, the electrical conductivity value of the swollen hydrogels is also higher than the dried form. The PAAm-Ks/PPy-H hydrogel, which is swollen and treated with HCl acid, has the highest electrical conductivity with an electrical conductivity value of 2.0E−5 mS cm−1 compared to other prepared hydrogels. The adsorption capacity of the PAAm-Ks/PPy is about fourfold better than the PAAm due to the –NH, –NH2, and –OH functional groups in the Ks/PPy nanoparticles. Moreover, the adsorption performance of the PAAm-Ks/PPy-H hydrogel is about 20-fold higher than the PAAm hydrogel. The PAAm hydrogel embedded in Ks/PPy nanoparticles (PAAm-Ks/PPy-H) was positively charged thanks to the quaternized –NH, –NH2, and –OH functional groups and thus more readily adsorbed the negatively charged MO dye in the aqueous solution. In future studies, the synthesis of the hydrogels with different functional groups, increasing the amount of embedded Ks/PPY nanoparticles, more detailed adsorption studies, and different wastewater treatment studies can be applied.