1 Introduction

Majority of antibiotics are produced by bacteria, moulds or other microorganisms as secondary metabolites or synthetic analogues. Tetracyclines are a class of broad-spectrum antibiotics with phenanthrene mother nucleus discovered in the 1940s, and it includes tetracycline (TC), oxytetracycline (OTC), aureomycin (CTC) and doxycycline (DOX) [1]. These antibiotics are rapid bacteriostatic agents that may swiftly stop bacterial development and eliminate bacterial populations in high concentration. They are broad-spectrum antibiotics with a wide antibacterial range, and have effects on both gram-positive and gram-negative bacteria [2]. If the dosage of antibiotics is too large and last for a long time, it will stimulate the digestive tract of the human body to generate some extent antibacterial effect [3]. To date, a wide range of techniques have been created for the efficient detection of TC. These techniques include electrochemical sensors, wash-free homogeneous immunoassay, surface-enhanced Raman spectroscopy, capillary electrophoresis and high-performance liquid chromatography (HPLC) [4,5,6,7,8]. Compared with the methods mentioned above, fluorescence spectrophotometry is becoming more and more popular because of its inexpensive and time-saving factors [9].

Apart from antibiotics, pH value is a fundamental variable that has a significant impact on biochemical reactions and physiological processes [10]. The widespread support for physical health is making reliable pH measurements more and more crucial [11]. Till now, several methods for measuring pH are being designed, including scanning probe microscopy [12, 13], Raman spectroscopy [14, 15] and fluorescence-based measurements [16, 17]. Among them, fluorescence-based nanosensors have become increasingly popular due to their quick response, time-saving and safe operation [18].

Graphene quantum dots (GQDs), as a zero-dimensional carbon nanomaterial, have obtained wide attention of many researchers because of its outstanding optical, chemical properties, superior biological compatibility and easy functionalization. Based on these excellent properties of GQDs, thriving development has been realized in many adhibitions including photocatalysis [19], LED [20], drug carriers [21], cell imaging [22] and optoelectronic devices [23], especially in fluorescent sensor [24]. For example, Chunxi et al [25] reported that the as-prepared N, S-GQDs were used as temperature probe and TC fluorescence sensor. Chunxi et al [26] developed N-GQDs by using untreated green kelp and ethylenediamine as precursor materials, of which the fluorescence could be available for pH sensing and detecting Co2+ through visualization. Lihong et al [27] synthesized the N-GQDs as fluorescent nanosensors for detecting Co2+ and temperature. However, there are few reports on the applications involving the simultaneous detection of pH and TCs. Meanwhile, these fluorescent probes can only conduct qualitative analysis and cannot realize real-time quantitative detection. Due to the portability and omnipresent usability, smartphones have become the latest generation of chemical assay analysis tools [28, 29], which can swiftly convert colour signals into digital information by measuring the sample photographs. Therefore, it is of great significance to develop a quick, sensitive and visible smartphone-based sensing platform for practical on-site TCs and pH sensing application.

In this study, N-GQDs are obtained via a convenient and budget hydrothermal reaction by using citric acid and Tris as carbon and nitrogen sources. The as-prepared N-GQDs show bright blue fluorescence with excellent stability and uniform size, and the surface is highly functionalized with oxygen and nitrogen-related functional groups. The fluorescence intensity of N-GQDs presents obvious decrease with the increase of pH value from 3.0 to 12.0, and demonstrates reversible and stable detection capability in pH sensing. In addition, the N-GQDs exhibit excellent TC sensitivity due to inner filter effect (IFE), and the detection limit is 94 nM. Furthermore, a simple, inexpensive and smartphone-based device integrated with N-GQDs is developed for the rapid and quantitative detection of pH and TCs. The RGB analysis software is used to analyse fluorescence images, which acquires a good linear relationship (R2 = 0.996) between the RGB value and the pH. For TC detection, it exhibits a sensitive detection limit of 97 nM (Scheme 1). Consequently, this N-GQDs-based sensing strategy not only holds promising potential for sensitive, ultrafast and visual quantitative determination of pH and TCs residues in water samples, but also provides a novel approach for building reliable, convenient and on-site analysis platform.

Scheme 1
scheme 1

(a) Synthesis process of the N-GQDs and the application in pH and TC sensing. (b) RGB image analysis process for pH and TC.

2 Experimental

2.1 Materials

Tris (99%), citric acid (99%), TC (98%), DOX (98%), CTC (98%), OTC (98%), chloramphenicol (Chl, 97%), cysteine (Cys, 96%), FeCl3 (99%), CaCl2 (99%) CuCl2 (99%), ZnCl2 (99%), PbCl2 (99%), MgCl2 (99%), CdCl2 (99%), KCl (99%), AgCl (99%), K2CO3 (99%), HCl (≥96%) and NaOH (≥96%) were purchased from Aladdin (Shanghai, China) and used directly without further purification. All aqueous solutions used in all experiments were purified using a microporous system with a resistivity of 18.2 MΩ.

2.2 Synthesis of N-GQDs

The following steps were taken to prepare N-GQDs: 4 mmol Tris and 2 mmol citric acid were fully dispersed in 20 ml aqueous solutions by ultrasound for 15 min. Next, the above mixed solution was placed in a 50 ml Teflon-lined autoclave and heated at 180°C for 5 h. The obtained solution was dialysed (retained molecular weight: 100–500 Da) for 3 days and centrifuged at 5000 rpm for 5 min. Finally, the transparent yellow solution was lyophilized to obtain a slight yellow powder and stored at 4°C for further uses.

2.3 Fluorescent sensing of pH

The pH sensing fluorescence characteristics of N-GQDs was further explored by changing the pH value within 3 to 12. The 50 μl N-GQDs solution was dispersed in 3 ml PBS solution at different pH values, and the fluorescence intensity was recorded by exciting at 358 nm. For the pH reversible measurements, 50 μl N-GQDs was dispersed in the initial solution with the pH value 3, and then HCl and NaOH were alternately added to the mixture to adjust the pH to the corresponding value before every fluorescence measurement.

2.4 Detection of TCs

The TCs test was carried out in neutral solution. In the meantime, some representative substances were selected to detect the selectivity of N-GQDs, including Chl, Cys, Fe3+, Ca2+, Zn2+, Cu2+, Pb2+, Mg2+, Cd2+, K+, Ag+, Cl and CO32–. The above substance solutions (1 mM) were prepared with PBS solution. Next, 50 μl N-GQDs was fully mixed with 3 ml test solution to form uniform solution. The fluorescence spectra were recorded after reaction for 5 min. All processes were conducted at indoor temperature.

2.5 Smartphone-based detection

The photographs were taken with a 48-megapixel smartphone (Redmi K40, Xiaomi Corporation, China). An on-site photograph processing app (Color Picker) was used for quantifying the colour of images to the RGB values by using the following formula:

$$\mathrm{RGB value}=\mathrm{Red}+\mathrm{Green}+\mathrm{Blue}$$
(1)

Then the RGB value pixel intensities were used as the signal of the analyte, and these values were used to obtain the calibration curve of pH values and TC concentrations.

2.6 Real sample preparation

To evaluate the performance of the N-GQDs sensor in real sample, the mineral water, tap water and river water samples were collected. Next, the different concentrations of TC were added to the liquid samples and well mixed for later detection. The corresponding t-test results were analysed using HPLC as the reference method.

3 Results and discussion

3.1 Characterization of N-GQDs

The transmission electron microscopy (TEM) is used for characterizing the size distribution and crystal mass of the prepared N-GQDs. Figure 1a demonstrates the representative TEM image of N-GQDs, and the prepared N-GQDs are homogeneous and well dispersed. Additionally, the N-GQDs have a size range from 1 to 7 nm and the average size is 3.2 nm. The high-resolution TEM image is depicted in the inset of figure 1a, which amply shows the N-GQDs have the lattice spacing of 0.24 nm. This is attributed to the (100) facet of graphitic carbon [30, 31]. The atomic fluorescent microscope image (figure 1b) exhibits the uniform morphology of N-GQDs and the height distribution is in the range of 0.25 and 0.8 nm, corresponding to 1–2 layers of graphene (inset of figure 1b). Subsequently, the Raman spectrum (supplementary figure S1) of the N-GQDs shows two classic peaks near 1350 and 1580 cm–1, which are disordered (D) and crystalline (G) bands. The sp3 defect is represented by D band, while the in-plane vibration of sp2 carbon is denoted by G band. In addition, a high crystallinity structure for the N-GQDs is suggested by the ID/IG ratio of 0.61, which is consistent with the TEM results.

Figure 1
figure 1

(a) TEM image of as-prepared N-GQDs. The insets show the Gaussian particle size distribution (top left) and high-resolution TEM pattern (bottom right) of N-GQDs. (b) Atomic fluorescent microscope image of the N-GQDs. The inset shows the height profile analysis along the line-cut in the image. (c) The FT-IR spectrum of N-GQDs. The high-resolution spectrum of (d) C 1s, (e) O 1s and (f) N 1s.

The surface functional groups and the element analysis of N-GQDs are characterized by Fourier transform infrared (FT-IR) and X-ray photoelectron spectroscopy (XPS). The FT-IR spectrum (figure 1c) shows typical absorption bands at 3357 and 3195 cm–1, representing –OH and –NH [32]. The absorption peak at 2941 cm–1 is attribute to the C–H stretching vibration [33], and the vibration of the C=O bond from the carboxyl group is also found on the surface of N-GQDs at 1725 cm–1. The peaks of 1590 and 1446–1490 cm–1 represent the presence of C–N and aromatic nucleus [34]. The peak at 1156 cm–1 corresponding to the stretching vibrations of C–O [35]. It can be concluded from the above FT-IR data that many hydrophilic functional groups (hydroxyl, carboxyl) are decorated on the surface of N-GQDs, which is the reason why the good hydrophilic property of the prepared N-GQDs. Subsequently, the full scan XPS spectrum in supplementary figure S2a demonstrates that the N-GQDs are comprised of C 1s (284.6 eV), N 1s (399.8 eV) and O 1s (532.6 eV) [36, 37], and the atomic percentages of C, N, O are 43.00, 27.46, and 29.54% (supplementary figure S2b), suggesting that the obtained N-GQDs are successfully doped with N. Additionally, the configuration of the bonds is studied by using high-resolution XPS. The fine C 1s spectrum (figure 1d) is fitted with three peaks at 284.7, 285.2 and 286.7 eV, which are linked to C–C/C=C, C–O/C–N and C=O [38, 39], respectively. Meanwhile, the high-resolution O 1s spectrum in figure 1e reveals three different kinds of O-functionalities: C=O (531.1 eV), C–O (532.1 eV) and O–N (532.8 eV) [40]. Furthermore, the high-resolution spectrum of N 1s (figure 1f) exhibits the presence of N–H at 398.5 eV, C–N at 399.2 eV and N–O at 400.7 eV. These results of above structural characterization are consistent with FT-IR, which clearly shows that the synthesized N-GQDs consist of aromatic sp2 domains and sp3 carbon defects with hydrophilic groups on the surface.

3.2 Optical properties of N-GQDs

The optical characters of N-GQDs are identified by UV–vis and fluorescence spectra. In figure 2a, the UV–vis absorption spectrum has two classic absorption peaks at 248 and 315 nm, which represent the ππ* transition of C=C and nπ* transition of C=O/C–N [41]. The transparent yellow solution of N-GQDs emits bright blue fluorescence under the excitation of 365 nm UV lamp (figure 2a inset). The maximum emission wavelength is 435 nm with the excitation wavelength at 358 nm. As shown in figure 2b, when the excitation wavelength gradually increases from 320 to 400 nm, the emission wavelength exhibits a distinct red shift from 400 to 460 nm. Figure 2c shows the two-dimensional fluorescence matrix scan of N-GQDs, in which a striking comparison and non-circular region (λem = 435 nm, λex = 358 nm) is obviously observed, directly indicating the excitation dependence of N-GQDs. Subsequently, quinine sulphate (QY = 54%) is used as the standard to test QY of N-GQDs, and it is determined to be 14.42% (supplementary figure S3). Moreover, the yield of N-GQDs can reach up to 61.50%, which plays an important foundation for massive applications of N-GQDs in many other domains.

Figure 2
figure 2

(a) UV–vis absorption, PL and PLE (photoluminescence emission) spectra of N-GQDs. The illustrations exhibit the optical pictures of N-GQDs solution under sunlight (left) and 365 nm UV light (right). (b) The emission spectra of N-GQDs under different excitations from 320 to 400 nm (10 nm interval). (c) Excitation (λex) and emission (λem) two-dimensional matrix mapping of N-GQDs. Dependence of the fluorescence intensity of the N-GQDs on (d) irradiation time (365 nm UV lamp), (e) storage time and (f) NaCl concentration.

The variation in fluorescence emission intensity is recorded in different cases, for example, UV irradiation time, storage time and ionic concentration by NaCl. Figure 2d depicts the fluorescence intensity at different times under UV irradiation (365 nm), and the intensity is merely decreased by roughly 3.8% for 200 min, suggesting the N-GQDs possess excellent stability by UV light. The fluorescence intensity of N-GQDs maintains 95.7% after 10 weeks of storage at room temperature, see figure 2e. In addition, figure 2f demonstrates that the N-GQDs fluorescence intensity holds steady in 2 mol l–1 NaCl aqueous solution, reflecting that the fluorescence intensity of N-GQDs will not be affected at high ionic intensity.

3.3 Fluorescent response of N-GQDs to pH

The N-GQDs discussed in this work are constitutionally pH sensitive and used as effective fluorescent pH indicators. Figure 3a shows the fluorescent intensity of N-GQDs diminishes with the increase of pH value, and a good linearity between fluorescent intensity and pH values in the range of 3 to 12 is recorded (figure 3b). Additionally, supplementary figure S4 shows the pH-dependence of the QY values of N-GQDs, indicating that the QY value decreases with the increase of pH value, which is related to the change of fluorescence intensity with pH value. Furthermore, the invertible capability of this fluorescent pH sensor is also studied in figure 3c. The HCl and NaOH solutions are used to adjust the pH value between 3 and 12. Under the same condition, the fluorescence intensity almost remains the original value, indicating that the synthesized N-GQDs have excellent reversible pH property. The possible mechanism of significant fluorescence quenching is due to the ionization of hydroxyl and carboxylic acid groups with increasing pH value. According to the results of FT-IR and XPS (figure 1c–f), the as-prepared N-GQDs are comprised of oxygen- and nitrogen-related functional groups, such as hydroxyl (–OH), carboxylic acid (–COOH) and amine [42]. Simultaneously, the nitrogen in amine involves lone pair electrons that can be simply provided to the N-GQDs. Under alkaline cases, the amine groups may be deprotonated to generate –NH2 group, supplying the N-GQDs with lone pair electrons. And the hydroxyl and carboxylic groups also undergo deprotonation, resulting in the constitution of –O and –COO, which can hinder the exciton recombination process. Therefore, the electron density in the surface functional groups of the N-GQDs is decreased and simultaneously quenches the photoluminescence (PL) intensity of N-GQDs. On the contrary, the amine functional group will be protonated (–NH3+) under acidic condition [43]. The positive amine can neutralize the lone electrons pair and erase the transfer of electron to N-GQDs, thus enhancing PL intensity. In addition, the distinct surface states of N-GQDs can be reflected in the UV–vis spectrum. Figure 3d shows the UV–vis absorption spectrum of N-GQDs at different pH values. The absorption peak at 315 nm of N-GQDs is higher under alkaline condition, and the higher absorption peak at 248 nm increases with the pH values increasing [44]. To further validate the above hypothesis, zeta potential measurement of N-GQDs in different pH values of buffer solution is conducted and the result is shown in supplementary figure S5. Interestingly, the zeta potential data indicate a decreased linearly with increasing pH value [45, 46]. This result clearly proves the deprotonation of amine group and ionization of hydroxyl and carboxylic acid groups in higher pH value. Finally, the schematic diagram of fluorescence quenching mechanisms of N-GQDs induced by pH is shown in figure 3e.

Figure 3
figure 3

(a) The pH-dependent PL spectra of N-GQDs. (b) The linearity between the fluorescent intensity and pH value from 3 to 12. (c) The reversible pH-dependent fluorescence of the N-GQDs. (d) UV–vis absorption spectra of N-GQDs solutions at diverse pH values. (e) Schematic diagram of fluorescence quenching mechanism inside of N-GQDs.

3.4 Fluorescent response of N-GQDs to TC

As the actual environmental system is highly complex, the as-synthetized N-GQDs should have unique selectivity to TCs. Many interfering substances including some antibiotics (Chl), amino acids (Cys), metal ions (Fe3+, Ca2+, Zn2+, Cu2+, Pb2+, Mg2+, Cd2+, K+, Ag+) and anions (Cl, CO32–) are added into the as-prepared N-GQDs solution. As shown in supplementary figure S6a, the TCs can lead to significant fluorescence quenching over 98% of the fluorescence intensity of N-GQDs, which is due to their alike absorption characteristic peaks in UV–vis absorption spectrum (supplementary figure S7). For other inspected species, such as some antibiotics and amino acids, metal ions and anions cause only tiny changes in fluorescence intensity of N-GQDs, even concentration up to 1 mM. Then the interference of different analytes on N-GQDs fluorescence is analysed. Supplementary figure S6b exhibits changes in fluorescence intensity of N-GQDs in mixtures of TC and other analytes, which suggest that the luminescence quenching remains intact. These consequences plainly prove extraordinary sensitivity and selectivity of the N-GQDs in detecting TCs.

With the addition of TCs, the fluorescence intensity of N-GQDs is quenched. TC is taken as the representative analyte to analyse the sensitivity of N-GQDs to TCs, and the corresponding fluorescence intensity variation with different concentrations of TC is recorded in figure 4a. The fluorescence intensity of the N-GQDs decreases rapidly along with increasing concentration of TC from 0 to 200 μΜ. Figure 4b shows the relationship between the (F0F)/F0 value and the concentration of TC (F and F0 present the fluorescence intensities of N-GQDs with or without TC, respectively). In the range of 1 to 50 μM, the fluorescence intensity of N-GQDs decreases linearly with the addition of TC, and the detection limit is calculated as 94 nM. Supplementary table S1 sums up the contrast of TC detection with various fluorescent probes, indicating the detection limit of this work is lower than most other reported methods and comparable with the best ones. Figure 4c shows the pictures of N-GQDs solution at different TC concentrations under the daylight (top) and UV irradiation (bottom). When the TC concentration comes up to 200 μM, the fluorescence of N-GQDs solution nearly disappears. This phenomenon of fluorescence quenching suggests that there may be some interaction between the as-prepared N-GQDs and TC. FT-IR and XPS have indicated that the existence of hydrophilic groups (–OH, –COOH and –NH2) on the surface of the as-prepared N-GQDs, while there are some hydroxyl and carbonyl groups in TCs molecules. Hydrogen bonds will be formed as long as they are mixed. The formation of hydrogen bonds between the N-GQDs and TCs make the N-GQDs target TCs with high selectivity and sensitivity for the determination of TCs [25, 47]. In addition, the FT-IR spectra in figure 4d show no new absorption site and no shift appear, indicating no formation of functional groups on the surface of the N-GQDs. Figure 4e shows that the fluorescence spectra of the N-GQDs have a great spectral overlap with the absorption spectrum of the TC (about 358 nm), suggesting that mechanism of N-GQDs response to TC is probably due to the IFE or fluorescence resonance energy transfer [48, 49]. In order to further discriminate the fluorescence resonance energy transfer and IFE, the fluorescence lifetime is measured. Figure 4f shows that the average fluorescence lifetime of N-GQDs (τ1 = 7.486 ns) is very close to the average lifetime of N-GQDs with TC (τ2 = 7.485 ns), suggesting no fluorescence resonance energy transfer occurs during the quenching of N-GQDs by TC [50]. Hence, the IFE is considered as the major process in the fluorescence quenching.

Figure 4
figure 4

(a) Fluorescence responses of N-GQDs solution with increase in TC concentration. (b) Fluorescence quenching values (F0F)/F0 varying with increase in the TC concentration (0–200 μM). The inset shows the linearity between the TC range detection (1–50 μM). (c) The optical pictures of N-GQDs under daylight (top) and 365 nm UV (bottom) irradiation in different concentrations of TC. (d) The FT-IR spectra of the N-GQDs with and without TC. (e) The UV–vis absorption spectra of TC, and the PLE and PL spectra of the N-GQDs. (f) The fluorescence decay profiles of N-GQDs with and without TC.

3.5 Smartphone sensing platform

Instruments such as fluorescent spectrometers and UV–vis spectrophotometers are frequently required for fluorescent and quantitative analyses, and the routine is only used in laboratory conditions [51]. To meet the demand of on-site analysis, it is critical to employ a quick and efficient procedure. A simple smartphone-based small device that combines N-GQDs is created for the optical detection of pH value and TC concentration, as illustrated in figure 5a. The smartphone-based device is a portable dark box composed of a sample slot to place the sample cell, a UV lamp and a smartphone with a Color Picker APP [52]. The software can control the smartphone to collect photo images and obtain the corresponding RGB values of these photographs. As exhibited in figure 5b, the obvious colour transition from blue to dark can be observed with increase in the pH value and TC concentration. A good linear relationship (R2 = 0.996) between the RGB value and the pH value is depicted in figure 5c. Figure 5d shows that the RGB values of N-GQDs decrease with the increase in TC concentration, and the detection limit is calculated to be 97 nM. Therefore, by combining smartphone-based device with N-GQDs, we have achieved convenient and rapid visual quantification of pH value and TC concentration.

Figure 5
figure 5

Hardware design of a smartphone fluorometric sensing platform: (a) 3D structure design and the image decomposition method for pH and TC detection using a smartphone app. (b) The digital images of N-GQDs with different pH values and TC concentrations under 365 nm UV light. (c) Plot of RGB values and pH value. (d) Plot of RGB values and the concentrations of TC. Inset: the linear plot of RGB value vs. the concentration of TC (0–50 μM).

3.6 Determining TC in real water samples

To further access the applicability, the smartphone sensing platform measures the concentration of TC in real water sample (figure 6), and the detection results are compared with typical HPLC method in detail. All measurements are repeated three times, and the recoveries are validated by spiking different concentrations of TC into the water samples, which directly reveal the accuracy of the analytical method. As revealed in table 1, the recoveries of TC in the real water samples range from 95.50 to 100.39%, indicating that our proposed method has excellent accuracy and reliability. Additionally, the t-test shows no significant differences between the smartphone platform and HPLC assay results at a 95% confidence level [53]. According to all the findings, it is possible to accurately and simply measure the concentration of TC in complicated water samples using a smartphone-based device with N-GQDs.

Figure 6
figure 6

Schematic diagram of TC residue detection in real sample by smartphone sensing platform.

Table 1 Determination of TC in water samples using smartphone platform and HPLC method.

4 Conclusion

A simple and low-cost hydrothermal reaction is presented for the synthesis of highly fluorescent N-GQDs by citric acid and Tris with the QY of 14.42%. The obtained N-GQDs not only show excellent fluorescence stability and excitation-dependent emission, but also has a high yield of 61.50%. Interestingly, the N-GQDs exhibit fantastic pH-dependent fluorescence with the linear response from pH = 3 to 12 values, which suggest the good prospects of the N-GQDs for pH sensing. In addition, the results show that N-GQDs exhibit remarkable sensitivity to TCs because of IFE. Furthermore, smartphone-based device with N-GQDs is constructed to detect pH value and TC concentration, and the smartphone-based device has great linearity for sensing pH and a low detection limit (97 nM) for detecting TC. This method offers a useful approach for the quantitative analysis for pH value and TC concentration and successfully applied to monitor the dynamic changes of TC concentration in actual water samples, which would provide an efficient strategy for visual monitoring and assessment of water quality.