Introduction

The discovery of the Raman effect in 1928 has not only aided to the fundamental understanding of the quantum nature of light and matter interaction but has also opened completely novel areas of optics and spectroscopic research that has accelerated greatly during the last decade. The utility of Raman spectroscopy has been demonstrated for a diverse and wide range of biological, biomedical, and chemical applications, such as chemical imaging of living cells and tissues1, stem cell2 and cancer research3, bacterial identification4,5,6,7, chemical hazards and illicit substances detection8, as well as food and product authentication9, and with a great deal of interest and research into its potential for disease diagnosis in the laboratory10,11,12 and in-vivo13,14,15,16. Raman spectroscopy has been developed into a variety of methods and experimental realizations, such as confocal Raman microscopy, Raman endoscopy, spatially offset Raman spectroscopy (SORS), resonance Raman spectroscopy, and surface enhanced Raman spectroscopy (SERS). The listed Raman spectroscopy and microscopy methods are non-destructive, label-free, non-invasive, and capable of providing 3D molecular sensing with depth profiling. Such capabilities, however, come at the cost of high requirements for instrumentation: (i) the used laser should have stable wavelength and stable high optical power, (ii) the spectroscopic sensor should have low noise, and (iii) the spectrometer’s optics should have a large clear aperture. Therefore, Raman spectroscopy and microscopy applications that require high spectral resolution and sensitivity would normally need to be performed on high-end, bulky, and costly Raman instruments. The need for miniaturization of Raman instrumentation is driven by applications where the complexity and/or the bulkiness of existing devices is obstructive. Application examples in need of miniaturization include space exploration17,18,19, on-site toxic substance inspection20,21,22, in-vivo diagnostics of tissues23,24, chemical identification in hardly accessible places using robots25 and drones, and Raman device integration into robotic arms for biomedical applications26,27,28.

Multiple optics miniaturization strategies for Raman spectrometers have been proposed within the last decade. More conventional solutions are based on bulky dispersive optics, that require the presence of a slit or a pinhole and a grating or a prism as a dispersion element. Here, the miniaturization comes at the cost of e.g. reduced spectral range and resolution, reduced confocality (mostly relevant for microscopy applications), and sensor sensitivity29. On-chip spectrometers have the potential to offer dramatic size, weight, and power reductions compared to bulky optics-based instruments30. Multiple extra-compact on-chip spectrometer concepts have been proposed31. For example, on-chip dispersive spectrometers based on Echelle gratings32, planar concave gratings33, and arrayed waveguide gratings34,35,36,37 provide low-cost solutions for on-chip spectral analysis using visible and near-infrared light. However, when applied to high-resolution spectrum acquisition, these devices suffer serious signal-to-noise ratio (SNR) penalties as a result of spreading the input light over many spectral channels. Furthermore, the device footprint and system-level complexity increase linearly with the number of spectral channels, since the spectral resolution scales inversely with the optical path length (OPL) and each channel requires a dedicated photodetector.

Unlike dispersive spectrometers, Fourier transform (FT) spectrometers overcome the trade-off between SNR and spectral resolution benefiting from the multiplex advantage, also known as Fellgett’s advantage38. Traditional benchtop FT spectrometers use moving mirrors to generate a tunable OPL, a design not readily amenable to planar photonic integration. On-chip FT spectrometers instead rely on thermo-optic or electro-optic modulation to change the OPL in a waveguide. However, this concept suffers from poor scaling because the number of spectral channels is equal to the number of switches and photodetectors.

On the other hand, on-chip digital FT spectrometry could support high-resolution spectra and high SNR via time-domain modulation of a reconfigurable Mach-Zehnder interferometer30. This approach requires only a single-element photodetector rather than a linear detector array, which reduces cost and system complexity. However, digital FT spectrometry has only been demonstrated in a very narrow spectral range30 that limits its applicability in Raman spectroscopy applications.

A promising on-chip Raman spectrometry concept is CMOS-based hyperspectral (HS) filter technology. The HS filter technology is already used in various commercially available HS cameras for imaging applications in the VIS-NIR (470–900 nm), NIR (600–970 nm), and SWIR range (1100–1700 nm) to study the reflectance or transmission spectra of imaged targets. However, existing proof of concept experiments in the field of Raman spectroscopy demonstrate low spectral resolution (2.4 and 3.0 nm) which significantly limits the application areas39. Moreover, HS filter technology has significantly lower Raman signal throughput in comparison with dispersion-based approaches due to reduced transmittance of Fabry–Pérot narrow-band optical filters applied on top of the sensor pixels. Another limitation comes from the need to illuminate a much larger sample area while maintaining equal laser power density to reach a sensitivity comparable to dispersion-based spectrometers. This happens since each pixel on the HS sensor collects signals from a different area on the sample. In particular, it could lead to sample overheating and/or significantly increased fluorescence level for Raman spectroscopy-based studies on fluorescent materials similar to wide-field Raman microscopy40,41.

Another promising concept is based on spatial heterodyne Raman spectrometry (SHRS)42,43. This technology has not yet been realized on-chip, nevertheless, existing prototypes demonstrate research grade performance in terms of spectral range (50–3300 cm−1), resolution (5–9 cm−1), and SNR43. Here, high resolution can be realized without using long focal length dispersing optics. Therefore, it is possible to use monolithic construction techniques to make a compact and robust device. SHRS could be an ideal candidate for an optics miniaturization strategy in many aspects, except for issues related to increased level of stray light and non-confocality in comparison with slit/pinhole-based dispersion spectrometers.

Due to the mentioned drawbacks of emerging technologies, challenging Raman spectroscopy and microscopy applications are still relying on conventional bulky dispersion optics. Here, we can select between miniaturization concepts based on reflective44,45,46 and transmission gratings29,47. Designs based on reflective gratings could be as compact as 17 × 15 × 8 mm3 48, however, they suffer from low spectral resolution (>90 cm−1)48. A relevant compromise could be found by using a spectrometer footprint of around 40 × 42 × 24 mm3 that provides spectral resolution of around 25 cm−1 within a spectral range of 200–2000 cm−1 48. Raman spectrometer designs based on transmission Bragg gratings benefit from higher throughput (up to 97% of diffraction efficiency in broad NIR range), alignment robustness and minimized stray light in comparison with reflective gratings49. On the other hand, existing reflective and transmittance grating designs use a line or imaging sensor with a typical pixel size between 10–20 µm. Such sensors should have 1000–2000 pixels in dispersion domain in order to cover a relevant Raman shift range between 400 to 2000 cm−1. This leads to a typical sensor length of 12 to 28 mm29,47 which can be another limitation for spectrometer miniaturization. It is important to mention that larger pixel size (typically more than 12 µm) of CCD and CMOS sensors results in increased dark noise collected by the sensor, therefore, sensor cooling down to at least +5 °C is recommended in order to reach high sensitivity during collection of weak Raman signals50,51. Another important problem that limits the sensitivity of Raman measurements is caused by variation of quantum efficiency (QE) of the individual pixels, which usually is at the level of 0.1–0.5%52,53. Unfortunately, pixel-to-pixel QE variation is not static in time and cannot be compensated via postprocessing for a long period of time52. This problem can be successfully solved via full vertical binning over the pixels of the imaging sensor54, however, it would require deep cooling of the imaging sensor to avoid an increase of dark noise summed up from many pixels in vertical arrays. The here listed problems significantly limit miniaturization possibilities if a high Raman spectrometer performance should be maintained.

Existing Raman miniaturization strategies, suffer from one or more of the following issues: insufficient spectral resolution and/or spectral range, limited SNR, due to high level of sensor dark noise, pixel-to-pixel QE variation on sensor, poor confocality or depth sectioning, instability of laser wavelength and laser optical power, high laser optical feedback sensitivity, and high-power consumption. Here, we present a miniaturization strategy that allows us to solve the listed problems and create extra-compact Raman spectrometers and microscopes based on non-stabilized laser diodes, close-packed optics, and non-cooled small pixel size sensors. The achieved performance is comparable with research-grade Raman systems. Our proposed miniaturization concept is based on real-time calibration of Raman shift and Raman intensity using an in-built reference channel that collects the Raman spectrum of polystyrene located in the spectrometer. Implementation of a reference channel has been realized in UV-VIS absorption spectroscopy decades ago55. However, we are not aware of any successful realization of a reference channel in Raman spectroscopy. Existing approaches are usually based on placing a reference sample in the place where the laser beam delivery optical path is overlapped with the back scattered Raman signal. Typically, the reference material is located just before the sample probe (for example, a flat window or lens sub-assembly made of CaF2)56. Such a realization makes it possible to calibrate the laser wavelength and intensity using a Raman peak of the reference sample. However, this method fails if the Raman spectrum of the measured material contains Raman peaks or fluorescence signal within the same spectral range as the reference sample. At such conditions real-time laser wavelength and intensity calibration is problematic—if at all possible. In our concept, the reference channel is independent of the main optical path, which eliminates any interference between reference and main Raman signal collection channels.

Here, we demonstrate miniaturization down to several centimeters (optical part dimensions: 7 × 2 × 0.8 cm), an achieved limit of detection (LoD) down to 0.07% of methanol in water-ethanol solution, a low power consumption of around 2 Watts, perfect wavenumber (±1.5 cm−1) and intensity calibration (±1%) combined with high spectral resolution of around 7 cm−1 within the broad spectral range of 400–4000 cm−1. The high performance and vast versatility offered by our strategy facilitate simple integration into various instruments and applications. As use case examples, we show applications within quality control of alcoholic beverages, quantification of nutrients and metabolites during bacterial fermentation, in vivo measurements of human skin, therapeutic drug monitoring, and in vitro bacteria identification.

Results

Miniaturization of Raman systems includes size-reduction of (i) spectrometer, (ii) Raman beam delivery path, (iii) laser beam delivery path, (iv) beam splitting unit, and (v) sampling optics. Thus, besides the spectrometer, miniaturization also impacts the choice of lasers. In particular, proper operation of diode lasers requires accurate temperature stabilization of the active element57 and optical power stabilization58. Compromises on stabilization of these parameters lead to laser frequency drift, mode-hopping, and power instability57,58,59,60,61. In addition, diode lasers are also sensitive to the external optical feedback or back reflections of laser irradiation from laser beam delivery elements and sample62,63,64,65,66. This effect leads to increased laser power and wavelength instability and could even permanently damage the laser diode67. Therefore, the laser diode requires optical isolation typically realized with Faraday rotator68. This is an expensive element which limits miniaturization capabilities. We begin the description of our proposed miniaturized Raman spectrometer with the laser-related problems.

Design and working principle

Optical scheme of the developed miniaturized Raman spectrometer is shown in Fig. 1a. Here, a typical AlGaAs laser diode in a 5.6 mm TO package with Fabry–Pérot resonator at a central wavelength of 785 nm and a maximum power of 200 mW is used as a Raman source (L1). Laser spectral linewidth at half maximum (LWHM) is 0.2 nm which is sufficient to obtain a spectral pixel resolution of the miniaturized Raman system of 0.3 nm. The selected type of diode laser usually requires precise temperature stabilization for Raman spectroscopy applications to prevent laser wavelength drift and “mode hop”. In order to avoid bulky, costly, and high-power Peltier elements for temperature stabilization of the laser diode, we propose a concept that does not require laser wavelength stabilization at all. According to Fig. 1a, a collimated laser beam is split into two beams using prism (P1); first part of the split beam B1 is focused on a polystyrene sample that is glued to a special Raman edge filter F3 coated with an aluminum mask (the mask serves as a spectral slit), second part of the split beam B2 is focused on the slit and reflected from the Raman filter F3 towards the sample as beam B3 (Fig. 1b). As a result, two Raman spectra (main channel and reference channel) in the “fingerprint” range (400–2700 cm−1) are simultaneously collected by NIR enhanced imaging CMOS sensor in the range 800–960 nm (Fig. 1c).

Fig. 1: Optical layout and working principle of miniaturized Raman system.
figure 1

a Optical scheme of miniaturized Raman system, b reference sample on filter/slit, c, d CMOS sensor image that demonstrates simultaneous acquisition of main and reference Raman signals from laser excitation at 785 nm (c) and 675 nm (d); CMOS images represent Raman spectrum of water-ethanol solution (60:40) in the main channel and Raman spectrum of polystyrene in the reference channel, e, f, h, i laser stability experiment versus time that represents raw Raman spectra variation of polystyrene in the reference channel under laser excitation wavelength 785 nm (e) and 675 nm (h) and variation of raw Raman spectra of polypropylene in the main channel under laser excitation wavelength 785 nm (f) and 675 nm (i), g, j Raman spectra of polypropylene in the main channel versus time under laser excitation wavelength 785 nm (g) and 675 nm (j) after real-time (i) Raman shift, (ii) Raman intensity calibrations, (iii) anti “mode hop” deconvolution, and (iv) spectrum deblurring being applied, k, l time dependent experiment of polystyrene sample placed in the main channel that demonstrates long time calibration stability of the Raman shift (k) and Raman intensity (l), m Raman spectrum of toluene before (black curve) and after (red curve) multiple pre-processing procedures being applied, n, p three Raman spectra of polypropylene at different time points under a laser excitation wavelength of 785 nm (n) and 675 nm (p), o, q Raman spectra of polypropylene before (black curve) and after SERDS correction (red curve) under laser excitation wavelength of 785 nm (o) and 675 nm (q).

The Raman beam delivery system consists of Raman probe L5, slit lens L4 (f = 30 mm) and spectrometer (elements F3, L6 (f = 30 mm), F4, Grating, L7 (f = 6.2 mm), Sensor). The total distance between grating and sensor is 8.5 mm. The spectral slit size is 25 µm that zooms down to 5.4 µm on CMOS sensor focal plane with binned pixel size of 4 µm. Imaging capabilities of L7 provide uniform resolution along the spectral dimension on CMOS sensor at diffraction-limited spot size. This makes it possible to concentrate most of the Raman signal intensity into a single row on the CMOS sensor (Fig. 1c). Spectrometer is equipped with fused silica transmission Bragg grating with 1500 lines/mm and average efficiency in the first order of diffraction ~96% in the range 800–960 nm69. In combination with NIR coating for all optical elements, entire optical system has high throughput from the sample to the detector ~92%. Listed features significantly boost sensitivity of miniaturized Raman spectrometer. The Raman beam delivery system is optimized in terms of minimization of the stray light that could appear from the laser beam reflected/scattered from the reference sample and cause artifacts in the data channel. This is realized via implementation of corrugated surfaces and back anodizing on the spectrometer housing.

In order to cover a “high frequency” Raman range, we have added an extra AlGaInP laser diode with Fabry–Perot resonator L2 with a central wavelength of 675 nm, LWHM 0.2 nm and a maximum power of 200 mW. This additional laser L2 and the main laser L1 are switched on sequentially, providing two different Raman shift ranges with the same grating. The proposed approach makes it possible to collect in the “high frequency” Raman range by the same optical elements in the same spectral range 800–960 nm that is used for collection of the “fingerprint” range. This strategy allows us to maintain a high SNR for Raman spectra in “high frequency” range due to relatively high QE of the CMOS (60% at 840 nm, 40% at 940 nm) sensor in the range 800–960 nm70. The collimated beam from non-temperature-stabilized laser L2 is combined and coaligned with collimated beam from L1 by dichroic mirror D1. After D1, laser irradiation from L2 propagates through the same optical path as B1-B3 and targets the polystyrene sample on the slit Sref and sample of interest Sdata. Finally, two Raman spectra of the main channel and the reference channel in the range of 2700–4000 cm−1 are simultaneously collected by the imaging CMOS sensor (Fig. 1d). Therefore, the miniaturized Raman spectrometer can collect a combined Raman spectrum in the range of 400–4000 cm−1 reaching the performance typically associated with much larger, research grade systems.

Electronics and software

Initial processing of raw data obtained from the spectroscopic camera and converting it into calibrated Raman spectrum is implemented in an embedded computer of the miniaturized Raman device. The device is controlled by a microcomputer running ARM processor with clock frequency 1 GHz and 512 MB RAM having CSI interface for attaching CMOS camera, and several interfaces for accessing the device from PC or smartphone/tablet, such as USB, Bluetooth and Wi-Fi. The embedded microcomputer is also controlling lasers and provides indications on the device itself. The device is powered by 1000 mAh Li-ion battery and consumes about 200 mA in idle mode and up to 600 mA with laser on. This provides an active operation time of up to 2 h (depending on laser current set) and up to 5 h in idle mode. All spectrum pre-processing such as binning, hot pixels removal, real-time wavelength calibration, intensity normalization, and laser mode hopping correction is done on the embedded computer inside the device with custom algorithms written in C + + language. The embedded processor is powerful enough to perform required processing in real-time on each spectrum acquisition. Only a few rows of CMOS sensor image are processed to extract spectra, therefore, computational requirements are not high, which allows to keep power consumption low. In the present device the microcomputer can process up to 50 frames per second, much faster than actually needed, considering that exposure times for Raman collection are usually longer than 0.1 s. Electronics occupy about 95 × 31 × 15 mm in the device, and consists of two PCBs: commercially available ARM single-board computer and custom-made laser driver and battery controller board. The size of electronics can be significantly reduced (at least three times) by developing a fully customized solution. Processing algorithms also could be optimized and embedded into FPGA or ASIC instead of ARM processor to reduce power consumption even more.

Subsequent data processing and analysis, such as identification and quantification, are performed on PC using custom acquisition software for data collection and MATLAB application for advanced processing (Matlab R2020b (license provided by Technical University of Denmark)).

Wavenumber and intensity calibration

Raw Raman spectra from the reference and main channel collected as a function of time are shown in Fig. 1e–I (see Supplementary Data S1). Time-lapse experiment clearly shows peak shift of polystyrene (reference channel) and polypropylene (main channel) caused by laser wavelength drift. Since both reference and main channel were collected from the same laser source and acquired simultaneously by the imaging CMOS sensor, we could apply wavenumber calibration for each collected Raman spectrum in the main channel. Calibration is done by peak fitting of several prominent polystyrene peaks in the reference channel and correcting for their known position, with the same correction applied also to the main channel. The result for wavenumber calibration versus time is shown in Fig. 1k, demonstrating high and stable calibration accuracy (±2 cm−1) using multiple peaks of polystyrene measured by the main channel. At the same time, Fig. 1l demonstrates that Raman intensities in the reference and main channels are correlated as well (black and red curves). Therefore, it is possible to normalize main channel for laser power fluctuations during each spectrum acquisition (blue curve in Fig. 1l). This feature provides an excellent solution for quantitative Raman spectroscopy applications where laser intensity monitoring is required to reduce concentration determination error71.

“Mode hop” deconvolution

The described wavenumber and laser intensity calibrations fail if a fast laser wavelength change occurs due to laser “mode hop.” In this case, even at short exposure times (<0.2 s), spectra will be collected at reduced spectral resolution and decreased peak intensity because the energy is spread over several individual pixels. Nevertheless, this problem can be solved by spectral deconvolution of the main channel based on the known spectral profile of the Raman spectrum of polystyrene in the reference channel (see supplementary note S1, see Supplementary Figs. S1S6). Figure S5 demonstrates that the deconvolution procedure significantly helps in recovering the original spectral resolution and Raman intensity during a “mode hop” process.

Spectral deblurring and spectral resolution

Pixel limited spectral resolution of miniaturized Raman spectrometer is 5.6–3.4 cm−1 in the range of 400–2000 cm−1 (from laser excitation at 785 nm) which corresponds to the optimal slit size ~18 µm. Nevertheless, we decided to increase the actual slit size up to 25 µm for increased signal throughput, which transfers into the calculated spectral resolution of 10.2–5.8 cm−1. Deviation from diffraction-limited optics design would lead to even worse resolution. However, it is possible to measure the spectral apparatus function of the entire Raman system and compensate on it using deblurring methods72. Raman spectrum of diamond with natural linewidths of around 1.8 cm−1 was used for the determination of the spectral apparatus function73 (see Supplementary Figs. S7S9). The result of spectral deblurring is shown in Figs. S10S12 (see supplementary note S2). Figure 1m illustrates improvements in terms of spectral resolution after correction on “mode hop” and spectral deblurring (black curve: before corrections, red curve: after corrections) demonstrating final high spectral resolution ~7 cm−1 in worst case scenario (see Supplementary Fig. S10). Spectral resolution of miniaturized Raman spectrometer was tested according to the procedure described in the ASTM E2529 – 06(2014) standard. The spectrum of the calcite reference sample was acquired (see Supplementary Fig. S13). The shape of the 1085 cm−1 calcite line was fitted with a Voigt function (see Supplementary Fig. S14) with 7.4 cm−1 full width at half maximum. The spectral resolution was further estimated by the formula from ASTM standard as 6.6 cm−1.

Shifted‐excitation Raman difference spectroscopy (SERDS)

Laser wavelength drift, that is compensated with the use of the reference channel, but still is present due to laser instability, can be used for fluorescence subtraction similar to SERDS74. The method is based on the fundamental difference between Raman and fluorescence properties with regards to the wavelength shift of the excitation source. It is based on the fact that the fluorescence spectrum position is independent from the shift of the excitation wavelength, whereas the Raman spectrum is shifting along the shift of the excitation wavelength. This enables us to distinguish between Raman and fluorescence spectra. Typically, a dual- or tunable laser source is required for SERDS75. In our device, a non-stabilized laser automatically provides a gradual wavelength shift due to the laser body heating during operation. Figures 1n, 1p show shifted-excitation Raman spectra of polypropylene at different time points from the experiment in Figs. 1f, 1i. Here, we applied SERSD algorithm75 for fluorescence profile restoration. Figures 1o, 1q demonstrate fluorescence-free Raman spectra (red curves) obtained after subtraction of resolved fluorescence profiles (green curves) from initial Raman spectra (black curves). Hereby we demonstrate that a non-wavelength-stabilized laser source can also be used for efficient fluorescence subtraction via SERDS if the device has a reference channel to compensate a wavelength shift in the Raman spectrum.

These multiple pre-processing techniques have been developed in order to realize a miniaturized Raman spectrometer, relying on the presence of a built-in calibration channel. The resulting device provides a (i) fluorescence-free, (ii) “mode hop”-free, (iii) laser power fluctuations-free Raman spectrum in the range 400–4000 cm−1 with a spectral resolution ~7 cm−1 (Fig. 1g, j). Device control and data transfer can be performed by wire or wirelessly with software installed on smartphone/tablet or PC.

Sensor dark noise

The sensitivity of the Raman spectrometer strongly depends on the dark noise of the detector. Due to the weakness of the Raman signal, most of spectrometers are equipped with cooled linear or imaging sensors with relatively large pixel size (12–25 µm). Sensor cooling reduces the dark noise whereas large pixel size allows one to collect more photons maintaining high resolution at the same time76. Nevertheless, this is a high power demanding and bulky approach. As a solution towards miniaturization without significant compromise on sensitivity, we implemented a CMOS sensor with a small binned pixel size of 4 µm and managed to compress the signal from the Raman spectrum into a single row on the sensor using high numerical aperture (NA) imaging lens L6 (Fig. 2a). Signal compression allows us (i) to maximize SNR per pixel and (ii) avoid averaging of additional rows with unwanted additional dark noise. This is illustrated in an experiment where equal amount of total intensity of SERS signal was distributed over 20 rows on the CMOS sensor (Fig. 2b). Comparison of SERS spectra of trans-1,2-bis(4-pyridyl)ethane (BPE) in Fig. 2c, d highlights 3 times higher SNR when the SERS signal is compressed into a single row. Signal-to-noise ratio was estimated from the spectrum of polystyrene reference sample at laser power 100 mW, exposure time 0.25 s, number of repetitions 10. The amplitude of 1001 cm−1 was used as signal level, while the noise level was estimated as root mean square of the noise in the spectral range 1700–2100 cm−1 from the same spectrum. The signal-to-noise ratio obtained in such a way is 1256 (see Supplementary Figs. S15 and S16).

Fig. 2: Demonstration of sensitivity and quantification performance of miniaturized Raman system.
figure 2

a, b Image on CMOS sensor of the SERS spectrum of BPE deposited on nano pillars based SERS substrate at a concentration of 100 µM; signal measured alaser spot size on the sample of 10 µm (a) and 100 µm (b), c SERS spectrum of BPE obtained after the averaging of 3 rows on CMOS image in Fig. 1a, d SERS spectrum of BPE obtained after the averaging of 20 rows on CMOS image in Fig. 1b, e illustration of dynamic QE variation of pixels on CMOS sensor, f, g fluorescence spectrum from glass cover slide excited by laser with excitation wavelength 785 nm obtained after averaging of 10 repetitions without pixel averaging method (f) and with pixel averaging method (g) demonstrating improved SNR ratio, h SORS like sample illumination layout with off-axis laser beam delivery and on-axis Raman beam collection that serves dual purpose: avoiding back reflections to diode laser and minimization of fluorescence impact on the out of focus signals, i photograph of miniaturized Raman spectrometer measuring whiskey content through the glass bottle, j Raman spectrum of whiskey measured by miniaturized Raman system through the glass bottle with on-axis (black curve) and off-axis (red curve) laser beam delivery that demonstrates SORS benefit to avoid the contribution of fluorescence from glass bottle (upper right image is a screen shot from CMOS sensor in the case of off-axis laser beam delivery), k, n Raman spectra of water-ethanol solution (40% of ethanol) with different concentrations of methanol (variation between 0–40%) in the range 400–2300 cm−1 (k) and 2750–4000 cm−1 (n), l, m result of PLS calibration for methanol quantification based on the Raman data in the range 400–2300 cm−1, o, p result of PLS calibration for methanol quantification based on the Raman data in the range 2750–4000 cm−1.

Pixel QE variation

The fact that our miniaturized Raman spectrometer uses a non-wavelength-stabilized laser allows us to compensate on another sensitivity-limiting factor which is pixel-to-pixel QE variation of the spectroscopic sensor (Fig. 2e)52,53. Figure 2f represents a fluorescence spectrum from a glass cover slide excited by a laser with an excitation wavelength of 785 nm obtained after averaging 10 repetitions. It is visible that the spectral profile of fluorescence contains noise-like spikes. This “noise” is always present no matter how long a spectrum is collected or how many repetitions are applied because it represents pixel-to-pixel QE variation. However, once the reference channel-based wavenumber calibration is applied, pixel-to-pixel QE variation is significantly reduced (Fig. 2g). It happens because each spectrum wavenumber corresponds to a different pixel in the sensor row when the laser wavelength is shifted. As a result, pixel-to-pixel QE variation is averaged out over the pixels in the same row.

Laser optical isolation and SORS

Typically, laser diodes with Fabri-Pérot resonator require expensive optical isolation based on the Faraday effect68. A less complex solution may be based on laser polarization rotation via quarter waveplate; however, it provides reduced attenuation of the back reflected signal (<20 dB)77. Here we implement an off-axis laser beam delivery approach that (i) avoids laser back reflections targeting the laser aperture and (ii) boosts miniaturization capabilities (Fig. 2h). In addition to laser optical isolation, off-axis laser beam delivery supports Spatially offset Raman spectroscopy (SORS) conditions that allow us to avoid unwanted fluorescence contribution from out-of-focus layers inside the sample78. Effectively, it spatially separates contribution from out-of-focus regions and in-focus signal on the imaging sensor. Figure 2i shows our miniaturized Raman spectrometer measuring whiskey content through the glass bottle. In order to demonstrate SORS performance we performed two experiments: with the laser beam aligned on-axis (black curve) and off-axis (red curve) (Fig. 2j). Black spectrum clearly demonstrates SORS benefit to avoid the contribution of fluorescence from the glass bottle (see Supplementary Movie S1).

Transmittance correction

The transmittance correction was applied by acquiring the spectrum of a black body standard source (tungsten halogen lamp) at 3000 K (see Supplementary Fig. S17).

Application I: quantification of toxic methanol in vodka

To demonstrate the sensitivity and quantification performance of our miniaturized Raman spectrometer we performed measurements of vodka samples with different concentrations of methanol (see Supplementary Figs. S18S21, supplementary Tables S1 and S2, Supplementary Data S2). The raw Raman spectra of water-ethanol solutions with different concentrations of methanol (variation between 0–40%) in the range 400–2300 cm−1 and 2750–4000 cm−1 are shown, respectively, in Figs. 2k, 2n. Results of PLS calibration for methanol quantification demonstrate LoD = 0.07%, and LoQ = 0.25% (Fig. 2l–p). To the best of our knowledge, the lowest previously reported LoD that was obtained by research grade Raman spectrometer with a deeply cooled CCD was 0.23–0.39%79. However, according to European regulations, methanol concentration in vodka products should be below 0.5%80. This means that LoD should be below 0.1% to perform routine methanol quantification through the bottle with vodka. Now, such methanol control becomes possible with our highly sensitive miniaturized Raman spectrometer.

Application II: quantification of nutrients and metabolites during fermentation

In industrial production of chemicals by microbial fermentation, the volumes of bioreactors and production costs are often very large, and the reproducibility and the quality of the products are crucial features that must always be ensured. In the pharmaceutical field, for instance, regulatory agencies have been encouraging manufacturers to innovate in the field of process control and monitoring to ensure a sufficient product quality, as demonstrated by the introduction of the Process Analytical Technology (PAT) framework by the U.S. Food and Drug Administration in 200481. The PAT framework outlined a strategy for a continuous control of manufacturing processes through the monitoring of critical process parameters and critical quality attributes to ensure that the product is safe and effective. The concept of continuous process monitoring is also part of the Quality by Design (QbD) paradigm, which approaches the process validation through a continuous improvement of the manufacturing process82. Since a continuous control of the fermentation process is demonstrated to lead to a better product quality, monitoring and controlling tools are being continuously explored and improved. These tools include probes for temperature, pH, dissolved gases and organic carbon, and spectroscopic probes, also including Raman probes83,84.

Besides commercial devices recently developed for monitoring of nutrients and metabolites through Raman85,86, several examples of on-line and off-line Raman process monitoring of industrial fermentation of bacteria, fungi and mammalian cells87 have been reported in literature over the last years. Nutrients, metabolites and by-products have been monitored to gain better knowledge of the fermentation process and to control the feeding strategy88,89,90. The yield of metabolites of interest has been predicted with the aid of complex modeling systems, as in the case of glycoproteins produced by Chinese hamster ovary91, or, in fewer cases, with direct detection of a strongly Raman active compound92.

We used miniaturized Raman spectrometer to perform off-line quantification of pHCA produced during E. coli culture, directly measuring the Raman signal of liquid samples of bacterial supernatant (Fig. 3g). Calibration samples were collected for pHCA, glucose, MgSO4 and Na2HPO4 (Fig. 3a, see Supplementary Fig. S22, Table S3, Supplementary Data S3) which were found to be the main contributions to the supernatant spectra at the beginning (black curve) and the end (red curve) of fermentation process (Fig. 3b). By applying the PLS calibration model to real supernatant samples, the concentration of pHCA was found to increase, whereas glucose decreased over time, as also confirmed by the close correlation with HPLC results (Fig. 3d, e). Also, MgSO4 and Na2HPO4 were consumed over time (Fig. 3f), although no additional technique was used to validate Raman quantification in this case. Presented results demonstrate high sensitivity of miniaturized Raman spectrometer with LoD for pHCA around 0.01 g/L and LoD for glucose around 1 g/L. To the best of our knowledge, the lowest previously reported LoD for glucose that was obtained by research grade Raman spectrometer with deep-cooled CCD was around 0.55–8 g/L93,94. It is important to mention that due to real-time laser intensity calibration and pixel-to-pixel QE compensation implemented in the miniaturized Raman spectrometer we managed to obtain pHCA and glucose quantification error comparable with HPLC (Fig. 3d, e). The presented acquisition method could be applied to more complex cases, such as the quantification of products and nutrients in tank fermentation, and, together with SERDS strategy for fluorescence reduction, could represent a high performance, compact and affordable solution for real time, at-line monitoring of bacterial fermentation. As an example, multiple miniaturized Raman spectrometers could be installed at different tank locations (top, middle, and bottom) to monitor fermentation processes more efficiently. Figure 3h, i, S23, Table S4, Supplementary Data S4 demonstrate quantification of Serine produced during E. coli culture, directly measuring the Raman signal of liquid samples of bacterial supernatant. Here, Raman spectra contained significant fluorescence background (Fig. 3c), however, we still were able to get quantification error comparable with HPLC95 (Fig. 3h, i).

Fig. 3: Miniaturized Raman spectrometer used for fermentation monitoring and in-vivo skin measurements.
figure 3

a Raman spectra of the main components contributing to the Raman signal of bacterial supernatant, b Raman signal of bacterial supernatant at 0 and 26.5 h of culture, c Raman spectra of bacterial supernatant containing Serine at 0 to 10 h of culture collected with step of 1 h; pink band indicates spectral region with prominent Serine peaks, d, e, f Raman and HPLC quantification of (d) pHCA, (e) glucose and (f) MgSO4/Na2HPO4 in bacterial supernatant (each Raman point is the average of triplicate acquisitions, whereas each HPLC point is the result of duplicate injections), g photograph of miniaturized Raman spectrometer during measurements of fermentation samples, h, i Raman and HPLC quantification of Serine in bacterial supernatant (each Raman and HPLC point is the average of triplicate acquisitions and injections, respectively), j optical schema of the Raman probe with high NA (0.95) developed for in vivo skin measurements, k photograph of “skin probe”, l, m CMOS image of the measurement process of skin in vivo, demonstrating sharp focusing of the Raman signal in the vertical dimension of the sensor under laser excitation wavelength of 785 nm (l) and 675 nm (m), ns Raman spectra of normal skin collected at the depth of 10–20 µm under a laser excitation wavelength of 785 nm (n, p, r) and 675 nm (o, q, s); pink bands indicate spectral regions of CH and OH peaks; Raman spectra were collected on finger (n, o), hand (p, q) and cheek (r, s); spectrum color represents different probe locations over the skin area around 1 cm2.

Application III: in vivo skin measurements

In vivo skin measurements are typically associated with complex Raman instrumentation that requires a deep-cooled sensor due to the low Raman cross section of skin, especially at a depth of more than 100 µm96,97. In addition, in vivo skin measurements require the development of an immersion probe with high NA that can provide a small laser spot size in depth of tissue. A small laser spot size will improve the ratio between Raman and fluorescence signal. This happens due to a non-linear saturation of the fluorescence signal and a linear growth of the Raman signal when the laser power is increased98. Moreover, it is preferable to produce the last optical element of the probe from fused silica. This will generate optimized conditions for laser/Raman beam propagation in/out of the stratum corneum skin layer and provide a matching of the reflection index between the last optical surface of the probe and the skin media96. A compact version of a skin probe is shown in Fig. 3j, k. Our probes can be optimized for skin measurements at different depths; between 0 to 150 µm. When our miniaturized Raman spectrometer is equipped with this probe, we were able to collect Raman spectra of skin at a depth of 10–20 µm with SNR better than 500:1 (1 s exposure time, 5 repetitions). Typical application examples on studying anti-sun cream penetration and water content are shown in Figs. 3n, 3p, 3r, respectively. Figure 3n–s demonstrates Raman spectra obtained from two lasers (785 and 675 nm) at different skin areas (finger, hand, and cheek). Water content difference at different skin areas could be clearly seen by intensity ratio of CH (2800–3000 cm−1) and OH (3100–3500 cm−1) bands (see Supplementary Data S5). Compared to similar previous experiments96,97 our in vivo Raman measurements of skin seem to have unprecedented high SNR (500:1, 1 s exposure time, 5 repetitions). We believe that the presented instrumentation could be applied for numerous in-vivo applications in the future including (i) skin disease diagnostics, (ii) skin aging, (iii) determination of molecular concentration profiles from the skin surface into the dermis, (iv) measuring of the distribution of intrinsic skin constituents (amino acids, sweat constituents, lipids, proteins, water), (v) skin penetration and permeation of topical formulations, (vi) distinguishing of the difference between volar forearm skin, cheek, forehead, scalp, axilla, and other.

The optical design of our miniaturized Raman spectrometer allows confocal measurements because it utilizes a cross slit confocality concept98 as shown in Fig. 4a, b. This feature helps to separate out of focus layers, which is beneficial for typical handheld Raman applications where the contribution from sample packaging or glass needs to be minimized. However, cross slit design also allows us to target confocal Raman microscopy applications when the device is additionally equipped with a three-dimensional motorized stage and a white light microscopy module (Fig. 4c). The lateral resolution of our miniaturized Raman microscope was tested on polystyrene beads with a 1 µm diameter (Fig. 4d). Axial resolution was tested on the surface of a SERS substrate with BPE analyte at a concentration 100 µM (Fig. 4e). Cross sections in lateral and axial dimensions are represented in Fig. 4f. They demonstrate a lateral resolution of around 1 µm and an axial resolution of around 2 µm, indicating a diffraction-limited performance in both dimensions. To the best of our knowledge, the presented miniaturized Raman microscope is the smallest reported confocal Raman system that has been designed without compromising on basic performance. Below we present two challenging Raman microscopy applications that typically require research grade systems with deeply cooled sensors.

Fig. 4: Miniaturized Raman system used for biomedical Raman microscopy applications.
figure 4

a Image from the CMOS sensor of the SERS signal of BPE; the zoomed region shows that the spectrum is compressed into one row on the sensor, b illustration of the cross slit design of miniaturized Raman spectrometer that is capable for confocal measurements, c optomechanical design of miniaturized Raman microscope based on miniaturized Raman spectrometer, d Raman microscopy image of polystyrene beads at the size of 1 µm obtained with Zeiss objective 100×, NA = 0.95, e depth scan by our miniaturized Raman microscope (equipped with Zeiss objective 100×, NA = 0.95) through the surface of SERS substrate with BPE analyte at concentration 100 µM, f axial (black curve) and lateral intensity distribution of Raman signal as a function of sample displacement (dotted white lines in (d, e) indicate areas used for plotted axial and lateral intensity profiles); data demonstrate diffraction-limited spatial resolution, g SERS maps of MTX deposited on silver coated NP SERS substrates at concentration of 25 µM, h, i photographs demonstrating the process of analyte deposition, j SERS spectra of MTX at different concentrations (0–75 µM) obtained after the averaging of SERS signals collected by mapping of the SERS chip, k, I result of PLS calibration for MTX quantification, m Raman spectra of different bacteria obtained after the averaging of the Raman signal from Raman maps, n photograph of miniaturized Raman microscope during Raman mapping of bacteria samples on CaF2 cover glass, o CMOS image of the measurement process of bacteria demonstrating sharp focusing of Raman signal in vertical dimension of the sensor under a laser excitation wavelength of 785 nm, p microscopy image of bacteria deposited on CaF2 cover glass with areas selected for Raman mapping of bacteria (areas 1–3) and Raman mapping of cover glass background (areas 4), q confusion matrix of bacteria identification built as a result of machine learning data analysis of Raman maps of bacteria. E. coli 25: Escherichia coli strain ATCC 25922; E. coli 35: Escherichia coli strain ATCC 35218; MSSE: methicillin-sensitive Staphylococcus epidermidis strain ATCC 14990; MRSE: methicillin-resistant Staphylococcus epidermidis strain ATCC 35984; S. lugdunensis: Staphylococcus lugdunensis; S. homolyticus: Staphylococcus homolyticus.

Application IV: quantification of anti-cancer drug via SERS mapping

Therapeutic drug monitoring (TDM) can improve clinical care when using drugs with pharmacokinetic variability and a narrow therapeutic window. Rapid, reliable, and easy-to-use detection methods are required to decrease the time of analysis and can also enable TDM in resource-limited settings or even at the bedside. Monitoring methotrexate (MTX), an anti-cancer drug, is critical since it is needed to follow the drug clearance rate and decide how to administer the rescue drug, leucovorin (LV), to avoid toxicity and even death. It has been shown that nanopillar-assisted separation (NPAS) method using SERS mapping by research grade Raman microscope with deeply cooled EMCCD allows to measure MTX in PBS in the linear range of 5–150 μM with LoD = 5 μM, LoQ = 25 μM99. Here, we also used NPAS method with SERS mapping of the SERS chip surface according to the methodology described in the original publication99. Typical SERS maps of SERS substrates measured by our miniaturized Raman microscope are shown in Fig. 4g; total measurement time per chip was around 15 min with exposure time of 0.1 s per spectrum. In total, 24 SERS chips were used in this study following the NPAS procedure (Fig. 4h, i). Calibration samples of MTX diluted in PBS were prepared in the range 0–75 μM. SERS spectra of MTX obtained after the averaging of SERS signals collected by mapping of the chip surface are shown in Fig. 4j. Result of PLS calibration for MTX quantification is shown in Fig. 4k, l demonstrating improved LoD = 3 μM, LoQ = 20 μM in comparison to previously reported data99 (see Supplementary Figs. S24S29, see Supplementary Table S5, Supplementary Data S6).

Application V: in vitro bacteria identification

The worldwide increase of antimicrobial resistance (AMR) is a serious threat to human health. To avert the spread of AMR, fast reliable diagnostics tools that facilitate optimal antibiotic stewardship are an unmet need. In this regard, Raman spectroscopy promises rapid label- and culture-free identification and antimicrobial susceptibility testing (AST) in a single step. It was recently shown that a Raman-based setup could distinguish bacteria on the species level with more than 96% accuracy when machine learning techniques were combined with a novel data-augmentation algorithm4. In the current study, we used our miniaturized Raman microscope to measure exactly the same bacterial isolates as in the previous publication, where a research grade Raman microscope with deeply cooled CCD was used30 (Fig. 4n) following identical sample preparation procedures and data analysis (see Supplementary Figs. S30 and S31). Raman spectra of different bacteria obtained after the averaging of the Raman signal from Raman maps are shown in Fig. 4m. A total of four Raman maps were collected per single bacteria isolate: three maps contained regions with individual bacteria, and a fourth map was collected as a background (Fig. 4p). A confusion matrix of bacteria identification built as a result of machine learning data analysis of Raman maps of bacteria is shown in Fig. 4q. The data obtained with the mini-Raman system show an accuracy of bacteria identification that is comparable to previously reported results from a research-grade Raman setup (overall classification accuracy 98.6%)4. However, here we have, thanks to the performance of the spectrometer, been able to reduce the exposure time down to 0.2 s per spectrum in comparison to 1 s and 10 repetitions per spectrum in our previous publication while maintaining comparable or higher SNR of raw Raman spectra of bacteria (see Supplementary Figs. S30 and S31, Supplementary Data S7).

Discussion

Our basic strategy is centered around a built-in and real-time calibration of Raman shift and laser intensity, facilitated by multiple data processing algorithms. Many of these algorithms rely on information provided by the reference channel. Our proof-of-concept results in Figs. 1a–q and 2a–j demonstrate a solution to some of the most pressing problems related to Raman miniaturization. We show that the need for stabilization of laser temperature and power can be circumvented by integration of a reference channel. In addition, our miniaturization strategy provides: a reduction of sensor dark noise, a compensation on pixel-to-pixel QE variation, a laser optical isolation and maintenance of a high spectral resolution. As an additional feature, our strategy brings forward valuable SERDS and SORS functions. In conclusion, we have been able to miniaturize a Raman spectrometer down to several centimeters (optical part dimensions: 7 × 2 × 0.8 cm) and have achieved excellent sensitivity (LoD down to 0.07% of methanol in water-ethanol solution), a low power consumption of around 2 Watts, perfect wavenumber (±1.5 cm−1) and intensity calibration (±1%) combined with high spectral resolution of around 7 cm-1 within the broad spectral range 400–4000 cm−1. A comparison of optical and mechanical parameters of the proposed miniaturized Raman spectrometer with typical handheld/benchtop Raman spectrometers and Raman microscopes is presented in Table S6. In comparison with typical handheld Raman units we show improvements in the majority of important parameters like spectral resolution, SNR, operation readiness time, wavenumber, and intensity calibration accuracy. Moreover, we conclude that overall performance is competitive with high-end benchtop Raman spectrometers and microscopes. The high performance and vast versatility offered by our approach facilitate simple integration into various instruments and applications.

Our proposed concept is currently limited with respect to spectrum registration in low-frequency Raman shifts (below 400 cm−1) due to laser wavelength drift that does not allow us to apply ultra-steep Raman edge filters close to the laser line. However, precise selection of the diode lasers with known laser wavelength drift versus operation temperature will allow us to apply ultra-steep filters in the next iterations of the system design. Another current limitation is the inability to use long exposures (more than a few seconds) because of spectrum blurring due to laser wavelength drift and high dark noise of the non-cooled sensor. This issue may be partially mitigated by repeated measurements and by applying mode hop deconvolution on smaller exposures with subsequent averaging. This also has the benefit of reducing pixel-to-pixel QE variation effects. However, for weak Raman signals, it seems unpractical to apply very long effective exposure times by having many repetitions, due to dark noise of the sensor. Therefore, certain laser temperature stabilization time may be applied before measurements to be able to reach long exposure times without significant loss of resolution due to spectral mode-hop.

We have exemplified several use cases that all rely on challenging Raman spectroscopy. These include quantification of chemicals at low concentration (through glassware such as bottles or with the use of SERS), in vivo skin measurements and in vitro identification of bacteria (Figs. 2i–p3 and 4). Application cases IV and V demonstrate that our miniaturized Raman microscope ideally suits for SERS mapping and bacteria mapping applications and provides advantages in key Raman microscopy requirements such as LoD, LoQ, mapping speed and mapping resolution, system size, and affordability. Other potential use cases include (i) consumer level chemical characterization of pharmaceuticals, chemicals and food products in order to determine chemical purity and chemical composition, (ii) quality control of chemical products and kinetic monitoring of chemical processes in the industry, (iii) identification of drugs, explosives, toxic liquids and gases by the law enforcement and customs authorities as well as military. In addition, the proposed technology could be effectively applied on drones, robots and even in space missions due to its small size and weight, low power consumption and autonomous calibration of Raman shift and laser intensity.

We foresee that further development of our technology will allow us to miniaturize the entire Raman module down to a size of 10 × 15 × 3 mm with a calculated spectral resolution of around 18 cm−1 (see Supplementary Figs. S32 and S33). If realized this size becomes very attractive for direct integration into smartphones as an in-built chemical analyzer. We believe that our concept can also be applied in different modifications of bulky dispersive Raman spectrometers, SHRS spectrometers, and on-chip dispersive and FT spectrometers. This may boost optics miniaturization even further because all the above-mentioned concepts still rely on the need of wavelength and power stabilized lasers. In conclusion we see our miniaturization strategy as a facilitator for both miniaturizing and democratizing Raman spectrometers, making Raman spectroscopy more accessible to researchers as well as consumers.

Methods

Materials, sample preparation, and measurements

Application I: quantification of toxic methanol in vodka

Methanol, ethanol, and water with the purity of 99.9%, 99.8%, and 99.9% were used in this research (manufactured by Sigma-Aldrich, CAS Numbers 67-56-1, 64-17-5, and 7732-18-5, respectively). The temperature of the liquid samples was 25 ± 0.4 ˚C. The solution of vodka was prepared at concentration ratio 40:60 for ethanol and water. The concentration of components in the methanol-vodka solutions was changed from 0% to 40% of methanol (in volume %). Diluted samples at concentrations 0, 0.1, 0.25, 0.5, 1, 5, 10, 20, 40% with ±0.1% dilution error was prepared with the usage of Eppendorf Pipette Research Plus (volume 100–1000 μL). Each sample was stored in glass vials with a screw cap (volume 1.5 ml). The whiskey bottle used in the studies was produced by Johnnie Walker, Red Label. Whiskey contains 40% of ethanol. The thickness of glass bottle at the measurement area was ~2.7 mm.

Application II: quantification of nutrients and metabolites during fermentation

Stock solutions of 100 mM pHCA and 100 mM CA were freshly prepared in EtOH 99%. For Raman calibration standards, pHCA was diluted in control supernatant (obtained from a non-pHCA producing E. coli strain (CBJ786)). In addition, for Raman and HPLC experiments the analytes were diluted in M9 medium. HCl 32% was used for acidification of samples and DCM as the organic phase for LLE. Stock solutions of 50 mM Phe and 50 mM Tyr were prepared in water and NaOH at pH 14, respectively. E. coli strains (CBJ800, CBJ786, CBJ951, CBJ789), expressing TAL and PAL-encoding genes from IPTG-inducible promoters, were grown in M9 medium with 1% glucose, 2 mM Tyr and/or 2 mM Phe, 1 mM IPTG and antibiotics for maintenance of plasmids for 22 h100. For quantification of pHCA produced by E. coli, bacterial supernatant samples were obtained from each strain by centrifugation (10 min at 10,000 × g, 4 °C), and filtration through 0.2-μm filters. The concentration of pHCA in samples was measured with reversed-phase HPLC by separation on a HS-F5 column (Sigma-Aldrich, St Louis, MO, USA) with previously described mobile phases (ammonium formate buffer and acetonitrile), with an overall analysis time of ~15 min per sample100. The absorbance was measured at 333 nm for pHCA101. Aqueous solutions were prepared with ultra-pure water obtained from a Milli-Q purification system (Millipore Corporation, Billerica, MA, USA), and all the chemicals were purchased from Sigma-Aldrich (St Louis, MO, USA). For Raman determination of pHCA in bacterial supernatant, E. coli samples (CBJ800), genetically modified to produce pHCA, were cultured in growth medium according to the methods described in our previous research100,101. Bacterial aliquots were centrifuged and filtered at 0, 1.5, 4.5, 6, 7.5, 9, 11.25, 23, and 26.5 h, with the purpose of monitoring the pHCA production and the nutrient consumption at several time points throughout the culture. The concentrations of pHCA and glucose were also determined through HPLC100.

Raman measurements were carried out at fixed laser power on the sample of 100 mW (from laser excitation wavelength 785 nm) and 30 mW (from laser excitation wavelength 675 nm). A custom Raman probe with NA = 0.08 was used in this study which provides an estimated laser spot size of around 10 µm on the sample. Each spectrum was averaged over 10 repetitions at an exposure time of 1 s each. A sample volume of 500 µL was poured into a glass vial with screw cap (volume 1.5 ml). The Raman signal of liquid samples was collected by focusing the laser beam in the middle of the vial through a bottom window, and each sample was collected in triplicates.

Application III: in vivo skin measurements

Anti-sun cream Sollotion SPF30 produced by DermaPharm A/S was used in this study. Cream was applied on human palm that was previously cleaned with water-soup solution to avoid skin surface contamination by dust. The skin analysis was performed on own skin by the main authors and thus does not require specific ethics permission.

Microscopy test on PS beads

PS beads with size of 1 µm in the form of aqueous suspension were purchased on Merck (MDL number: MFCD00243243). Suspension was deposited on polished stainless-steel surface for Raman microscopy mapping.

Application IV: quantification of anti-cancer drug via SERS mapping

MTX (98% purity) was initially dissolved in 50 μL of 1 M NaOH, and 2 mM stock solution was prepared in phosphate-buffered saline (PBS), pH 7.4, which was aliquoted and stored at −20 °C until further use. The MTX stock solutions were used to freshly prepare standards in PBS. The MTX standard solutions in PBS was mixed with methanol (MeOH) in various concentration of MTX: 0, 5, 10, 25, 50, 75 µM. Solvents, chemicals, and samples were of analytical grade and purchased from Sigma-Aldrich (St. Louis, MO, USA). Fabrication of the AgNP SERS substrates and NPAS/SERS detection was described in our previous publication.

Application V: in vitro bacteria identification

The bacteria used in the study were retrieved from the American Type Culture Collection (Escherichia coli strain ATCC 25922; Escherichia coli strain ATCC 35218; methicillin-sensitive Staphylococcus epidermidis strain ATCC 14990; methicillin-resistant Staphylococcus epidermidis strain ATCC 35984) or clinical isolates from own laboratory: (Staphylococcus lugdunensis and Staphylococcus homolyticus). The species of the latter were identified by matrix assisted laser desorption/ionization time of flight mass spectrometry (MALDI-TOF MS) using a Microflex LT instrument (Bruker Daltonics), Flex control software and the MALDI Biotyper 4.1.90 software (Bruker Daltonics). Bacteria were used directly from overnight on agar plate cultures which were sealed with parafilm and stored at 5 °C until sample preparation. Storage time varied but was not found to result in spectral changes to strain or phenotype characteristics. All other sample preparation conditions were kept consistent between samples. Test samples were prepared separately from samples used for training, to ensure classification was not influenced by differences in sample preparation. To prepare samples for Raman measurement, a sample was simply transferred from a single colony directly to a sterilized CaF2 Raman-grade objective slide4.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.