1 Introduction

Optoelectronic devices are essential in meeting the requirements of prominent sectors, such as telecommunications, medical equipment, and military services [1,2,3]. One of the most attractive applications of these devices is photodetectors (PDs), which convert photon energy into electrical signals, making them indispensable components in various industries. Researchers worldwide are exploring the potential applications of PDs for demanding areas of our era, such as biomedical applications, manufacturing process control, and environmental sensing [4,5,6]. Numerous materials have been developed for PDs to develop suitable photodetection devices that can revolutionize how we work, communicate, and live in the future. PDs operate in different light regions, such as UV, infrared, and visible light, depending on the materials used in the PD devices [7]. Visible light constitutes a significant fraction of the solar spectrum; therefore, semiconductor materials with suitable properties were developed for visible-range PD technologies [8, 9].

Zinc oxide (ZnO), a semiconductor material, has been the center of attraction in PDs for decades due to its excellent chemical stability, high electron mobility, non-toxicity, low cost, and facile synthesis [10,11,12,13,14,15]. In the literature, ZnO-based thin films are generally used for UV-range PDs [16,17,18,19]. For this reason, more work is needed on the visible-range PDs with ZnO-based thin films. There are still some limitations to using pristine ZnO for visible light PDs, mainly because of the band gap structure of the ZnO. Extending the operation range of ZnO-based materials for visible-range PDs is still a challenge. Still, with defect engineering and morphology modification, developing more suitable ZnO-based materials for PDs operating in the visible-range is possible [11,12,13,14,15]. Therefore, researchers have widely applied ZnO doping to modify its properties and alternative synthesis methods to obtain desirable nanostructures.

Pham et al. produced ZnO nanorod-structured thin films doped with transition metal Mn using the hydrothermal method. They reported that the photodetection performance in visible light was significantly improved in Mn-doped ZnO thin films thanks to the 3D patterned structure and modified band gap [20]. Another study on the transition metal doped ZnO-based for visible-range PDs was reported by Sight et al., where magnetron sputtering was used to form pristine and Cu-doped ZnO thin films on n-Si substrates [21]. It was reported that doping improved reproducibility and stability with rapid response and recovery times in the Cu-doped ZnO thin film. Besides doping with transition metals, oxide particle decoration was studied to enhance the visible-range photodetection of ZnO nanostructures [21]. Recently, Giang et al. presented their work on the CuO nanoparticle decorated ZnO nanorod heterojunction structure for visible-range PDs, where they found remarkable photoresponse with short response and recovery times and good stability due to the narrow band gap of the CuO nanoparticle and ZnO nanorod heterojunction [22].

Many studies have been conducted on doping ZnO with transition metals and using transition metal oxides; however, there is a limited number of studies on the influence of rare earth element (REE) doping on ZnO, specifically to understand their promising usage for optoelectronic applications [16, 20, 21, 23, 24]. Recent studies reported on the optical properties of REE-doped ZnO thin films [23, 24]. In these studies, it has been found that REE doping improves the defect chemistry of the ZnO thin films for enhanced photoactivity. Nevertheless, the potential of REE-doped ZnO materials for visible-range PDs has yet to be extensively studied in the literature [23, 24].

This study focuses on doping ZnO with an REE, Rubidium, via the SILAR, a facile non-vacuum synthesis method suitable for large-scale manufacturing, for the first time in the literature. SILAR is a highly advantageous synthesis method that stands out from other methods due to its unique features [25, 26]. It allows material coating over various substrates, and the parameter modifications offer control over the deposition rate and layer thickness [25, 26]. Importantly, it is a sustainable synthesis method, with processes primarily controlled at low temperatures, leading to significant energy consumption reduction [25, 26]. Furthermore, the ionic interactions enable the modification of crystallographic and grain properties at the solution-substrate interface [25, 26]. This technique is a chemical solution-based production method widely used in recent years [27]. It does not require a vacuum, quality substrates, room temperature, expensive equipment, or toxic solutions during production. Since the production is carried out at room temperature, the corrosion and oxidation of the base materials are prevented [28].

So far, a limited number of studies have been reported about the Rb-doped ZnO materials for antibacterials and photocatalytic applications; however, a secondary oxide phase, Rb2ZnO2, was obtained according to XRD analyses in these studies [24, 29]. There is a gap in the literature on the need for high-quality Rb-doped ZnO materials without secondary phases. Therefore, this study aims to fill this gap in the literature to understand better the potential of Rb-doped ZnO thin films for electrical and optical applications such as visible light PDs. The Rb-doped ZnO thin films synthesized via the SILAR method consist of hexagonal wurtzite structures without any secondary phase and with nanoscale grain formations for different amounts of Rb doping (2, 4, and 6 wt% Rb in the solution). All ZnO thin films produced with and without Rb doping showed photoresponse under visible light and the optimum results were obtained with 6 wt% Rb indicating that the SILAR method is suitable for photosensor applications.

2 Experimental procedure

The undoped ZnO and Rb-doped ZnO thin films were deposited on FTO substrates using the SILAR technique at room temperature and atmospheric pressure with 40 SILAR cycles. FTO substrates were cut to 9 mm in width and 9 mm in length. After that, the substrates were meticulously washed in soapy water, and cleaned with an ultrasonic bath for 10 min, and were dried within nitrogen environment for half an hour.

Zinc ammonium complex solution ([Zn(NH3)4]2+) was prepared for the cation precursor solution, in which analytical reagents of 0.1 M Zin chloride (ZnCl2) and aqueous ammonia solution (25–28% NH3 (1:10)) were used [27, 30]. The ZnCl2 solution was prepared in deionized water. For Rb-doped ZnO films, Rubidium sulfate (Rb2SO4) was added in the cation solution. The one SILAR cycle for undoped ZnO film contained four following steps: (1) The cleaned FTO substrate was immersed in the Zinc ammonium complex solution ([Zn(NH3)4]2+) for 20 s at room temperature so that a thin liquid film containing ([Zn(NH3)4]2+) complex ions was created on the substrate (2) The substrate was immediately immersed in hot deionized water (90 °C) for 7 s to form ZnO film. The non-adherent and unbounded particles were washed away into the water bath. As a result of passing the base material through pure or deionized water, weakly bound and unreacted NH4+ and OH ions are removed from the diffusion layer [27, 31]. (3) The substrate was dried in the air environment for 60 s. (4) The substrate was immersed with deionized water at room temperature for 30 s. to remove the counter ions and weakly bounded OH ions from both initial solutions in the diffusion layer [32, 33]. The detailed chemical reactions that occurred in the SILAR growth process are given as follows [34, 35].

$$2{{\rm{ZnCl}}}_{2}+4{{\rm{NH}}}_{3}\to 2{[{\rm{Zn}}{({{\rm{NH}}}_{3})}_{4}]}^{2+}+2{{\rm{Cl}}}^{-}$$
(1)
$${[{\rm{Zn}}{({{\rm{NH}}}_{3})}_{4}]}^{2+}+{{\rm{H}}}_{2}{\rm{O}}\to {{\rm{Zn}}}^{2+}+{{\rm{NH}}}^{4+}+{{\rm{OH}}}^{-}$$
(2)
$${{\rm{Zn}}}^{2+}+2{{\rm{OH}}}^{-}\to {\rm{Zn}}{({\rm{OH}})}_{2}$$
(3)
$${\rm{Zn}}{({\rm{OH}})}_{2}\to {\rm{ZnO}}({\rm{solid}})+{{\rm{H}}}_{2}{\rm{O}}$$
(4)

Table 1 gives the codes of the produced undoped and doped films. The Panalytical Empyrean X-ray diffractometer, SEM, HITACHI SU5000, and Raman spectrometer with confocal microscope (JASCO NRS4500) using 532 nm laser excitation and UV-1800 SHIMADZU were used for the XRD, SEM, Raman, and absorbance measurements. The Photoluminescence (PL) spectra were recorded using a Perkin–Elmer Model fluorescence spectrometer.

Table 1 The codes of the produced samples

The sensor system was equipped with a Keithley 2400 source meter for current measurements under dark and illumination (visible light at 532 nm) and an SM206 SOLAR power meter to measure the light power densities. The electrodes (IDE) were coated with silver paste using a shadow mask on a total surface of 9 × 9 mm, and thin copper wires were used as connecting leads. The electrode thickness and the distance between electrodes were 0.25 mm. The measurements were taken with the two-probe method [36, 37]. The area of the film exposed to light was 0.25 cm2, and the light illuminated from the top of the films.

3 Results and discussion

Figure 1 shows the XRD analyses of the produced samples. As seen in Fig. 1, The XRD peaks at the locations marked with asterisks come from the FTO substrate. All the diffraction peaks were attributed to the hexagonal wurtzite structure of ZnO, which was also verified from the JCPDS No.01–080–0075 data file [38]. When the XRD data were examined, it was observed that with increasing doping, there was a shift towards small angles, according to the relative difference between the Rb1+ (1.49 Å) [39] and Zn2+ (0.74 Å) [40]. No peak belonging to Rb was observed in XRD analyses. The small amount of Rb concentration can explain this situation, or it can be explained as an indication that the doping is completely done during the production stage. In other words, it can be said that the Rb dopant atoms replace the oxygen tetrahedral intermediates or the Zn ions exactly. According to the results, the peak intensities of ZnO films increased with Rb doping, possibly due to Rb anions’ occupation of oxygen vacancies. The (002) peak intensity was obtained 2021.46, 3956.27, 6725, and 9181 for ZnO, Rb2: ZnO, Rb4: ZnO and Rb6: ZnO films, respectively. The literature indicates that the intensities of the XRD peaks increase when the dopant atom is fully positioned inside the crystal cell, which supports our findings where the occupation of Rb takes place. [41, 42]. Şennik et al. have produced fluorine-doped ZnO (FZO) thin films using a chemical spray pyrolysis. They explained that F doping does not significantly alter the wurtzite structure of the ZnO films, but the intensity of the (002) peak increases slightly with increasing F concentration. This phenomenon is likely due to the filling of oxygen vacancies by F anions [42].

Fig. 1
figure 1

The XRD analysis of the produced samples

Table 2 gives the XRD parameters. Lattice parameters a and c were calculated using the below equations [43];

$$a=\frac{{\rm{\lambda }}}{\sqrt{3}\sin {\theta }_{(100)}}$$
(5)
$$\,c=\frac{{\rm{\lambda }}}{\sin {\theta }_{(002)}}$$
(6)
Table 2 The XRD parameters of Rb-doped ZnO films

As seen in Table 2, the a and c values slightly increased as the Rb concentration increased. The increasing c-axis length due to Rb doping can be ascribed to Rb ions taking the Zn sites tetrahedrally coordinated in the wurtzite crystal structure, causing tensile stress and structural defects in the host lattice [44]. The average crystallite sizes were estimated from the peak of (101) using Debye Scherrer’s formula [43];

$$D=\frac{0.94\lambda }{\beta \cos \theta }$$
(7)

where λ is the wavelength of x-ray radiation, β is the full width at half maximum (FWHM) and θ is the diffraction angle. The microstrain formula is shown by Eq. (8) [24];

$$\varepsilon =\frac{\beta \cos \theta }{4}$$
(8)

The dislocation density means the number of dislocations in a unit volume and is obtained by Eq. (9) [45];

$${\delta }=\frac{1}{{D}^{2}}$$
(9)

The electron jump length is obtained using the Eq. (10) [46];

$${\rm{Electron\; jump\; length}}=\frac{{\rm{a}}\sqrt{2}}{4}$$
(10)

where a is the lattice parameter for each composition, calculated from the observed d values of the X-ray diffraction patterns; thus, electron jump length becomes a unitless parameter. The unit cell parameter increases with increasing electron jump length [46]. This increase can be expected since the ionic radius of 1.49 Å for Rb1+ is higher than that of 0.74 Å for Zn2+ [31, 47].

The bond length is the equilibrium distance between two atoms bonded to a molecule. Bond length increases with increasing atomic size. The bond length (L) and positional parameter of the wurtzite structure (u) are given in Eqs. (11) and (12) [46];

$$L=\sqrt{\left.\left(\frac{{a}^{2}}{3}+{\left(\frac{1}{2}-u\right)}^{2}\right){c}^{2}\right)}$$
(11)
$$u=\frac{{a}^{2}}{3{c}^{2}}+0.25$$
(12)

The bond length for Zn–O was 1.9991 Å and decreased with the Rb dopant, confirming the Rb ion’s replacement in the ZnO matrix which is compatible with other studies in the literature [48, 49].

The unit of the cell volume is calculated in Eq. (13);

$${\rm{\nu }}=0.866.{a}^{2}.c$$
(13)

The crystal lattice distortion degree, R, is determined below Eq. 14 [50];

$$R=\frac{\left[2a{(\frac{2}{3})}^{\frac{1}{2}}\right]}{c}$$
(14)

In the literature, the value R is associated with the deviation of a crystal from its perfect arrangement, meaning that whenever R equals 1, the crystal has a perfect arrangement without any distortion [50, 51]. Here, the R is calculated as 1.019, 1.018, 1.018, and 1.019 for ZnO, Rb2:ZnO, Rb4:ZnO, and Rb6:ZnO films, respectively. The values are in the range of 1.019–1.018, meaning that our system has a slight distortion. Similar results by Ivanova et al. were also observed for the ZnO, and the ZnO:Mg films, suggesting a slight distortion with a non-linear pattern [50].

The XRD analyses were further conducted using the Williamson–Hall method [52]. Unlike the Scherrer method, it allows for more comprehensive and accurate calculations by considering internal stresses in addition to the crystal size [53].

The equation derived by using the approximation \({\beta }_{{hkl}}={\beta }_{{crystal\; size}}+{\beta }_{{internal\; stress}}\) and integral expansion is as follows [53];

$${\beta }_{{hkl}}\cos \theta =\left(\frac{k{\rm{\lambda }}}{D}\right)+(4\varepsilon \sin \theta )$$
(15)

In this equation, D is the crystallite size; λ is the wavelength of the transmitted beam; βhkl, half-peak width; θ is the angle corresponding to the maximum value of the peak; ℇ indicates internal stresses.

It can be considered as a straight line as an equality of y = ax + b. When the graph is drawn with y-axis β cosθ and x-axis 4 sinθ, the slope of the graph gives the internal stresses because of the linear fit obtained. The crystallite size is calculated by dividing the value where the graph intersects the axis by kλ [54].

$$D=\frac{k{\rm{\lambda }}}{{Intercept\; point\; of\; linear\; fit\; graph}}{\rm{and}}\varepsilon ={\rm{slope\; of\; the\; linear\; fit\; graph}}$$
(16)

Figure 2 shows the plot of β cosθ versus 4 sinθ. The crystal size was calculated as 103 nm, 48 nm, 54 nm, and 78 nm for ZnO, Rb2:ZnO, Rb4:ZnO, and Rb6:ZnO films, respectively. When the crystal size is calculated in the samples, it can be perceived that the dimensions measured by the W-H plot were more than those calculated by Scherrer since the latter does not reflect the effect of lattice defects on the broadening of the XRD peaks [55]. Moreover, the strain may be due to the lattice shrinkage observed in the lattice parameter calculation [56].

Fig. 2
figure 2

The plots of β cosθ versus 4 sinθ. a ZnO, b Rb2:ZnO, c Rb4:ZnO, d Rb6:ZnO films

Figure 3 presents the SEM analyses of the pristine and Rb:ZnO thin films. It is observed that thin films formed a homogeneous layer of nanoparticles over FTO substrates. The particle size first decreased for Rb2:ZnO and then increased for Rb4:ZnO and Rb6:ZnO. When the SEM results of Rb-doped ZnO samples were examined, the crystals with different dimensions were observed compared to the pure ZnO thin films, which is compatible with the studies of Sa’aedi et al. [57] and Kumar et al. [24]. Also, the solid phase of the micrographs is coherent with the crystal phase, as given in the XRD results, which is attributed to a solid crystal structure of ZnO:Rb thin films [58].

Fig. 3
figure 3

The SEM images of the ZnO (a), Rb2:ZnO (b), Rb4:ZnO (c) and Rb6:ZnO (d) films

Figure 4a shows the Raman spectra of the ZnO-based materials, and Fig. 4b–d shows the intensity, phonon lifetimes, and FWHM of the E2(high) mode. Raman spectroscopy was performed to understand the crystallographic and structural properties of the ZnO-based thin films. ZnO, wurtzite hexagonal structure, has a tetrahedral bonding structure where four oxygen ions surround the Zn ion, and four Zn ions surround the oxygen ion. In the unit cell, ZnO has four atoms, which leads to three acoustic and nine optic phonon branches [59, 60]. The zone center optical phonons can be written as follows [59];

$${\varGamma }_{{\rm{optic}}}={{\rm{A}}}_{1}+{{\rm{E}}}_{1}+2{{\rm{E}}}_{2}+2{{\rm{B}}}_{1}$$
(17)
Fig. 4
figure 4

a Raman spectra of the ZnO and Rb:ZnO films, (b) E2 (high) intensity (c) FWHM, and (d) phonon lifetime

Whereas A1 and E1 are polar modes that are Raman and IR active, E2 modes are nonpolar and Raman active, and while B1 modes are silent.

The peak at 101 cm−1 and the sharp peak at 440 cm−1 correspond to E2(low) and E2(high), representing the good crystalline quality of the wurtzite structure [59]. The 330 cm−1 and 382 cm−1 modes correspond to the E2(high)–E2(low) mode and the A1(TO) mode. The broad asymmetric peak at around 580 cm−1 is assigned to the E1(LO) mode, which agrees with reported thin-film values and nanocrystalline ZnO. This asymmetric and broad peak can be investigated as the combination of the A1(LO) at around 570 cm−1 and E1(LO) at around 580 cm−1. The relative intensity of A1(LO) and E1(LO) increased with the Rb doping owing to the incorporation of Rb into the ZnO host lattice. The incorporation of Rb atoms into host ZnO can be seen according to the increase in these peaks while maintaining the wurtzite structure of ZnO thin films. The E2 (high) mode first showed an asymmetric peak compared to the Rb-doped ZnO thin films due to the contribution of E1(TO) at around 412 cm−1. The doping of ZnO with Rb increased the symmetry of the E2(high) mode (Fig. 4b). Table 3 shows the E2(high) peak position values, FHWM, intensity, and phonon lifetimes. Besides that, the E2(high) Raman shifts displayed a blue shift with the Rb doping into host ZnO, which agrees with the literature [61]. The intensity of the E2(high) mode was increased, and the FWHM of the E2(high) mode was decreased with the increasing amount of Rb doping, suggesting an improvement in the crystal quality of the ZnO-based thin films (Fig. 4b–d). The phonon lifetimes of the thin films were calculated according to the formula below [62].

$$\frac{1}{\tau }=\frac{\varDelta E}{h}$$
(18)

Where τ is the phonon lifetimes (s), ΔE is the Raman linewidth (cm−1), and ћ is the modified Planck constant (cm−1 s). The phonon lifetimes of the ZnO-based thin films slightly increased due to the improvement of the crystal quality with increased Rb amount (Fig. 4d).

Table 3 Raman Spectra parameters of ZnO and Rb:ZnO films, wavelength, intensity, FWHM, and phonons lifetime

Table 4 shows the Raman spectra modes for 550 and 650 cm-1 wavelengths. The addition of Rb into the ZnO host lattice influenced the vibrational behavior of the material. The changes were more visible, particularly for the E1(LO) mode which, became active with the addition of Rb at around 585 cm−1. The intensity of E1(LO) first increased for Rb2:ZnO and Rb4:ZnO and then decreased for Rb6:ZnO. According to the literature, the E1(LO) mode is primarily linked to changes in the crystal lattice of ZnO [29, 63]. Besides that, the intensity changes and shifts for the E1(LO) mode were reported in the literature due to the defects arising after Rb doping [29]. Therefore, there are relatively more defects in Rb2:ZnO and Rb4:ZnO samples compared to pristine ZnO and Rb6:ZnO samples. The Raman spectra results indicate successful doping of Rb into the ZnO lattice for Rb-doped ZnO samples, which aligns with the XRD results.

Table 4 Raman spectra modes for wavelength between 550 and 650 cm−1

The linear optical absorbance spectra of pure and Rb-doped ZnO films are presented in Fig. 5. The absorbance measurements were measured from 350 nm to 1100 nm. Both samples showed absorption edges in the 350 nm to 400 nm range due to the band gap of ZnO. As seen in the figure, The Rb doping reduced the absorbance of doped films compared to pure ZnO film in the wavelength range of 350–500 nm. This reduction depends on the surface morphology and structure [64]. Soussi et al. reported a similar variation in the absorbance for La-doped ZnO films, where the absorbance decreases with the increasing La concentration from 3% to 9% [65]. Figure 6 demonstrates the (αhν)2–(hν) plots with the linear extrapolation intersecting point to calculate the band gap values of the produced films. The band gaps were estimated for direct allowed transition ((αhν)n; n = 2). For undoped and 2%, 4%, and 6% Rb-doped ZnO films, the estimated band gap values were 3.16, 3.22, 3.18, and 3.17 eV, respectively. The calculated band gap value for undoped ZnO film is compatible with previous studies [65, 66]. The addition of the Rb dopant caused a slight variation in band gap values due to the Burstein–Moss effect [67,68,69]. Maache et al. reported a similar slight increase of 3.21 eV for pure ZnO films and 3.22 and 3.24 eV for La-doped ZnO films with different doping ratios [67].

Fig. 5
figure 5

Absorbance spectra of the produced samples

Fig. 6
figure 6

TAUC plots for undoped a and Rb-doped bd ZnO films

Figure 7 displays the PL spectra of undoped and Rb-doped ZnO thin films taken at 325 nm excitation wavelength at room temperature, which consists of near band edge (NBE) and a deep level emission (DLE) band. PL spectra showed the presence of four main peaks centered at 405 nm (a), 443 nm (b), 464 nm (c), and 508 nm (d). A review study by Rai et al. reported the defect-related emissions for ZnO nanostructures where the origins of the blue, green, and yellow emissions in the wide band spectrum of luminescence were explained [70]. In our study, the peaks centered at 405 nm (a), 443 nm (b), 464 nm (c), and 508 nm (d) are correlated to NBE, violet-blue, blue and green emission, respectively, and the results are consistent with the reported wavelength regions by Rai et al. [70]. Gao et al. defined the DLE band in the range of 430–700 nm [71]. Ahn et al. also reported violet-blue, green, and orange-red emissions for ZnO attributed to the level of zinc interstitials (Zni), oxygen vacancy (Vo), and oxygen interstitial (Oi) defect levels, respectively [72]. The near-band-edge emission (NBE) peak at 400 nm was also observed by Basith et al. for pure and Fe-Doped ZnO nanostructures [73]. Kumar et al. observed the PL emission at the wavelength region of 427–387 nm attributed to NBE and excitonic emission [24]. As seen in Fig. 7, the green emission was observed at 508 nm and Fujihara et al. explained the defects causing the green emission as oxygen vacancies [74]. The violet-blue and blue emission peaks at 443 and 464 nm (Fig. 7) were attributed to the defect emission of zinc interstitials (Zni) [75].

Fig. 7
figure 7

PL spectra of undoped and Rb-doped ZnO films

The PL intensity increased for Rb2:ZnO and Rb4:ZnO films compared to undoped ZnO films. Then, the intensity decreased for Rb6:ZnO film (Fig. 7). As reported by Berlin et al., the oxygen vacancy concentration increases with decreasing grain size, and the oxygen defects act as PL centers [76]. They observed a decrease in grain size from 13.5 to 4.51 with increase in the Al concentration. Thus, oxygen vacancy concentration in Al-doped films prepared by Berlin et al. increased and the PL intensity also increased with increasing Al doping [76]. In Table 2, the crystal sizes were calculated as 34,16, 29, and 30 for undoped ZnO, Rb2:ZnO, Rb4:ZnO, and Rb6:ZnO, respectively. The Rb2:ZnO with the lowest grain size showed the highest PL intensity. Also, the change in PL intensity due to the Rb doping, grain size, and defect concentration is consistent with our Raman results.

The resistance values of the produced samples were measured in a dark environment where the films were not exposed to light (Fig. 8). Thus, it was investigated how the Rb contribution caused changes in the structure. The resistance values were obtained 34, 47, 11, and 4 MΩ for films with 0%, 2%, 4%, and 6% Rb, respectively. It is stated in the literature that the resistances in ZnO samples produced with chemical-based techniques are at the Megaohm level. Radhakrishnan et al. have grown ZnO nanostructures using the microwave-assisted wet-chemical growth method and measured the resistance of the sensors in Megaohms [77]. Wang et al. have reported that ZnO nanowires grown by hydrothermal method and found the resistance of ZnO nanowires in the Megaohms range [78]. Figure 8 shows how electrical resistance changes with Rb additive concentration. It is well known that nominally undoped ZnO often exhibits n-type conductivity due to natural donor defects such as zinc, interstitial, and oxygen vacancy. When doped with group 1 elements such as Rb or Li, the group-I species that replace Zn theoretically have shallow levels of acceptors. However, when Li+1, Rb+1 replaces Zn+2, the carrier density decreases, and the electrical resistance increases. According to previous literature, Li doping typically increased the resistance of n-type ZnO [79,80,81]. Other studies show that Li also tends to occupy transition sites that act as donors [82, 83]. Li, which sits in transition zones or oxygen spaces rather than in place of Zn, reduces the resistance by giving electrons to the structure. In our study, self-balancing with the increasing resistance up to 2% Rb contribution and decreasing with increasing contribution rate seems to cause Rb-doped first to have high resistance and then low resistance. In their study with Li-doped ZnO, Lu et al. observed a sharp decrease in electron concentration for ZnO:Li films with a Li content of less than 1.2% compared to undoped ZnO films [84]. They showed that Li acts as a p-type additive in ZnO as a whole. They showed that when the Li content was increased to more than 1.2%, Li behaved like a donor, increasing the carrier density, a condition specific to ZnO. They reported that the Lii-LiZn ratio increased with the Li content and changed the carrier density by self-compensating in Li-doped ZnO. In addition, as the Rb doping ratio increases, the increase and decrease in resistance can also be related to the grain size of the films depending on the Rb concentration. Electrical conductivity in crystalline materials can proceed along the GB conduction mechanism [85]. Since a nanocrystalline film has crystallites coupled with grain boundaries (GBs) on its surface, the boundaries between the crystallites play an essential role in determining the conductivity of the nanocrystalline film. This creates a potential barrier around the GB. According to the GB model, a decrease in crystallite size causes an increase in GB scattering, which leads to an increase in electrical resistance [85]. In Table 2, crystal sizes for pure ZnO, and samples with 2%, 4%, and 6% Rb additives were previously calculated as 34,16, 29, and 30. The 2% Rb-doped sample with the highest resistance has the lowest grain size. Jeong et al. also investigated the effect of Li dopant into ZnO and changed the doping rates from 0 to 10 [86]. They reported that the resistance of the Li:ZnO thin films increased up to 4% doping rate, and then the resistance decreased with increasing doping rate. They stated that in low doping rates, Li acts as an acceptor and reduces the number of carriers, while in higher doping rates, it acts as a donor and increases the number of carriers. In addition, S. H. Jeong et al. obtained the smoothest film and smallest grains for 4% Li doping rate [86].

Fig. 8
figure 8

The resistance values of the produced samples under dark conditions

The I–V measurements were measured at room temperature from −5 V to +5 V range, as shown in Fig. 9. The I–V measurements were taken to check whether the produced films have traditional thin film properties. As seen in Fig. 9, the ohmic contact occurred, and linear I–V graphs were obtained for all films under both dark and light conditions. The current values for +5 V under light were obtained as 1.14, 0.22, 1.79, and 8.65 μA for ZnO, Rb2:ZnO, Rb4:ZnO, and Rb6:ZnO, respectively. When the changes in the currents of the samples are examined, it is seen that they can be used as a detector. After the pure ZnO sample, the current values decreased with 2% doping and then increased at 4% and 6% doping ratios. When PDs were exposed to visible light, photons with energy greater than the band gap caused the formation of electron-hole pairs. Since the Rb element can help the formation of electron carriers, the conductivity of doped samples will increase [87, 88].

Fig. 9
figure 9

Photocurrent measurement of undoped a and Rb-doped bd ZnO films under dark and light conditions (20 mW/cm2)

In addition, the lower current values and higher electrical resistance observed in the Rb2:ZO sample compared to the undoped, Rb4:ZO, and Rb6:ZO samples can be associated with the smaller particle size of Rb2:ZO as seen in XRD results (Table 2). This result causes scattering and electron-electron interactions within the structure. As a result of the increase in scattering and electron-electron interactions, the grain boundaries and interface boundaries in the material increase. In this case, it prevents the flow of electricity and causes higher electrical resistance [89].

Figure 10 exhibits the dynamic photo response measurements for different light power intensities. The figure shows that the photocurrent increased as light intensity increased from 20 to 100 mW/cm2 for all samples. The high current under light for the sensor depends on the improvement of a considerable response, large surface/volume ratio, higher sensitivity, quantum efficiency, and high detection with lower noise current. The Rb6:ZnO sensor exhibited the highest photocurrent values for all light powers. Therefore, the impurity band obtained by doping of Rb has the double duty of e trap and releasing electrons in the center of ZnO. First, the Rb impurity band temporarily catches e, then rapidly releases and transfers it again [90, 91]. Doping is used extensively during the fabrication of semiconductor devices to adjust the electrical and material properties of semiconductors. The aim was to find the optimum ratio during the doping process. The importance of the optimum doping rate has been mentioned in previous studies. Anujency et al. produced Ni-doped ZnO nanorods with increasing dopant concentration from 0 to 5% using the hydrothermal method. The highest Responsivity (R), Detectivity (D*), and external quantum efficiency (EQE) values were obtained for 3% Ni-doped ZnO nanorods photodetector and these values increased compared to undoped ZnO photodetector from 0.84 to 1.87 × 10−2 (AW−1), from 1.43 to 4.11 × 109 (Jones) and from 2.7 to 43.23%, respectively [38]. Jenish et al. İnvestigated the SILAR deposited Fe-doped ZnO thin films with different Fe ratios (0, 2, 4, 6, and 8%) to define the optimum doping rate. The 4% Fe dopant ratio was determined as the optimum rate, and the R, EQE, and D* values were obtained as 1.96 × 10−1 AW−1, 45.83%, and 4.95 × 1010 Jones, respectively [92].

Fig. 10
figure 10

The dynamic photo response measurements of the produced samples for 5 V a ZnO, b Rb2:ZnO, c Rb4:ZnO, d Rb6:ZnO films

The main photo sensing parameters (R, D*, and EQE) were calculated from the photo response measurements. The responsivity (R), which is the applicability of the visible-light photodetector, was calculated below equation [93];

$$R=\frac{{I}_{P}}{{P}_{m}{xA}}$$
(19)

Where Ip, P, and A indicate the photoinduced current, the power of incident light photon, and the selection the effective area A, respectively.

The detectivity, generally denoted by the letter “D*”, is another essential metric for comprehending the capacity of the photodetector devices to detect weak optical signals or less detectable signals and is measured in terms of Jones. The D* can be determined using the relation given below [94];

$${D}^{* }=R.\sqrt{\frac{A}{2e{I}_{d}}}$$
(20)

Where Id and e show the dark current and the charge of an electron, respectively. The EQE can be calculated using the formula below [95];

$${EQE}=R\frac{{hc}}{e{\rm{\lambda }}}$$
(21)

Where h, c, and λ are the physical constants such as Planck’s constant, the velocity of light, and the incident photon’s wavelength, respectively.

The variation of responsivity, EQE, and detectivity values for the produced films depending on the light power density and the doping concentrations are presented in Figs. 11 and 12. The Rb6:ZnO film showed the highest R-value compared to others due to its larger crystalline size and lower strain. Additionally, the produced Rb6:ZnO film has rectangular-shaped porous grains, which ensures a longer lifetime of electron and hole pairs. Thus, it contributes to the effect of the impact of ionization-induced carrier multiplication [96]. Splitting the electron flux from the photosensor under operating conditions by the photon flux incident on the photosensor is determined by the EQE. The EQE values were calculated as 0.05%, 0.20%, 0.47%, and 7.61% for ZnO, Rb2:ZnO, Rb4:ZnO, and Rb6:ZnO, respectively. The increase in EQE values can be explained by new energy levels formed with doping. This situation leads to the increased separation of photon carriers (e and h+) and a consequent decrease in charge carrier recombination [93].

Fig. 11
figure 11

Responsivity a, EQE b, and detectivity c of the produced samples as a function of visible light power densities

Fig. 12
figure 12

Responsivity a, EQE b, and detectivity c vs. the ratio of the doping concentrations of produced samples at 20 mW/cm2

The photo-response time is a key measurement to determine how fast a varied optical signal can be transferred or followed. The photo-response time consists of response and recovery time. Response (Rise) and Recovery (Fall) time are essential parameters for photosensor applications. Figure 13 depicts the response times of the produced samples under visible light. The light intensity has an impact on the optical, and electrical performance of the device. It was thought that the sensitivity of the devices to light could be attributed to the optical sensor feature of the device, that is, the formation of electron-hole pairs after optical absorption [96].

Fig. 13
figure 13

The response times of the produced samples

The recovery times of the produced samples are given in Fig. 14. The best results in other photosensor measurements were obtained in the sample with 6%. Considering the response and recovery times, the response time for the Rb6:ZnO sample at 20 mW/cm2 light power source was calculated as 6.4 s and the return time as 7.2 s. It is seen that all samples have swift response and recovery times and seem to be suitable as a material to be used as a photosensor.

Fig. 14
figure 14

The recovery times of the produced samples

When the current studies in the literature are examined, it is seen that REE-doped metal oxides and different materials such as In2S3 and PbS are used as photo sensor materials. However, as far as we know, only one REE-doped ZnO photosensor study was reported. Kumar et al. investigated the Ce-doped ZnO nanophosphors for UV sensors. The dynamic measurements were taken in light-dark conditions, and it was reported that the best sensitivity was observed for 3% Ce-doped ZnO. The obtained results were attributed to the generation of electron-hole pairs under illumination [97].

The effect of Terbium (Tb) doping on the properties of V2O5 thin film was reported by Altowyan [98]. The responsivity, detectivity, and EQE of the pure V2O5 film were calculated as 1.19 × 10−2 A/W−1, 4.97 × 109 Jones, and 2.78%, respectively. A significant increase in R, D*, and EQE values was observed, with the addition of the Tb REE. Among the defined doping concentrations, the film with a 3% Tb rate exhibited a maximum R (4.72 × 10−1 A/W), D* (7.82 × 1010 Jones), EQE (110%), and high photo-switching characteristics.

The Co3O4 thin films with Samarium (Sm) at concentrations of 1, 2, 3, and 4 wt% were deposited using a nebulizer-assisted spray pyrolysis coating process by Shkir [99]. The Co3O4:Sm film at 3 wt% showed the maximum photocurrent value (9.32 × 10−5 A) and photo response characteristics. The 2.95 × 10−1 A/W, 69%, and 1.83 × 109 Jones were obtained for the R, EQE, and D* properties. The response and recovery time were reported as 0.3 s and 0.2 s, respectively.

Loyola Poul Raj et al. produced NiO thin films including different Yttrium (Y) amounts (0, 1, 2, and 3 wt%) by spray pyrolysis method to use as UV photosensor [100]. The 2 wt% Y doped film with the 20 × 10−2 A/W responsivity value, 5.53 × 109 Jones detectivity value, and 70% EQE value exhibited higher performance than pure NiO thin film (10.5 × 10−2 A/W, 3.33 × 109 Jones and 36%). The 2% Y dopant ratio was determined as the optimum rate. They also studied Erbium (Er), Praseodymium (Pr), and Terbium (Tb)-doped NiO thin films (1 wt%) prepared by automated nebulizer spray pyrolysis method. The results showed that the Pr-doped NiO photodetector sample presented the highest photocurrent, better R (3.45 × 10−1 AW−1), D* (1.20 × 1010 Jones), and EQE (81%) values under increasing UV light densities (from 1 to 5 mW/cm2) [101].

Altowyan et al. used the spray pyrolysis method to obtain the Erbium (Er) doped In2S3 with different Er concentrations (from 1 to 5%). The R, D*, EQE properties were calculated as 0.15 AW−1, 2.41 × 1010 Jones, 36% for undoped sample and 1.05 AW−1, 12.1 × 1010 Jones, 246% for 2% Er-doped In2S3 sample, respectively [102].

4 Conclusions

Pristine and Rb-doped ZnO layers were successfully coated onto FTO substrates using the SILAR method. XRD analyses showed that all the diffraction peaks matched the hexagonal wurtzite structure of ZnO. No Rb peak was detected in the XRD pattern, indicating that the Rb ions were either incorporated into the ZnO lattice or substituted into ZnO instead of oxygen tetrahedral interstitials. SEM analyses revealed that thin films are formed of nanoparticles where the feature size first decreased for Rb2:ZnO and then increased for Rb4:ZnO and Rb6:ZnO. The phonon lifetimes of the ZnO-based thin films slightly increased due to the improved crystal quality with the increasing Rb amount in the SILAR solution. The Rb6:ZnO sensor exhibited the highest photocurrent values (~10−4 and 10−3) for all light powers, indicating promising sensitivity to light. These results suggest that the produced samples have optical sensor properties, as they are capable of optical absorption, enabling the generation of electron-hole pairs. The measurements conducted under light indicate that the Rb-doped ZnO synthesized via the SILAR is suitable for an optical sensor material.