Skip to content

Introduction#

Background#

I have been fascinated with Raman spectroscopy for a while now, after looking into substance identification techniques. Late last year I decided on starting to build and document a DIY Raman spectrometer system from cheap, reused components. The primary end-goal was to provide an affordable platform to (qualitatively) identify counterfeit pills and characterize the chemical structure of unknown compounds. Fortunately I was able to work on this as a semester project. Note that I study Product Design - not (optical) engineering - and this is more of a passion project published in good faith to contribute to the open-hardware community . I would like to additionally note that, while the finished build works as a Raman spectrometer, expect there to be sub-optimal implementations or bad practices incorporated throughout. Feel free to reach out, if you have any suggestions, corrections or criticism.
After reading and researching different publications and sources I came to be disappointed by the conclusion that there weren't any accessible step-by-step instructions that would facilitate the actual build. This encouraged me further to properly document design considerations, practical implementations and challenges along the way.

How it Works#

Spectrometer#

After reading a bunch of sources, I realized that building the spectrometer itself was not very cost efficient. I decided on getting it on eBay, which also avoids the hassle - especially for the unexperienced user - of having to align a guide mirror, diffraction grating and assembling the electronics or PCB of the detector. The B&W Tek unit offered a great compromise in cost and performance, despite its decade old age and a relatively bad resolution by today's standards. As these specs can be upgraded, for example, by replacing the diffraction grating, upgrading the CCD, using a smaller input slit or just optimized by rotating the internal optics as to increase resolution in the wavelength range of interest.

Sample#

For the sample assembly, there are various options, which also depend on which type of Raman configuration is chosen. There are mainly three possible configurations: backscattering, which means the collection of the Raman signal emitted from the sample is collected by the same optic (microscope objective in this case) through which the laser / excitation beam is focused. Then there is a 90° configuration, which is especially interesting for liquids. Here the laser beam and the collected Raman signal are offset by 90° - so when illuminating the sample from the front, the scattered Raman is collected to its left or right. Lastly, there is transmission Raman, which works similarly by shining the excitation beam 'through' the sample - beam coming in from the front and leaving out the back, where the laser line is filtered and the Raman signal collected. The different configurations come with unique compromises in terms of general capabilities, reliance on tolerance or alignment difficulty.
As backscattering allows for a strong Raman signal to be collected, once it's aligned properly - and I already bought the cuvettes, which are frosted on the sides, I decided on this. This can allow for a relatively compact build, if desired or hard-mounted (in final assembly).

For the sample holder there are mainly three options: leave out holder entirely, use a single-use (plastic) cuvette / tube or use a reusable quartz glass cuvette for optical applications. Quartz glass is desired because silica is quite inert and can be polished to an excellent surface finish, while also being resistant against most corrosive chemicals.

Laser#

The ideal excitation source would be an entirely monochromatic (single wavelength) light source, with a minimal focus spot size. A green laser at 532 nm was chosen, as optical components in this range are cheap, laser pointers widely available and the performance sufficient. Note that generally, lower wavelengths will excite fluorescence in many molecules. This will make Raman measurements mostly impossible on these compounds, unless it occurs very faintly. Most systems meant for quick identification of unknown powders in the field feature a dual-wavelength system, i.e. 532 nm and 785 nm or a single (near) IR excitation source - mostly 785 nm or 1064 nm. For general usage, an IR excitation laser is desired but comes with significant challenges. When compared to a 532 nm system, a 785 nm laser - at same output power - provides almost 16x less Raman signal. On the other hand, since fluorescence always occurs stokes-shifted (upwards), at higher wavelengths, most fluorescence is mitigated and can be avoided, allowing for a broader substance range to be identified. Unfortunately, especially for a beginner, I decided against the use of an infrared laser, as it is also mostly invisible to the human eye and thus incredibly dangerous at higher powers. The filtering optics and spectrometer architecture also differ by a lot and are generally only available at much higher cost. As 532 nm offers strong signal intensity, abundant detector technology, low risk of sample damage, while being highly affordable - at the cost of some fluorescence.
The selected laser power is also an important consideration. Broadly speaking, most 532 nm systems use a laser between 30mW - 100mW, though some can also get away with even lower power like 10mW. To offset relatively poor beam performance, a higher power output can be chosen for cheaper models. Be careful though, cheap 532 nm DPSS lasers often leak dangerous amounts of infrared, which is invisible and destructive to your eye and will also completely swamp the spectrometer's detector. To counter that, a bandpass filter or also a IR blocking filter can be implemented immediately after the laser.
The laser is focused onto the sample by using an objective, and since in a backscattering configuration the sample focusing lens also serves as the collection optic for the Raman scattering, the cheapest option is a used infinity-corrected microscope objective. Infinity-corrected is essential here, since in a cheaper microscope lens with fixed distance, the Raman signal exiting out of the back would not be collimated (parallel rays) and generally sub-optimal for the final filter and focusing assembly that guides the signal through the spectrometer's input slit. The working distance of the 20x / 40x objective is a critical attribute and directly correlated with the width of the cuvette. If the WD is shorter than the cuvette's material is thick, you will be unable to focus the material inside and end up with no usable signal or detect the Raman signal of just the cuvette.

Filtering#

To filter out the incredibly weak Raman signal from the excitation wavelength - the visible Rayleigh scattering - two filters are employed in total. The first being a dichroic longpass mirror, which works as a selective mirror: reflecting all wavelengths below the cut-on, while letting everything above pass through. This is convenient as it allows the laser to be set-up perpendicular to the sample focusing and collection axis while also serving as the first filtering stage for the collected signal.
The cheapest high-quality option here was the Thorlabs DMLP550, which has a cut-on at 550 nm. If we assume the laser performs exactly as intended, all of its emitted light would be at exactly 532 nm - below the filter's cut-on wavelength - and will thus be reflected at a 45° angle of incidence.
Raman scattering is unique in that it is shifted in wavelength, more strongly in the Stokes region, which lies above the excitation wavelength (here at > 532 nm +), but also in the Anti-Stokes region, which occurs as a shift below the laser's wavelength (here at < 532 nm). Since we don't use a more expensive notch filter that selectively blocks out exclusively 532 nm, the final Raman spectrum will only feature parts of the Stokes shifted spectrum and no Anti-Stokes region at all. Out of cost and availability constraints, the chosen cut-on wavelength is quite a bit higher than the excitation. In practice this means that the Stokes region will be clipped up until 550 nm - so the difference of the filter's cut-on and the excitation source's wavelength, which comes out at roughly 18 nm and translates to broadly 500cm^-1 in the final Raman spectrum. This is a compromise but also not detrimental, because many molecules display most of their characteristic Raman activity in the fingerprint region between 400cm^-1 and 1650cm^-1. Keep this in mind as a key limitation though.

After passing straight through the dichroic longpass mirror, the signal is filtered a second time by a longpass filter. Since Raman scattering is up to 10.000.000x weaker than the Rayleigh scattering, a second filter is recommended to clean up any remaining laser light that would otherwise saturate or impact the detector.
Optical density is a critical specification here, as anything below OD5 (higher is better; more filter performance), is unsuitable due to the substantial amount of light still leaking and passing through. The model used is a Thorlabs FELH0550, which is a simple filter that - unlike the dichroic mirror - is not mounted at 45° incidence angle. In fact it has to sit as flat or with as little of an angle as possible, perpendicular to the incoming pre-filtered signal. Even 1° of tip or tilt in any direction will shift the filter's cut-on wavelength noticeably and will significantly harm its OD performance.

Focusing#

In the final stage the collimated filtered signal - that should now exclusively consist of Raman wavelengths >550nm - has to be focused onto a tiny spot. This is done using a focusing lens or by using another microscope objective to allow it to pass into the 200um optical fibre (or the spectrometer's 50/100um input slit directly). In addition, a simple linear translation stage was built, so the focusing lens could be precisely moved along the axis to achieve optimal focus.

Acquisition#

With the spectrometer wavelength calibrated and set-up properly, the raw Raman signals can then be captured. To achieve a good signal-to-noise ratio (SNR), it is often best to experiment with different exposure times. For most samples, I found 1500 - 3000ms to yield the cleanest results overall. The occasionally used upper range lies between 5000 - 7000ms but isn't necessary for most acquisitions. Note that during initial testing of different configurations and figuring out what tolerances and precision would be needed, I cranked exposures up to 20 - 25s (25000ms), as the whole system and beam path wasn't sufficiently aligned.

Post-Processing#

After acquisition, the raw spectrum is exported as a CSV to be post-processed. The goal here is to make the spectrum more legibile, reproducible and expressive. There is a wide variety of proven (and novel) algorithms and techniques to process the spectrum. At first, the baseline is subtracted to flatten the spectrum and peak / band intensities are proportionally adjusted. A process known as de-spiking is applied, to remove random spikes caused by cosmic rays striking the sensitive CCD sensor, especially during long exposure acquisitions, manifesting as intense narrow bands scattered throughout. Afterwards, a denoising process averages and smooths the data to clean it up visually. Of course, the respective Raman shift will have to be applied and peaks fitted, the spectrum cropped and then exported or used with a database to automate substance identification by comparing against a dataset of verified peak locations, widths and intensities. More detailed information will be available on the software page, as the post-processing pipeline can be a highly intricate process of which I can only lightly scratch the surface.

Get Started#

  1. BOM - Visit the bill of materials to gain a better understanding of the essential parts
  2. Spectrometer-Setup - Familiarize yourself with the B&W Tek spectrometer unit
  3. Dustproof-Workspace - Build a dustproof box to protect the expensive optical components
  4. Core-Assembly - Print and build the core assembly of the system
  5. Additional documents:
    1. DIY-Linear-Stage - Recommended for the final assembly
    2. Align-with-Fluorescence - Handling and preparing the fluorescent dye solution for alignment
    3. SpectrumStudio-Cheatsheet - Quick overview of the original 'Spectrum Studio' software
    4. Full-Build - Final integration of all components and partly motorizing adjustment