VIS Spectrometer – Hardware

I have started another interesting project: a spectrometer with a range of 380-720nm. This spectrometer can be assembled at a reasonable cost using components of a decent quality.

Here’s a look at the completed device:

This device draws inspiration from existing DIY spectrometers, particularly the OtterVIS project. However it differs from existing designs in several aspects:

  • A modular design allows for quicker prototyping of modifications, incorporating a total of 12 3D-printed parts.
  • Adjustable collimation is achieved through opposing screws.
  • Focus can be adjusted via the focusing ring, simplifying the initial setup, facilitating easy refocusing during modifications, and accommodating dimensional instability in 3D-printed parts.
  • It is designed to accommodate a higher quality glass grating for increased light sensitivity.
  • It includes support for a UV/IR cut filter to minimize stray light.

How the Spectrometer works

Below, I’ve provided an annotated cross-section of the design. Firstly, light passes through an optical slit. This light is then collimated, and a UV/IR cut filter eliminates light outside the intended spectral range, serving as a measure to reduce stray light. Following this, the diffraction grating diffracts light at a certain angle depending on its wavelength, similar to a prism. Notably, some light (referred to as the zero-order beam) will not be diffracted, which could potentially lead to unwanted measurement errors if not properly managed. The light we’re interested in is the first order diffraction which is focused onto a linear CCD sensor.

This configuration ensures that each wavelength component of the incoming light is focused onto a corresponding pixel on the sensor (or is otherwise absorbed within the system). The value measured by each pixel corresponds to the intensity of the respective wavelength.

annotated spectrometer cross section

Bill of Materials

  • Optical Slit
    About a year ago I bought this 50um slit for an admittedly cheap price of 12€, but unfortunately, the prices have quadrupled since then. The aluminium one is a bit cheaper and should also do the trick. Otherwise the goto DIY solution for an optical slit is to use two mounted razor blades.
  • Collimator and Focusing Lens
    Same as the OtterVIS spectrometer I’m also using two Pentax SMC-M 50mm f/2. These are fairly cheap when buying them used.
  • UV/IR Cut Filter
    Adding this is completely optional and it’s not included in other DIY designs I’ve seen, but I decided to spend the money in order to reduce the stray light from light sources with a high IR intensity, like the sun. I went for an Astronomik L-1 UV-IR Block 27mm, but feel free to look for alternatives; I don’t earn anything for linking to products here.
  • Diffraction Grating
    I started out with the affordable foil diffraction gratings easily found on Amazon but later opted for a higher quality one from aliexpress. It’s important to select a grating with 1000 lines/mm unless you’re planning to modify the design.
  • Linear CCD module
    I used the TCD1304 sensor, but driving it is its own project in itself. Fortunately, there’s a comprehensive resource at tcd1304.wordpress.com where someone has already done the groundwork.
    The site offers all the design files and software, and they even provide unpopulated and populated boards at very reasonable prices if you want to avoid the hassle of ordering and assembling the PCB yourself. A good video for getting started is available on YouTube.
  • Black filament
    For the 3D printed parts, it’s crucial to use black or at least dark filament to prevent light reflection inside the spectrometer, which could affect your measurements. I used dark gray filament but added an anti-reflective sheet to any light-reflective surfaces since I had one available.
  • Compact Fluorescent Lamp (CFL)
    We’ll use a CFL for wavelength calibration and testing, as they emit many spectral lines in the visible range, making them suitable for our needs.
  • Screws + Heat Set Inserts (Metric)
    You’ll need a couple of screws and heat set inserts. Feel free to adapt the model to accommodate what you have available. The current design requires:
    • 3 * M1.4×6 (needs to be M1.4, as it attaches to the lens)
    • 3 * M2x8 (needs to be M2, as it attaches to the lens. 8mm might be slightly too long, so use with washers to ensure free rotation of the focus ring)
    • 3 * M3x6
    • 3 * M3x8
    • 12 * M3x12
    • 9 * M3x16
    • 9 * M3 (d5 * h4) heat set inserts

Tools

You’ll need some tools:

  • Hex keys
  • Small phillips screw driver for lens disassembly
  • M3 thread cutter (requires 2.5mm drill to correctly size the holes) and optionally drill bits for post-processing of the parts if any holes come out undersized (2mm, 3mm)

Assembly

First you’ll need to print the parts. The Fusion360 file has a “Clearance” parameter which you’ll have to adapt depending on your printer. I printed my parts on a Prusa Mk4, which can maintain tighter tolerances, so a clearance of 0.1mm was sufficient. The Fusion360 file is available here: a360.co/4bHP4QD

Lens Disassembly

You’ll need to disassemble the lenses up to a certain point which is depicted in the picture below. If you’re wondering why the image looks unusual: I didn’t remember to take a photo before assembling my spectrometer, so the left one required a bit of Photoshop work. Here is a video of a complete disassembly of the lenses.

disassembled lenses

When both lenses are prepared as shown, remove the screws from ONE lens as illustrated and slide out the lens assembly from the focusing mechanism. Secure the rod that controls the aperture blades with electrical tape, ensuring they remain open.

Optical Slit

A good starting point is assembling the slit holder, assuming you’ve acquired an optical slit. Insert the heat set inserts as shown, align the optical slit, and secure it by screwing down the top piece. Optionally, you can affix a diffuser to the top and anti-reflective black foil to the bottom using double-sided tape.

optical slit assembly

Collimator

To assemble the collimator, simply place the collimator lens into the 3D printed holder and secure it with the cap. Attach the slit assembly you’ve previously assembled, maintaining a spacing of about 1mm. Don’t worry about the possible light leak for now, this will be closed up after collimation.

collimator assembly

UV/IR Cut Filter

If you have a UV/IR cut filter, insert it into its holder; if not, leave the slot empty. Ideally, cover the back screw as shown in the image below to minimize unwanted reflections.

uv/ir cut filter assembly

Diffraction Grating

Place the grating in its holder, making sure the orientation is correct. Use double-sided tape to join the two 3D printed parts together, preventing the grating from falling out during further assembly. If you assemble everything correctly up to this point and shine a light through the optical slit, the result should resemble the image on the right:

diffraction grating assembly

The current design looks slightly different than pictured here as it has the grating at an angle to address a problem that causes smooth spectra to have a peak at 550nm, caused by a specular reflection on one of the grating’s surfaces.

peak in spectrometer measurement caused by unwanted specular reflection
unwanted specular reflection causes peak in the measurement (spectrum of an incandecent bulb)

Focuser + CCD Sensor

This is how the focuser + CCD sensor assembly should look like when finished. Refer to this video for setting up the TCD1304 and ensure that you can get a reading from the sensor with the pyCCDGUI listed in the downloads section. Make sure that the focusing rotates freely over its whole range; if necessary, use washers for the M2 screws. Avoid overtightening the M1.4 screws!

focuser assembly

First Measurement

Combine the focuser assembly with the rest to get a working spectrometer. The collimation will likely still be off, but should suffice for a preliminary measurement. Connect your computer to the Nucleo board, start the pyCCDGUI and set it to continuous capture mode. Then power on your CFL and point the optical slit towards it. Change the exposure times to achieve a noticable intensity reading, which may appear blurry at first. Then adjust the focus to achieve sharp peaks as shown below:

initial spectrum measurement of a fluorescent light

If everything is working up to this point, the spectrometer’s hardware is complete. In the next post I’ll cover how to adjust the collimation and do wavelength callibration. Intensity calibration is also on my list, but this is more challenging when being on a budget.

Leave a Reply

Your email address will not be published. Required fields are marked *