1 Introduction

Biologically active carbons are highly porous biomass carbon materials, which are promising carbon absorbers in the field of ecological restoration, agriculture and environmental protection due to their specific surface area (2500–3000 m2/g) [1,2,3].

Activated carbon applications are divided into two categories: gas phase and liquid phase applications. The liquid phase of carbon has a pore diameter close to 3 nm or larger, while the carbon pore diameter in the gas phase is mainly in the range of 1–2.5 nm. Also, the speed of diffusion of molecules in the liquid phase is much slower than in the gas phase [4]. Refining sugar and corn, improvement of taste, color and smell of water, purifying urban sewage, removal of impurities in the food and beverage industry, use in pharmaceutical processes, electroplating industry are the main and important applications that are used in the liquid phase of activated carbon. Solvent recovery, catalyst, gas storage, energy storage in the capacitor, diesel or gasoline emission control, flue gas control, protection against hazardous atmospheric pollutants, etc. are also gas phase applications [5,6,7,8].

Activated carbon can be defined as a porous lattice of defective hexagonal carbon layers with many irregular atoms. These irregular atoms on the surface of active carbon play a key role in the discussion of surface chemistry [9]. The heterogeneous nature of activated carbon is due to the phenomena that occur during burning and activation on the surface. The heterogeneous character of activated carbon is determined by the activation method and the type of raw materials [10].

There are two physical and chemical activation processes to prepare activated carbon. In physical activation, some agents such as water vapor, carbon dioxide, oxygen or their mixture, boron vapor and phosphorus are used under annealing. In chemical activation, activating reagents such as potassium hydroxide, potassium carbonate, sodium carbonate, magnesium chloride and some acids such as phosphoric acid, sulfuric acid, aluminum chloride, sodium chloride and zinc chloride are used. Therefore, the activation method is necessary for carbon black porosity and increasing the surface area of activated carbon [11].

The physical activation method is a common and simple method for preparing activated and porous carbons. The simple device and experimental conditions are far more convenient and cheaper than the chemical activation method. Simple process and quick activation, the possibility of preparing activated carbon in large quantities, the abundance and cheapness of raw materials are the advantages of this method. However, in this method, it is difficult to control the activation factors and the rate of steam entering the chamber. In the physical activation, several factors are effective on the electrical and optical properties and the porosity of the holes. Among the effective factors in preparing porous carbon in this way, we can mention the amount of raw material, the initial temperature, the distance between the sample and the initial part of the entry of steam and argon gas, the pressure of the carrier gas, the pollution of the reactive environment, and the rate of increase in the temperature of the furnace. But in chemical activation method, the efficiency of production, is better than the physical method. The amount of activating agent, mixing ratio of saturated activating agent and primary raw material and reaction temperature are among the important things in preparing activated carbon by chemical method [12].

Agricultural waste such as coconut shell [13], almond [14], hazelnut [15], olive kernel [16], coffee grounds [17], pomegranate wood [18], palm kernel [19], and walnut shell [20] are materials are used for the synthesis of activated carbon due to their suitable carbon structure and cheapness.

Specific surface area, pore size and surface functional groups are the basic factors for the adsorption rate of activated carbon. The adsorption characteristics of activated carbons depend on raw materials and preparation conditions regarding their effectiveness in different applications. In physical activation, reactions occur between the activator agents and carbon, as a result of which the oxygen in the activator gases is burned and comes out of the carbon structure in the form of inactive components such as carbon dioxide and carbon monoxide. Activation is done in two stages: in the first stage, the carbon is burned and the connected pores between the main carbon plates are opened, and then in the second stage, the surface of the crystalline plates is prepared for contact with the activating gases. The burning process in the crystal is not completely uniform because the speed of the reaction is different in different areas of the surface that are exposed to the activating gases. If the carbon burning process is not done correctly at the beginning of the work, new pores cannot be formed. Therefore, parts of the primary crystal structure that are non-uniform cause the formation of a series of pores and an almost uniform porous structure. With the deterioration of the walls of porous neighbors, which of course are smaller, the total porosity increases and also larger pores are formed [21].

Chemical activation with activator agent steam usually occurs in the temperature range of 800 to 1000 °C with a series of heterogeneous reactions. The activation temperature must be carefully selected and adjusted, since lower temperatures have a negative effect on the reaction kinetics due to endothermic reactions, and therefore the temperature must be high in this process. In the kinetic control zone, a reaction occurs on the inner surface of the carbon, which removes the carbon from the pores of the walls and increases the expansion and enlargement of the pores. But at very high temperatures, reactions occur that are controlled, and in this situation, the reactions occur on the outer surface of the carbon particles. When oxygen or air is used as an activating gas, due to their high activity, the reaction with carbon becomes very fast, which results in uncontrolled combustion. This combustion causes losses on the carbon surface and creates a large amount of surface oxides. Due to these problems, activation with steam and carbon dioxide is more preferable than activation with oxygen and air [22, 23]. The exothermic reactions that occur during activation with steam, carbon dioxide and oxygen are summarized in the form of reactions (1) to (5):

$$ {\text{H}}_{{2}} {\text{O}} + {\text{C}}_{{\text{x}}} \to {\text{CO}} + {\text{H}}_{{2}} + {\text{C}}_{{{\text{x}} - {1}}} $$
(1)
$$ {\text{2H}}_{{2}} {\text{O}} + {\text{C}}_{{\text{x}}} \to {\text{CO}}_{{2}} + {\text{2H}}_{{2}} + {\text{C}}_{{{\text{x}} - {1}}} $$
(2)
$$ {\text{CO}}_{{2}} + {\text{C}}_{{\text{x}}} \to {\text{2CO}} + {\text{C}}_{{{\text{x}} - {1}}} $$
(3)
$$ {\text{O}}_{{2}} + {\text{C}}_{{\text{x}}} \to {\text{2CO}} + {\text{C}}_{{{\text{x}} - {2}}} $$
(4)
$$ {\text{O}}_{{2}} + {\text{C}}_{{\text{x}}} \to {\text{CO}}_{{2}} + {\text{C}}_{{{\text{x}} - {1}}} $$
(5)

On the other hand, the adsorption power of physical activated carbon is determined by the chemical nature of porous carbon and the concentration of oxidizing gases. The amount of carbon activation in this process depends on the amount and type of minerals in the primary raw material and coal [24]. Also, the uncontrolled increase of combustible process followed by the development of uncontrolled pores has an effect on the quality of activated carbon and reduces its performance in production. In addition, the two processes of carbonization and activation are carried out at very high temperatures, it consumes a high cost in terms of energy.

Physical activation is done in the temperature range of 500–1000 °C and in the presence of gases such as CO2 and water vapor. In this method, at the beginning, carbon materials are converted to gas or steam, which is known as the water/gas reaction:

$$ {\text{C}} + {\text{O}}_{{2}} \to {\text{CO}}_{{2}} + {\text{94 Kcal}} $$
(6)

The physical activation process based on water vapor is as follows:

$$ {\text{C}} + {\text{H}}_{{2}} {\text{O}} \to {\text{CO}} + {\text{H}}_{{2}} \quad \quad \Delta {\text{H}} = {29}{{{\text{kcal}}} \mathord{\left/ {\vphantom {{{\text{kcal}}} {{\text{mol}}}}} \right. \kern-0pt} {{\text{mol}}}} $$
(7)
$$ {\text{CO}} + {\text{H}}_{{2}} {\text{O}} \to {\text{CO}}_{{2}} + {\text{H}}_{{2}} \quad \quad \Delta {\text{H}} = - {1}0 \, {{{\text{kcal}}} \mathord{\left/ {\vphantom {{{\text{kcal}}} {{\text{mol}}}}} \right. \kern-0pt} {{\text{mol}}}} $$
(8)

Activated carbons with this method usually have small pores. In the gas method, because the reaction temperature is high, heavy hydrocarbons or other compounds formed during the carbonization process fill the pores of the carbon and become volatile and are swept away with the incoming gases. As a result, its contact surface increases significantly. Steam activation is more important from an economic point of view regardless of operational considerations.

Unlike physical activation, chemical activation at lower temperatures can provide highly porous products. Chemicals remaining in porous carbon can be removed by effective washing [25]. In chemical activation, phosphoric acid is one of the most common activating agents that can combine with organic substances in biological waste and form phosphate and polyphosphate bridges. In addition, some of these phosphate groups remain on the carbon surface after washing. In activation with phosphoric acid, pyrolysis is often performed at a temperature of 400–700 °C [26].

According to the studies of Li et al. [27], the activation mechanism of the raw material using H3PO4 can be done during steps (9) to (14) in three different temperature ranges:

in the range of 100–400 °C:

$$ {\text{2H}}_{{3}} {\text{PO}}_{{4}} \to {\text{H}}_{{4}} {\text{P}}_{{2}} {\text{O}}_{{7}} + {\text{H}}_{{2}} {\text{O}} $$
(9)
$$ {\text{3H}}_{{3}} {\text{PO}}_{{4}} \to {\text{H}}_{{5}} {\text{P}}_{{3}} {\text{O}}_{{{1}0}} + {\text{2H}}_{{2}} {\text{O}} $$
(10)
$$ {\text{nH}}_{{3}} {\text{PO}}_{{4}} \to {\text{H}}_{{{\text{n}} + {2}}} {\text{P}}_{{\text{n}}} {\text{O}}_{{{\text{3n}} + {1}}} + \left( {{\text{n}} - {1}} \right){\text{H}}_{2} {\text{O}} $$
(11)

in the range of 400–700 °C:

$$ {\text{H}}_{{{\text{n}} + {2}}} {\text{P}}_{{\text{n}}} {\text{O}}_{{{\text{3n}} + {1}}} \to {\text{P}}_{{4}} {\text{O}}_{{{1}0}} + {\text{H}}_{{2}} {\text{O}} $$
(12)
$$ {\text{P}}_{{4}} {\text{O}}_{{{1}0 \, + }} {\text{2C}} \to {\text{P}}_{{4}} {\text{O}}_{{6}} + {\text{2 CO}}_{{2}} $$
(13)

in the range of 700–800 °C:

$$ {{{\text{P}}_{{4}} {\text{O}}_{{{1}0}} } \mathord{\left/ {\vphantom {{{\text{P}}_{{4}} {\text{O}}_{{{1}0}} } {{\text{P}}_{{4}} {\text{O}}_{{6}} }}} \right. \kern-0pt} {{\text{P}}_{{4}} {\text{O}}_{{6}} }} + {\text{CH}}_{{\text{x}}} \to {\text{PH}}_{{3}} + {{{\text{CO}}_{{2}} } \mathord{\left/ {\vphantom {{{\text{CO}}_{{2}} } {{\text{CO}}}}} \right. \kern-0pt} {{\text{CO}}}} $$
(14)

All these processes occur in the pyrolysis stage of organic compound. During activation, carbon dioxide is usually preferred over steam because of its low reactivity (ΔH > 0), which allows control of oxidation rates to produce uniform porosity.

A comparison between the electronic energy and the interaction between these two types of adsorptions has been made, which is obvious that the interaction energy in chemical adsorption is stronger than the interaction energy in physical adsorption. Most of the discriminating properties between physical and chemical absorption are related to the formation of single or multiple layers in the adsorbent, activation energy, reversibility and the important feature of absorption relative to the surface, these are the main differences between physical and chemical absorption [28].

Absorption capacity and absorption kinetics are directly related to the porous structure of the absorbent, and the porous structure of the absorbent is affected by the raw materials and its production methods [29]. Many studies have been done on the synthesis method and different properties of activated carbon.

Zhang et al. [30] developed an H3PO4 activated hydrocarbon derived from peanut hull and showed that chemical modification greatly increases the adsorption capacity of hydrocarbon compared to acetone and cyclohexane. Pam et al. [31] used palm kernel chemically to synthesize activated carbon and investigated the effect of process variables (ratio of H3PO4 to PKS) and carbonization temperature on microstructure performance, morphology, pore structure and adsorption properties for methylene blue and iodine. Haghbin et al. [32] prepared highly-porous activated carbon from palm kernel by chemical activation method with phosphoric acid and after characterization confirmed that date palm bark can be considered a cheap and promising precursor for the commercial preparation of activated carbon. Rugayah et al. [33] produced granular activated carbon from palm kernel using carbonization and steam activation systems on a commercial scale. They determined that palm kernel is a suitable material for the production of activated charcoal due to its low ash content, but high carbon and volatile content. Hidayu et al. [34] prepared activated carbon from palm kernel shell by chemical activation to absorb β-carotene in crude palm oil and showed that activation of palm kernel carbon using zinc chloride (ZnCl2) with mass saturation ratio 1:1 for 24 h and carbonization at 500 °C for 90 min shows the highest percentage of β-carotene removal (69%). Boulika et al. [35] synthesized activated carbon from almond shell using H3PO4 as a chemical activator and room vacuum decomposition as a physical activator. They studied the optimum adsorption efficiency of crystal violet dye on the produced activated carbon. Mohan et al. [36] prepared magnetic and non-magnetic low-cost activated carbon from almond shell, characterized them, and used them to remove 2,4,6-trinitrophenol from water. Osobamiro et al. [37] synthesized activated carbons from almond and groundnut shells by chemical activation using phosphoric acid and zinc chloride. The results of the physicochemical properties of their produced activated carbons have shown that the activated carbon produced can be used as an adsorbent in the removal of organic pollutants in wastewater.

These cases are only a small number of reports on the synthesis of activated carbon using almond shell and palm kernel with physical and chemical activation methods with phosphoric acid.

Due to the easier synthesis method and compatibility with the environment, methods of synthesis, physical and chemical characterization and electrochemical properties of activated carbons are still considered for mass production. Tuning or engineering the energy gap of the synthesized activated carbon is of particular importance to investigate the physical and electrochemical properties; Because one of the effective factors in regulating the energy gap can be the activation method or the use of different precursors [38]. Therefore, in this study, after the synthesis of activated carbon using almond shell and palm kernel by physical and chemical activation methods with H3PO4, the effect of the type of activation (physical and chemical method) on the structural and optical properties of the synthesized activated carbon are compared and investigated.

2 Preparation of porous activated carbon

2.1 Materials:

Almond shell, palm kernel, H3PO4 (Merck Company), alcohol (Merck Company), potassium hydroxide (NaOH)(Merck Company), acetone (Merck Company), distilled water.

2.2 Synthesis of porous activated carbon by physical activation method

To obtain high porosity carbons with the best quality, the optimal value of each of the parameters for obtain the high porosity carbon with the best quality, the optimal value of each of the mentioned parameters in references (amount of activating agent, ratio of activating agent to primary raw material and reaction temperature, etc.) should be determined. In this study, to determine the best activating agent, all conditions were kept constant and only in each experiment, the method of activating agent was changed.

In this study, activated carbons were synthesized using the palm kernel and almond shell by two physical and chemical activation methods with different precursors. For this purpose, impurities were first separated from almond shell and palm kernel powder, and then washed with distilled water until completely dry. The primary raw materials were ground by a grinding machine and a uniform powder was prepared. The obtained powder was sieved and used to prepare activated carbon. In order to purify the primary powder and de-ash process to reduce the percentage of ash in almond shell, leaching operation was performed.

In the physical activation method, water vapor was used for activation. In this way, distilled water was poured into the flask and the argon gas hose was connected from the inlet of the flask and placed on the heater. Then, the temperature was set so that the distilled water started to steam slowly, and steam and argon gas were discharged into the furnace through special hoses from the top of Erlen at the same time, and both gas and steam must be connected until the temperature reaches T = 600 °C. After, it was at this temperature for 3 h, the heater was turned off and only gas entered the furnace and remained in this condition for 3 h, and then the samples were taken out of the furnace. The diagram of the stages of the synthesis of activated carbon by the physical activation method, as well as its design, is shown schematically in Fig. 1. The conditions for the preparation of activated carbon by physical method using water vapor are given in Table 1.

Fig. 1
figure 1

Diagram of activated carbon synthesis steps using physical activation method and its schematic design

Table 1 Synthesis data of activated carbon using physical and chemical activating agent with H3PO4

2.3 Synthesis of porous activated carbon by chemical activation method

In this study, to determine the best activating agent, all conditions were kept constant and only the activating agent was changed.

First, 20 g of the sample was mixed with 200 ml of one molar NaOH, and then it was stirred for 20 min at room temperature and the mixture was filtered several times. In the next step, it was washed several times by soda and distilled water. After the final filtration, a dark cream-brown powder was obtained.

After washing again with water, the leached sample was washed with acetone several times and then heated on a heater for 3 h at T = 100 °C. After complete drying, a dark cream powder was obtained, which weighed approximately 8 g.

The X-ray diffraction pattern was taken from this sample, in which no impurity additional peaks were seen. These samples were used for the synthesis of activated carbon powders by chemical method using H3PO4. The steps of activated carbon synthesis using chemical activator are given in Fig. 2.

Fig. 2
figure 2

Synthesis steps of activated carbon by chemical activation with H3PO4 agent

It should be noted that in the synthesis of activated carbon by phosphoric acid activating agent, at final step, the sample was washed with sodium hydroxide until the phosphoric acid was completely removed. In this way, 200 ml of saturated sodium hydroxide (NaOH) solution was stirred with the prepared activated carbon sample for 20 min, which finally resulted in trisodium phosphate and water as reaction 15:

$$ {\text{H}}_{{3}} {\text{PO}}_{{4}} + {\text{3NaOH}} \to {\text{Na}}_{{3}} {\text{PO}}_{{4}} + {\text{3H}}_{{2}} {\text{O}} $$
(15)

In the last step, the obtained activated carbon was washed several times with deionized water and acetone to dissolve and remove trisodium phosphate, and then its water was separated using an air pump. Table 1 shows the preparation conditions of activated carbon using the H3PO4 activating agent.

3 Characterization

The activated carbon powders were characterized by X-ray diffraction (XRD), Scanning electron microscopy (SEM), Infrared Fourier Transform Spectroscopy (FT-IR), and UV–Vis spectroscopy. The XRD patterns of powders were recorded by D8 Advance Bruker system with Ni filtered using Cu Kα (λ = 0.15406 nm) radiation at an operating voltage of 35 kV and current of 30 mA. Surface morphology of the samples was observed using a Philips XL-30 SEM system with the acceleration voltage of 20 kV. Also, FT-IR spectroscopy was characterized by structural and optical characterization using Unico 4802 dual spectrophotometer in the range of λ = 1100–190 nm and UV–Vis spectrophotometer.

4 Results and discussion

4.1 Structural properties

In this study, for structural characterization, ADVANCE-BRUKER D8 model XRD machine with wavelength λ = 1. 5405 Å was used in 2θ = 10°–70° range.

From the X-ray diffraction patterns, important information can be obtained, such as identification of crystal phases and phase composition, the preferred direction of crystal, the identification of unknown elements. Also, from the XRD graph, important parameters such as grain size, lattice parameter and distance between crystal planes are obtained [39]. Due to the amorphous structure of active carbons, only the elements present in the synthesized material can be identified. The X-ray diffraction spectra of almond shell, powdered palm kernel without activating and acetone-deashed almond shell are shown in Fig. 3.

Fig. 3
figure 3

The X-ray diffraction pattern of raw powder, prepared from a almond shell b palm kernel and c leached almond bark powder washed with acetone

Figure 3a and b is the X-ray diffraction pattern of raw powder of almond shell and palm kernel, which show the amorphous structure of carbon layers. Two broad diffraction peaks around the angles of 2θ = 22.5° and 2θ = 35°, corresponds to (002) and (100) planes of amorphous carbon. Figure 3c related to the leached almond shell powder washed with acetone, shows the composition of cellulose (C6H10O6) n in almond bark.

Figure 3 shows that by leaching almond shell, two peaks appear at the 2θ = 15.35° and 2θ = 35°, and the intensity of the peaks increases with leaching. Due to the fact that acetone was used for leaching, the composition of cellulose (C6H10O6)n was formed in this sample. In other words, by forming a new compound and creating defects in the lattice structure, by substituting hydrogen in the carbon site, the atomic radius will decrease and lead to an increase in the intensity of the peaks, because this is possible at a low doping amount.

Figure 4 shows the XRD diffraction spectra of carbon activated by physical activation by water vapor. Figure 4a is activated carbon with almond shell raw material and Fig. 4b activated carbon with palm kernel raw material. There are two broad peaks at the angles of 2θ = 23° and 2θ = 43°, which correspond to (002) and (100) planes of amorphous carbon.

Fig. 4
figure 4

The X-ray diffraction patterns of carbon for physical activation by water steam: a almond shell powder and b palm kernel powder

Increasing the temperature to the extent necessary for the carbonization process causes the growth of carbon microcrystals and the strengthening of the peaks in the X-ray diffraction spectrum in the activated carbon sample compared to the original raw carbon [40]. The intensity of the peaks in Fig. 4 shows that the growth of crystallinity in the activated carbon from palm kernel is higher than that of almond shell. Since the carbonization temperature and the duration of staying in the furnace are the same for the samples, it can be concluded that despite the amorphousness of the synthesized activated carbon, the growth of microcrystals in the activated carbon of palm kernel is higher than that of almond shell, and it causes the intensity of the peak XRD spectra peaks increase.

Figure 5 is the x-ray diffraction spectra of activated carbon with phosphoric acid (H3PO4) chemical activator. In pattern 5a, it has only two broad peaks at 2θ = 23° and 2θ = 43°, and in 5b there are more peaks in the range of 2θ = 22° and 2θ = 30°, with the maximum peaks at 2θ = 23° and 2θ = 26°, and 2θ = 29°, which is related to the graphitic structure of carbon. The planes corresponding to the angles of 2θ = 26° and 2θ = 42°, and 44°, are shown in Fig. 5, which correspond to the (002), (100) and (101) planes of the hexagonal structure of graphite carbon. Small peaks can be seen in the range of 2θ = 43°, which indicate the breaking of primary bonds in carbon [41]. Some diffraction peaks are seen in the range of 2θ = 14°, to 2θ = 22°, which disappear after increasing the concentration of phosphoric acid over time and with increasing temperature, which is attributed to the cellulose crystal structure [42].

Fig. 5
figure 5

The X-ray diffraction spectrum of activated carbon for chemical activation using the H3PO4: a almond shell powder and b palm kernel

Comparison of XRD spectra of activated carbon nanoparticles and primary raw carbon (Figs. 4 and 5) shows that all graphs have two broad peaks, which are related to the structure of amorphous activated carbon.

4.2 Surface properties by SEM analysis

The SEM images show the growth of particles, surface morphology, shape and size of particles, and their effect on conductivity, electrical and optical properties can be studied. SEM images of the samples synthesized in this study were done using a Philips XL-30 scanning electron microscope. SEM images of ground almond shell and leached sample charred at 100 °C are shown in Fig. 6. Figure 6a related to the ground almond shell shows that the almond shell has no porosity.

Fig. 6
figure 6

The SEM images of a ground almond shell and b leached almond shell

SEM images related to raw carbon and activated carbon for almond shell and palm kernel by physical and chemical activation methods are shown in Figs. 7 and 8, respectively. Figure 7 shows that with the leaching operation, the tissues of the almond shell become more open due to the severe of the constituents of the almond shell, including lignin. This causes that in the next stages, the penetration of the activating agent into the tissue of the almond shell or palm kernel increases and it has more contact with the inner tissue of the almond shell, and as a result, it produces a greater amount of porous structure.

Fig. 7
figure 7

The SEM images of activated carbon for “almond shell” using a physical activation with water vapor b chemical activation with H3PO4

Fig. 8
figure 8

The SEM images of activated carbon for “palm kernel” using a physical activation, b chemical activation with H3PO4

The SEM images of Figs. 7 and 8 are related to physical activation by water vapor show relatively large sized pores. Also, the porosity and pores formed in the phosphoric acid activation method are much less. The SEM images also show that there are no pores or holes in the raw carbon sample prepared from almond shell and palm kernel. However, in the activated samples, pores and defects are clearly observed, which are due to the loss of primary bonds in the raw carbon and the formation of new bonds in the activated sample, and these pores exist non-uniformly on the surface of the sample.

4.3 FTIR analysis

In the infrared analysis method, the vibration of bonds is checked, which is caused by the change of bond length or bond angle in molecules. Infrared spectroscopy is a method to identify molecules and especially the functional group of molecules. To obtain the IR spectrum, light must pass or absorbed through the sample. For this purpose, first the completely powdered sample is mixed with KBr powder and then it is turned into a thin tablet by a press machine.

In order to find out the presence of organic substances and check the type of bonds in activated carbon that has been porous by different methods, infrared absorption in the range of k = 400 cm–1 to k = 4000 cm–1 was measured with an FTIR spectrophotometer. In raw black carbon, the infrared bonds are below k = 1700 cm−1 and between k = 2750 cm−1 and k = 3250 cm−1. In the k = 1200 cm−1 range, it may be due to the existence of C–O–C, C–O and O–H bonds, i.e. alcoholic and carboxylic groups. The bond at k = 1600 cm−1 is assigned to C = C stretching with other C = C bonds [43]. In general, the peaks observed in the absorption band obtained from the prototype at k = 1083 cm−1 are related to single carbon bond, k = 1610 cm−1 are related to double carbon bond, 1428 cm−1 are related to CH and CH2 bonds, and k = 2914 cm−1 and, k = 3421 cm−1are related to OH and H2O bonds.

Considering that the primary material for the preparation of activated carbon, i.e. almond shell and palm kernel, has a cellulosic texture and considering the structure of cellulose (C6H10O2), it is concluded that the bonds in k = 1083 cm−1, k = 1428 cm−1, k = 2914 cm−1and k = 3421 cm−1 which are respectively related to the single bond of carbon, CH, CH2 and OH, which is related to the cellulose in almond shell. Almond shell has lignin, and according to the structure of lignin, it is concluded that the absorption bands in the range of k = 1610 cm−1and k = 1740 cm−1 are related to C = C bond, which is weaker in the activated samples of this peak.

Figures 9 and 10 are related to the FTIR spectra of the activated carbon sample with physical and chemical activating agents with H3PO4. The observed peak in the range of k = 2300 cm−1 to k = 2500 cm−1is related to CO2 in the samples. The carbon–carbon single bond in the spectra is bending in the k = 1050 cm−1 and stretching in k = 1530 cm−1.

Fig. 9
figure 9

FTIR absorption spectra of activated carbon synthesized with “almond shell” primary raw material using a physical, b chemical activation with H3PO4

Fig. 10
figure 10

FTIR absorption spectra of activated carbon synthesized with primary raw material of “palm kernel” using a physical, b chemical activation with H3PO4

The FTIR spectra of functional groups in carbon activation show that all spectra have distinct peaks in the range of k = 1000 cm−1 to 1100 cm−1 and k = 1540 cm−1 to 1570 cm−1, which are related to C–C bond vibrations and confirm that during the carbonization process Carbon does not disappear. In addition, in these spectra, there are peaks in the range of k = 2800 cm−1 to 3000 cm−1, which are related to the C–H bond. The peak seen in the range of k = 3400 cm−1 to 3500 cm−1 in all spectra is related to the O–H bond.

4.4 UV–Vis spectroscopy analysis

The optical characterization of the samples by UV–Vis Double Beam Spectrophotometer model 4802 UNICO carried out in the wavelength range of λ = 190 nm to 1100 nm with a step of 0.5 nm for optical transmission and absorption spectra (especially for energy band gap).

To determine the energy gap from the absorption spectrum of the samples, first the absorption values (A) that can be measured by the device were extracted and then the absorption coefficient (α) was calculated using Eq. 16 [44]:

$$ \alpha = 2.303\frac{A}{t} $$
(16)

In this regard, t is the grain size. To determine the energy gap, Tauc's formula (Eq. 17) was used. Index n can have the values of 1/2, 1/3, 2/3, 2, where 2 is allowed for direct transitions and gives the allowed direct energy gap, and 1/2 is allowed for indirect transitions and gives the allowed indirect energy gap [45].

$$ \left( {\alpha h\nu } \right)^{n} = A\left( {h\nu - E_{g} } \right) $$
(17)

The optical absorption coefficient (α) in versus wavelength (λ) for physical activation and chemical activation for almond shell and palm kernel is shown in Fig. 11. As can be seen, the absorption edge for all samples is in the range of 250–300 nm, and at wavelengths between 300 and 1100, the optical absorption coefficient is in order of 105. This shows that activated carbon is capable of high absorption in a large range, especially in the visible region, which shows the applications of these materials in solar photothermal materials and solar collectors.

Fig. 11
figure 11

The optical absorption coefficient (α) versus wavelength (λ) for physical activation: a almond shell b palm kernel and chemical activation c almond shell and d palm kernel

Graphs of \({\left(\mathrm{\alpha hv}\right)}^{2}\) in terms of (hv) for activated carbon samples synthesized with almond shell and with palm kernel are shown in Figs. 12 and 13, respectively. To determine the energy gap (directly), the absorption coefficient \(\mathrm{\alpha }=(2.303\times \mathrm{A})/\mathrm{D}\) was calculated, where A is the absorption coefficient and D is the size of nanoparticles in nanometers. To determine the direct bandgap based on the Tauc's formula (\({\left(\mathrm{\alpha hv}\right)}^{2}=\mathrm{A}(\mathrm{hv}-{\mathrm{E}}_{\mathrm{g}}))\) by drawing the graph of \({\left(\mathrm{\alpha hv}\right)}^{2}\) in terms of (hv) and calculating the slope of the graph, the value of the bandgap of active carbon powders is obtained. According to the graphs in Fig. 12 and 13, the band gap for activated carbons is reported in Table 2.

Fig. 12
figure 12

The (αhν)2 versus (hν) diagram for determine of energy gap of activated carbon from “almond shell” using a physical, b chemical activation with H3PO4

Fig. 13
figure 13

The (αhν)2 versus (hν) diagram for determine of energy gap of activated carbon from “palm kernel” using a physical, b chemical activation with H3PO4

Table 2 Band gap of activated carbon with physical and chemical activating agents

The band gap of activated carbon showed that these materials behave as semiconductor materials, because all the Eg values are in region 2.80–3.15 eV with high absorption coefficient and basically, activation treatment reduces the band gap energy of the material. In general, UV absorption in carbon materials is caused by electronic transitions between bonding and antibonding π-orbitals, as π-π* transitions are in the range between 180 and 260 nm. On the other hand, the structural changes are related to the different optical behavior of these materials. The results of Velo-Gala et al. [46] have shown that there is a positive correlation between the sp3/sp2 ratio and the Eg value, and the increase in sp2 hybridization is associated with a decrease in the Eg value, because a large fraction of sp2 carbon atoms increases the extensive π conjugation and the band gap is reduced. Therefore, the higher the sp2 hybridized carbon content, the higher the position of the energy gap in the wavelength [46].

The results of Table 2 show that in the synthesized activated carbons, the lower Eg values correspond to palm kernel. Therefore, in activated carbon from palm kernel, compared to almond shell, the content of sp2 hybridized carbon is higher, and as a result, it increases the wide π conjugation and decreases the bond distance. The results of energy gap calculations of this study are in agreement with studies by [46, 47].

The urbach energy or urbach edge is a parameter typically denoted EU, with dimension of energy and is used to quantify energetic disorder or vacancy in the band edges of a semiconductor. It is evaluated by fitting the optical absorption coefficient (α) as a function of energy (hν). In order to determine the width of the band tail (urbach energy), at first, the Lnα diagram is drawn in terms of hν, and then by calculating the inverse of the slope of the linear part of the plot, the value of urbach energy is obtained sing the following relation (18):

$$\alpha ={\alpha }_{0 }\mathrm{exp}(\frac{h\mathrm{v}}{Eu})$$
(18)

As can be seen from Fig. 14a–d, the urbach energy for activated carbon compounds with physical and chemical activation methods is in the range of 120–210 meV. In the chemical activation method, the urbach energy has a greater value, and as the gap increases, the urbach energy is decreased. Figure 15 shows the graphical design of the valence and conduction bands, and band tail (urbach energy) developed in band gap a semiconductor.

Fig. 14
figure 14

The calculation of urbach energy by plot of Ln (α) vs hν: physical activation: a almond shell b palm kernel and chemical activation c almond shell and d palm kernel

Fig. 15
figure 15

Graphical design to show the valence and conduction bands, and band tail (urbach energy) developed in band gap a semiconductor

As can be seen, localized levels as band tail are pulled into the band gap and hence the band gap is reduced. This band tail is due to the crystal defects and porosity of the activated carbon or impurity in a semiconductor.

5 Conclusion

In this study, activated carbon powder was synthesized by physical and chemical activation methods. The results of characterizing the structural and optical properties of the synthesized materials are as follows:

  1. (a)

    The XRD spectra of the synthesized activated carbon and the initial raw carbon showed that in all the samples there are broad peaks related to the carbon structure and they have an amorphous structure.

  2. (b)

    SEM images of almond shell and raw palm kernel showed that they have no pores, but pores and defects were clearly observed in the activated carbon of hard almond shell and palm kernel using physical and chemical methods. Porosity also exists non-uniformly on the surface of the sample.

  3. (c)

    FTIR spectra showed that functional groups were observed in activated carbon using water vapor and phosphoric acid. FTIR spectra showed that all the spectra have distinct peaks in the range of k = 1000 cm−1 to 1100 cm−1and k = 1540 cm−1 to 1570 cm−1, which are related to C–C bond vibrations and confirm that carbon is not lost during the carbonization process.

  4. (d)

    The measurement of the energy gap of activated carbons showed that the energy gap of the samples is in the range of 2.80–3.48 eV. Activated carbon sample synthesized with almond shell has more energy than palm kernel, and in palm kernel activated carbons, compared to almond shell, the content of sp2 hybridized carbon is higher, increasing the wide π conjugation and reducing the energy gap.

  5. (e)

    The urbach energy for activated carbon compounds with physical and chemical activation methods is in the range of 120–210 meV. In the chemical divination method, the urbach energy has a greater value due to increasing the micro-holes and vacancies, and as the band gap increases, the urbach energy is decreased.