1 Introduction

Transparent conducting oxides (TCOs) are a unique type of materials that combine electrical conductivity and optical transparency, simultaneously, with a wide range of applications e.g. displays, low emissive (low-e) windows, thin film photovoltaic (PV), smart devices, gas sensor and solar cell [1]. Among the various types of TCOs materials (ZnO, TiO2, WO3, In2O3), tin dioxide SnO2 semiconductors have been keenly studied due to their excellent chemical stability and optical and electrical properties [2]. SnO2 has the rutile type tetragonal structure belonging to the P42/mnm space group. The lattice parameters are a = b = 4.7382 and c = 3.1871 Å, and the band-gap energy is in the ultraviolet range between 3.5 and 3.8 eV as estimated from experimental results and theoretical calculations [3]. Its high optical transparency, electrical conductivity, and chemical stability make it a very attractive material for solar cells, heat mirrors, catalysis, flat panel displays and gas sensing applications. Many methods have been tailored to synthesis SnO2 thin films such as, chemical vapour deposition [4], sol–gel dip coating [5], RF magnetron sputtering [6], spray pyrolysis [7], and thermal evaporation method [8], etc. Compared with the above methods, the chemical bath deposition method (CBD) is one of the suitable methods for preparing highly efficient thin films in a simple manner. The growth of thin films strongly depends on growth conditions, such as duration of deposition, composition and temperature of the solution, and topographical and chemical nature of the substrate. Chemical bath deposition yields stable, adherent, uniform and hard films with good reproducibility by a relatively simple process. So, in the present work, we have adopted to the CBD to synthesis of Mg doped SnO2 thin films. Photocatalytic efficiency of SnO2 nanocatalysts to meet practical application requirements is still a challenge because of the bottleneck of poor quantum yield caused by the fast recombination rate and ineffective utilization photo generated electron–hole pairs [9]. During the past years, it was found that composition, nanostructure and surface modification of semiconducting materials could dramatically affect their photocatalytic performances. Accordingly, two approaches are usually employed to improve the photocatalytic performance of SnO2 nanocatalysts. One is to regulate the physical property of SnO2 such as morphology and particle size, to obtain high specific surface area and quantum-size effect. The other is to dope some extraneous elements into SnO2 like noble metal, metal ion and semiconductor, which would act as the traps for photo induced electrons and holes, leading to the reduction of electron–hole recombination, thus improving its photocatalytic performance. Magnesium (Mg), the seventh most abundant element on earth, has many attractive properties. It is nontoxic, is cheaper than many other metals, can be recycled, and its metallurgy is easy. Consequently, Mg-based materials have received considerable attention. Among them, Mg-doped n-type semiconducting oxide materials are particularly interesting as it has potential applications in nanoscale electronics, optoelectronics, and biochemical sensing and photocatalytic activity. Moreover the ionic radius of Mg is comparable with that of Sn, Mg doping can be predictable to substitute the Sn host lattice, which results in decreasing the band gap energy, this property can expected to increasing the photocatalytic performance. Hence, in the present work, we have prepared Mg doped SnO2 thin films and investigated the role of Mg dopants on structural, optical and photocatalytic activity of SnO2 films. To the best of our knowledge, this is the first preliminary report about structural, optical and photocatalytic activity of Mg doped SnO2 films by CBD.

2 Experimental procedure

2.1 Preparation of Mg–SnO2 thin films

SnCl2·2H2O and MgCl2·6H2O were used as tin and Mg sources, respectively. Initially, SnCl2·2H2O (analytical grade) was dissolved in deionized water (resistivity ∼18.2 Ω cm) to make 0.1 M solution of tin hydroxyl and appropriate amount of MgCl2·6H2O (0, 1, 5 and 10 wt%) was added to the above solution. The solution was stirred for 30 min and a sol was formed. Subsequently, an aqueous NH3·H2O was added dropwise under strong stirring until the pH of the solution reaches 8. The dropping rate must be well controlled for the chemical homogeneity. Films were grown on 76 mm × 26 mm × 1 mm glass microscope slides which were used as depositing substrates. The glass slides as the substrates for depositing Mg–SnO2 films were prepared by ultrasonically cleaned by acetone, followed by ethanol and finally, deionized water for 10 min respectively and allowed to air dry. The substrate was suspended vertically in the reaction bath after stirring the solution properly for homogeneity. The thin film samples were deposited at the temperature between 60 and 70 °C for 1 h. The as-deposited thin films were annealed at 500 °C for 2 h in muffle furnace, in order to improve the crystanility. Pure SnO2 thin films were prepared in a similar manner without the use of Mg source. The schematic representation of CBD is shown in Fig. 1.

Fig. 1
figure 1

Schematic representation of chemical bath deposition method

2.2 Characterization techniques

The prepared samples (annealed) were successfully characterized by the following techniques. Structural properties of the Mg–SnO2 thin films were analyzed by using X-ray diffraction (XRD, JEOL diffractometer) with monochromatized Cu Kα radiation (λ = 1.54056 Å) in the range of 10–80° with the step size of 0.1°. Raman measurements were recorded by using Technos instruments (Seki technotron Corp, Japan) in the range of 200–1,000 cm−1. The optical transmittance of the thin films was recorded at room temperature by a Perkin Elmer UV/VIS/NIR Lambda 19 spectrophotometer in the wavelength range of 300–900 nm. The morphology of the TNO thin films is observed by Atomic force microscope (ParkXE100 AFM non-contact mode). Photoluminescence spectra of the samples were recorded using PerkinElmer LS 55 Spectrometer equipped with a 40 W Xenon lamp, Excitation length used was 325 nm.

3 Results and discussion

3.1 XRD analysis

Non-destructive X ray diffraction technique was used to determine the phase crystallinity and structural analysis of the pure and Mg doped SnO2 thin films as shown in Fig. 2. From the X ray analysis, it was noted that both the pure and doped films showed typical peaks of (110), (101), (200) and (211), which was indexed to tetrangonal rutile type structure with P42/mnm symmetry and the results are in good agreement with the standard JCPDS data (card no: 41-1445). No additional phases such as the SnO2 orthorhombic phase, metallic Mg, or other SnO (or) MgO-based phases are observed. It was also noted that the peak intensity was decreased and shifted to lower angle side with the increase of the Mg concentrations (0–10 wt%). This is due to the substitution of Sn4+ ions at the lattice sites with the Mg2+ ion. The lattice parameters of pristine SnO2 were estimated as a = b = 4.6894 and c = 3.1967 Å. These values decreased to a = b = 4.6541 and c = 3.1878 Å after Mg doping (Table 1). The observed variation in lattice parameters is consistent with the smaller radius of the Mg2+ ion (0.58 nm) with respect to the Sn4+ ion radius (0.67 nm) [10] and with the small amount of Mg concentration used for doping.

Fig. 2
figure 2

Powder XRD pattern of SnO2 thin film with different Mg content, a pure SnO2, b Mg 1 wt%, c Mg 5 wt%, d Mg 10 wt%

Table 1 The lattice parameters and crystallite size of SnO2 thin films with different Mg concentrations

The average crystalline sizes of the Mg–SnO2 thin films were calculated by using Scherrer’s equation [11].

$$d = \frac{K\lambda }{\beta \cos \theta }$$

where d is the mean crystallite size, K is the shape factor taken as 0.89, λ is the wavelength of the incident beam, β is the full width at half maximum and θ is the Bragg angle. The average crystalline size of SnO2 was found to be 31 nm and it was further decreased to 23 nm for 10 wt% Mg doped SnO2 thin films. This result suggests that the grain growth is suppressed due to doping of Mg into Sn-site.

3.2 Atomic force microscope analysis

Atomic force microscopy (AFM) is a useful technique to determine the surface morphology and particle size of the samples. Figures 3 and 4 show the 2D and 3D AFM image of pure and Mg doped SnO2 thin films. It was seen that the surface of the films were very smooth. The particle distribution is uniform and particle size reduces with the increasing of the Mg concentrations. For an optical surface, roughness is normally considered as an important parameter. Surface roughness is not only the light scattering but also give an idea about the quality of the surface under investigation, in addition to providing some insight on the growth morphology. A systematic description of various analytical method used for roughness characterization can be found in ref [12]. Root mean square roughness (Rrms) which is defined as standard deviation of the surface height profile from the mean height, is the most commonly reported measurement of the surface roughness and is given by,

$${\text{R}}_{\text{rms}} = \left[ {\frac{ 1}{\text{N}}\sum\limits_{\text{i}}^{\text{n}} {({\text{h}}_{\text{i}} - [{\text{h}}])^{2} } } \right]$$

where N is the number of pixels in the image, hi is the height of ith pixel and <h> is the mean height. The Rrms values of pristine and Mg (1, 5 and 10 wt%) doped SnO2 were found to be 32, 29, 25, 21 nm respectively. These values are good in agreement with the crystalline size calculated from XRD results.

Fig. 3
figure 3

AFM micrograph (2D image) of SnO2 thin film with different Mg content, a pure SnO2, b Mg 1 wt%, c Mg 5 wt%, d Mg 10 wt%

Fig. 4
figure 4

AFM micrograph (3D image) of SnO2 thin film with different Mg content, a pure SnO2, b Mg 1 wt%, c Mg 5 wt%, d Mg 10 wt%

3.3 UV–Vis spectra analysis

In order to confirm the optical property and substitution of Mg into SnO2 site, the films were characterized by UV–Vis transmission spectra analysis. Figure 5a shows the UV–Vis transmission spectra analysis of pure and Mg doped SnO2 films. Both the films are highly transparent in the visible region and a sharp fall in transmission is observed below 400 nm region. It is found that the absorption edge shifts toward longer wavelength (red shift) with doping of Mg ion. The observed red shift can be attributed to charge transfer transitions between localized d electrons of Mg ion and SnO2 conduction band or valance band [13].

Fig. 5
figure 5

UV–Vis spectra of SnO2 thin film with different Mg content, a transmittance spectra, b band gap energy determination

The absorption coefficient (α) was calculated from the transmission spectra using equation [14],

$$\alpha \, = { 1}/{\text{t ln}}\left( { 1/{\text{T}}} \right)$$

where T is the optical transmission and t is the film thickness. The direct band gap of thin films was calculated from Fig. 3b using the formula [15],

$$\alpha {\text{h}}\nu \, = {\text{ A}}\left( {{\text{h}}\nu \, - {\text{ E}}_{\text{g}} } \right)^{\text{m}}$$

where α is the absorption coefficient, h is the Planck’s constant, ν is the frequency of incident light, Eg is the energy band gap of material and m is the factor governing the direct/indirect, etc. transition of electron from the valance band to the conduction band. The band gap energy was calculated as 3.63 and 3.42 eV for pure and Mg (10 wt.%)doped SnO2 films (Fig. 5b). The observed decrease in band gap energy confirms that Mg2+ ion substituted in SnO2 host lattice. Similar findings were observed in Mg doped SnO2 thin films by chemical vapor deposition method [16].

3.4 Photoluminescence spectra analysis

PL emission spectra have been widely used to investigate the efficiency of charge carrier trapping, migration and transfer, and to understand the fate of electron hole pairs in the semiconducting oxide materials [18]. Figure 6 shows the PL emission spectra of both pure and Mg doped SnO2 films measured from 300 to 600 nm using a 325 nm He–Cd laser. In the UV region, PL spectra of SnO2 film exhibited an emission band at 359 nm (3.31 eV). The UV emission corresponds to the near band edge emission (due to the radiative annihilation of excitons) and the visible emission is commonly referred to as a deep-level or trap state emission [17]. The emissions in the blue–green range (bands at 424 and 486 nm) are defect-related emissions, generated by the oxygen vacancies. The blue emission (424 nm) is attributed to electron transition mediated by defect levels in the band gap, such as oxygen vacancies and tin interstitials. The green emission peak (486 nm) was related to \({\text{V}}^{+}_{\rm o}\) oxygen vacancies [18]. After substitution of Mg2+ ion the UV emission peak shifts a little to lower energy with decreased intensity. The shifting of peak may be due to the presence of Mg dopant in SnO2 and can cause lattice defects.

Fig. 6
figure 6

Photoluminescence spectra of pure and Mg doped SnO2 thin films

3.5 Raman spectra analysis

Raman spectroscopy is powerful non-destructive technique to study the crystalline quality structure disorder and defects in doped semiconductor alloy. It gives significant information about the local structure changes due to incorporation of highly mismatching of Mg ions into SnO2 host lattice [19]. Figure 7 shows Raman spectra of pure and Mg doped SnO2 thin films in room temperature. The most intense Raman peak at 629 cm−1 can be attributed to the A1g mode [20]. The Raman bands at 571 and 766 cm−1 are the vibration modes A1g and B2g respectively [21]. In the Mg doped SnO2, the position of the same modes were observed but slightly shifted to the larger wave number by increasing the Mg doping and the intensity of these modes had decreased as the Mg doping due to the slightly mismatched Mg2+ ion in SnO2 lattice.

Fig. 7
figure 7

Raman spectra of SnO2 thin films with different Mg concentrations

3.6 Photocatalytic activity set up

The photocatalytic activities of Mg doped SnO2 films were evaluated by the degradation of three types of dyes, including methylene blue (MB) and (RHB) solution, in visible light irradiation. For photocatalytic process, two pieces of 25 mm × 75 mm glass plate coated with films were settled into 25 ml of dye solutions (MB, MO and RHB) with a concentration of 15 mg/l in a 100 ml cylindrical glass reactor. The 125 W high pressure mercury lamp was used as a light source. The coated glass/dye solution was irradiated in the horizontal direction and the distance between the UV lamp and the glass/dye solution was kept within 25 cm. Then the solution has to be kept in the dark room and well stirred with the magnetic stirrer for more than 30 min to attain the equilibrium condition throughout the solution. The concentration of the aqueous suspensions (MB, MO and RHB) in each sample was analyzed using UV–Vis spectrophotometer at a wave-length of 664 nm. The photocatalytic efficiency has been calculated from the expression η = (1 − C/C0), where C0 is the concentration of dyes (MB, MO and RHB) before illumination and C is the concentration of dyes after a certain irradiation time.

3.6.1 Photocatalytic activity measurements

The photocatalytic activities of pure and Mg doped samples were evaluated by degradation of various dyes (MB and RHB) under visible irradiation. The results showed that the time of the illumination and the quantity of the photocatalyst have obvious influence on the degradation of the reactive dyes. In general, the effect of the photocatalyst is more obviously at a certain range with the increasing photocatalyst quantity, the results showed in these figures are accordance with the rule [22]. Figures 8 and 9 present the degradation profiles of MB and RHB in the presence of SnO2 with different Mg concentrations (0–10 wt%). The photocatalytic activity of Mg (10 wt%) doped SnO2 film is much higher than that of the pure SnO2. With the reaction time at 120 min, the MB degradation efficiencies of pure and Mg (1, 5, 10 wt%) doped SnO2 films are about 55, 61, 65 and 80 %, respectively. Hence, Mg doped SnO2 is an excellent photocatalyst in our experiment when compared to pristine SnO2. The photocatalytic mechanism of RHB in Mg–SnO2 film is shown in Fig. 10. When the Mg is doped into the films, the Mg particles can act as electron traps facilitating the electron hole separation and subsequent transfer of the trapped electrons to the absorbed O2 acting as an electron acceptor on the surface of Mg–SnO2 films. At the same time, more RHB molecules are adsorbed on the surface of Mg–SnO2 films, enhancing the photo excited electron to the conduction band and simultaneously increasing the electron transfer to the adsorbed O2. Moreover the smaller band gap energy due to Mg dopant may play another role in enhancing the visible light photocatalytic activity of SnO2 films.

Fig. 8
figure 8

Photocatalytic degradation of methylene blue (MB) using Mg–SnO2 thin films under visible-light irradiation

Fig. 9
figure 9

Photocatalytic degradation of rhodamine B (RHB) using Mg–SnO2 thin films under visible-light irradiation

Fig. 10
figure 10

Schematic representation for photocatalytic mechanism of rhodamine B (RHB) in Mg–SnO2 thin films

4 Conclusions

In summary, here we report the structural, optical and photocatalytic properties of Mg doped SnO2 nanothin film synthesized by a simple CBD for the first time. Powder XRD results confirm that both the pure and doped samples in tetragonal rutile type structure with P42/mnm symmetry and the results are good in agreement with the standard JCPDS data (card no: 41-1445). The AFM images have confirmed that surface of the films are very smooth and uniform surface. Furthermore the particle distribution is uniform and the particle size reduces with the increase of the Mg concentrations. A considerable red shift in the absorbing band edge was observed with the increase of Mg content by using UV–Vis spectra analysis. The defect levels in the band gap such as oxygen vacancies were confirmed by photoluminescence spectra analysis. Mg doped SnO2 thin film has shown tremendous photocatalytic activity compared with pure SnO2. The rapid transferring of electron and high separation efficiency of electron–hole pairs lead to the significantly enhanced photo activity. The Mg doped SnO2 thin film would be promising for practical use in pollutant decomposition as effective photocatalysts.