Modular 3D Printed Absorption and Emission Spectrometer Guide

When we taught a class of first year chem/biochem majors about spectroscopy, we introduced them to it with a task. It was to dig through bins full of the things shown below (many of them 3D-printed and all of them common or inexpensive) and to build a working spectrometer. We wanted them to make a device that would take input light from overhead fluorescent light bulbs and spectrally disperse it for analysis of its component colors. With little additional guidance they took to the task and through playing with and investigating these pieces were able to construct rudimentary devices that fit the bill. As the course evolved, they used the same parts to design ways of measuring the colors absorbed (and how strongly) by dye molecules in solution such as chlorophyll in olive oil or food dyes in water. These parts can also be used to create a device capable of measuring the spectrum of emitted light from photoexcited molecules such as quinine sulfate in tonic water or emitted light from a glow stick.

At this time when many courses are being taught remotely, we thought it might be useful to share the tools for implementing these methods. This guide will explain the parts (and how to obtain them) to build and use:

  1. A UV-Vis absorption Spectrometer: to measure what colors of light a substance - such as a dye in solution - absorbs and how strongly it does this for each color [an absorption spectrum]
  2. An emission spectrometer: to measure what colors of light a substance emits after photo-excitation, or after chemical reaction, and the intensity per color that it does so [an emission spectrum]. Such a spectrometer is called a fluorometer when the emitted light is fluorescence.
  3. A spectroscope: to measure the discrete spectral features of light sources such as the common compact fluorescent light bulb [a line spectrum].

Parts

There are eight 3D-printable parts available for the modular spectrometer. All .stl 3D print files can be downloaded for free on the . These parts were designed using SketchUp. If you would like the SketchUp files or have any other questions about things we are doing here, please contact us (niels.damrauer@colorado.edu, yisrael.lattke@colorado.edu, madhu.singh@colorado.edu). If you come up with neat experiments that are different, please let us know.

These parts are intended to fit together. Assemblies (spectrometers) can be secured as systems of parts using rubber bands secured from notches in the spectrometer body. Some examples will be shown below.

In addition to these 3D-printed parts, you will require several items. Links for vendors are provided in the last section of the guide.

  1. Transmission grating sheet (for wavelength dispersion). This is fit to the top face of the spectrometer body. We used gratings with 1000 groves/mm.
  2. 0.5 inch square craft mirrors. As seen below, these fit in the spectrometer body and redirect light from the experiment to the transmission grating where colors are separated and ultimately imaged by the cell phone camera.
  3. A cell phone with a camera.
  4. Software for processing the images. We use free software developed at the NIH called Image J (see below)
  5. A light source.
    • For Absorption Spectrometer: 5mm white-light LED (light emitting diode).
    • For Fluorometer: a 5 mm UV LED
    • For Spectroscope and wavelength calibration: a compact fluorescent light bulb somewhere in the house.

  6. A power source to light the LED: a 3V coin cell battery.

  7. Rubber bands to hold the assembly together and scissors for cutting the grating to size.

  8. Toy laser pointer (useful for exploring the light path in the spectrometer, but optional).

Specifics about the spectrometer body

The spectrometer body does several things. It interfaces with the cell phone camera, it houses a grating needed to separate colors so the camera can see them in different spatial locations, and it redirects light from the experiment to grating and on to the camera. Ultimately the spectrometer body enables the cell phone camera to focus on an image of a physical slit housed outside the spectrometer body. Because the grating separates colors, the camera sees a slit for each color in the spectrum. What colors there are depends on the light source and that depends on the type of experiment being explored. In the picture below on the left, you can see the spectrometer body and a piece of the transmission grating material on the table below. In the picture on the right, the grating is installed in the inset of the spectrometer body. The grating should be cut and oriented such that the holographic lines (1000 lines/mm) run across the shorter rectangular face of the spectrometer body (left to right). In this way, colors will separate in the longer direction (north to south).

As noted, a mirror is needed and it is installed in the groove running down into the spectrometer body from its face. In the picture below on the left, the mirror sits on the table below the spectrometer body. We used a 1” by 0.5” mirror but we had to cut 1”x1” mirrors in half to get these. It's much simpler to buy 0.5”x0.5” craft mirrors. In the picture in the middle below, the mirror is installed. You can see light coming through that is being reflected upwards (to the camera taking the picture) but originating from the square opening on the back of the spectrometer body. In the picture on the right, you can see the effect of the mirror in the spectrometer body by sending light from an inexpensive laser pointer through the back opening of the spectrometer (mimicking the direction that light would come from in an experiment).

 

The cell phone interfaces to the spectrometer body with the camera pointed directly at the grating in the spectrometer face. This is seen below with rubber bands used to hold things together. In this picture, the 3D printed parts on the left (black) are a slit assembly and a slit (see below for further discussion regarding the spectroscope)

Specifics about the grating

The groove density of the holographic lines in the material is used to control dispersion, or the rate at which colors separate as a function of distance from the material. As noted earlier, we used 1000 lines/mm. We also noted that the lines should run across the grating left to right for a vertically oriented rectangle (see below; left). A nice way to determine the groove direction is to use a laser pointer. In the picture on the right, the bright red spot is on the paper (not the transmission grating sheet) and shows the laser light traveling directly through the grating material and hitting the paper (the so-called zeroth order line). The two first-order diffracted lines are the fainter spots a couple of centimeters above and below. This means the material is dispersing light in this vertical direction and it means the grooves must be running horizontally (as desired). The grating can then be cut to fit the spectrometer body with this groove orientation.

 

 

 

As noted earlier, we let students discover this with parts provided and their phone cameras. The basic components (other than the camera) are those shown below in the picture on the left consisting of the spectrometer body (A) assembled with grating and mirror, the slit assembly (C) , and a slit (F) or (G). 

The assembly interfaced with the camera is shown below on the left. The camera's view is shown in the middle picture. The colors are the spectral components of the compact fluorescent light (CFL) bulb that is lighting the room. The horizontal lines are images of the slit in the slit assembly which is regulating the light entering into the spectrometer body. As discussed later, the CFL colors are very useful for calibrating these spectrometers using free software called Image J. The right picture shows the visible spectrum of the sun lighting the blinds of the room.

          

Specifics About CFL Emission Lines and Spectrometer Calibration

The spectrometer must be calibrated every time it is moved in a significant way. Because of this, we suggest that all data is taken in a single session and time between samples is minimized. The calibration process is a simple one that relies on a light source with well-defined lines. CFL bulbs are readily accessible, so they are a good choice. First, a picture is taken through the spectrometer of the line spectrum generated by the bulb. This is shown below with the known colors from the atomic emission in the CFL annotating the spectrum.

The 2D picture from the camera is then processed in ImageJ (see later section for instructions) to generate a 1D spectrum which is given as brightness of the image (grey value) vs. camera pixel number. This 1D spectrum (intensity versus pixel number) should have four distinct peaks corresponding to the spectral lines annotating the image above. One can then make a calibration file by finding the equation for a line that fits these data (y=wavelength, x=pixel number). We usually use Excel for this by making an xy plot of four points followed by a linear regression. Once the slope m and intercept b are known, any wavelength can be determined by multiplying m times pixel number and adding b.

The spectroscope assembly discussed above can be quickly modified to include a sample holder as shown below (the slit in the slit assembly is not shown). Optional blank plates for blocking ambient light are also shown on three sides around the sample holder. Remember, however, that wavelength calibration will require acquisition of a CFL line spectrum before or after collecting data for the glow sticks. Importantly, both measurements need to be made before the spectrometer assembly is moved relative to the phone camera. If you do use the three blank plates, consider scattering CFL light into the spectrometer via the sample port using a piece of white paper after removing the glow stick.

Below are data collected for three common glow sticks (Blue, Green, and Yellow) by placing the sticks in the spectrometer's sample holder one at a time. The solid line spectra are collected with the 3D printed spectrometers. The dotted line spectra were collected using an expensive fluorometer in our laboratory. We do pretty well with our cell phone instruments although improvements could be made, perhaps by experimenting with smaller slits. 

Modifying the glowstick emission spectrometer to include an LED holder at 90 degrees to the spectrometer analysis path leads to the fabrication of a simple fluorometer. See the configuration shown below in the image on the left. The inclusion of an LED holder (and an LED!) provides a light source to photoexcite molecules in the sample holder. The picture on the right shows a similar configuration although the setup had some different parts included for various reasons. It's modular so you can try different things.  

LED: An important thing to note about the picture above on the right is the function of the LED. With 3V coin cell batteries, you don’t need to include a resistor for the LED to function without burning out. Just place the LED leads across the battery with the longer LED lead (the anode) touching the positive side of the battery and the shorter LED lead (the cathode) touching the negative side of the battery.

Below are fluorescence data (darker blue line) collected using our cell phone fluorometer with tonic water in the sample holder. The spectrum reflects the behavior of the molecule quinine sulfate which provides the bitter taste in tonic water. For this measurement we used a UV LED (400 nm) to excite the quinine. Also shown (lighter blue line) are data collected using our expensive laboratory fluorometer. Again we do pretty well!

By changing the position of the LED relative to the spectrometer body, we can create an absorption spectrometer. Although it is hard to see in the image below on the left, the part in the back is an LED holder with diffuser housing. So in this configuration, the path of the LED light is directly through the sample and into the spectrometer housing. This allows the camera to analyze light that has passed through the sample in order to figure out what colors have been absorbed and how strongly. For this reason its good to use a white light LED rather than the UV LED used in the last experiment. The white light LED has a broad spectrum so one can explore a larger region of wavelengths absorbed by visibly colored samples. The diffuser housing is nice because the cell phone camera often saturates with the LED shining directly at it. We often put a piece of white paper or tissue paper in the way (sliding it in the slot) to lower the intensity. The right picture shows this in a similar setup (including a second slit assembly) used for an experiment.

The quantity Absorbance, is defined as A=-log(I0/I) where I0 refers to the intensity of light entering a sample (at any given wavelength) and where I is the intensity (at the same wavelength) exiting the sample. For practical purposes, an intensity spectrum is measured for a blank sample such as water in the same cuvette followed by an intensity spectrum collected for an absorbing sample, such as a dye in water in the same cuvette. Data would be processed with the same formula A=-log(I0/I) with the I0 data being the blank and the I data being the sample you are interested in. The data shown below do this using our 3D printed spectrometers for the dye Allura red (this is the dye used in red food coloring). The image on the left is the cell phone picture captured using the white-light LED and passing through a sample of water only. The spectrum in the middle is the picture captured when the light passes through the cuvette that now contains some dye as well as water. One can easily see that blue and green colors are being absorbed for a dye that appears red to the eye. The picture on the right shows Absorption data from our 3D-printed spectrometer for five different concentrations (these concentration-dependent data can be used to explore Beer's Law in addition to showing what colors of light the dye absorbs).  We have also used these spectrometers to show that the green hue in decent olive oil (EVOO) is due to chlorophyll.

 

ImageJ is free software developed and distributed by the NIH (National Institutes of Health). it can be found at the following link: 

Generating spectra from photographs is straightforward, but care must be taken, especially where comparisons between spectra are desired. To generate a spectrum like that shown in the tonic water example, the following approach is taken:

  1. Make a folder that only contains the images that you wish to process. You will have to know where photos taken on your camera get stored. Note that if you care about assigning wavelength, one of these pictures should be a CFL line spectrum image so that you can go through the calibration procedure.
  2. Open ImageJ and click File>Import>Image Sequence
    • Click on one of the images in the folder and click open
    • Specify the number of images that are in the folder (this is usually done automatically by the program)
  3. Click OK
  4. The images should now appear one at a time (use the horizontal scroll bar to switch between them). In this example I’ve loaded in two images, a photo of a CFL spectrum and a photo of the emission spectrum of quinine sulfate. The CFL lines are shown below.

 

  1. A built-in intensity-measuring tool is used to generate spectra from the images on the screen. First a box must be drawn surrounding the area that you want to analyze. To do this, use the “Rectangle” tool on the left side of the ImageJ toolbar. It’s helpful to imagine the photograph as an x-y plane. The tool works by scanning across the horizontal x-axis of a selected area, and at each pixel it assigns a brightness value to it as if it was a black and white image—the program calls this the Grey Value. It adds up all the y-pixel brightness values associated with a single x-pixel. Since we seek to generate graphs that eventually have wavelength (after undergoing the process given in the CFL calibration example) on their x-axes, we need to rotate the image above before analysis.

  2. If you need to rotate images, click Image>Transform>Rotate and specify the degrees by which you would like to rotate, or choose one of the preset options.

  3. When you have the photos aligned to your preference, click the rectangle tool and draw a box around the region you would like to capture and analyze. After drawing the box, make sure to check through the images and ensure that the important features of your photos are encapsulated. In this case, the features that need to be inside the box are the CFL spectral lines (for calibration) and the emission spectrum of interest. Note that the box has not been moved between these two photos. Moving the box will alter the pixel numbers used for analysis, so it must not be done.

 

  1. Click Analyze>Plot Profile. This is the uncalibrated spectrum (summed y-intensity versus x-pixel) associated with the analyzed region of your photograph. Plot profiles of the images above are given below. Follow the CFL calibration example from here if you want to assign a wavelength axis.