• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
Mobile spectrometer 3D Printer File Image 1
Mobile spectrometer 3D Printer File Image 2
Mobile spectrometer 3D Printer File Image 3
Mobile spectrometer 3D Printer File Image 4
Mobile spectrometer 3D Printer File Image 5
Mobile spectrometer 3D Printer File Image 6
Mobile spectrometer 3D Printer File Image 7
Mobile spectrometer 3D Printer File Image 8
Mobile spectrometer 3D Printer File Thumbnail 1
Mobile spectrometer 3D Printer File Thumbnail 2
Mobile spectrometer 3D Printer File Thumbnail 3
Mobile spectrometer 3D Printer File Thumbnail 4
Mobile spectrometer 3D Printer File Thumbnail 5
Mobile spectrometer 3D Printer File Thumbnail 6
Mobile spectrometer 3D Printer File Thumbnail 7
Mobile spectrometer 3D Printer File Thumbnail 8

Mobile spectrometer

Shuwn Hsu avatarShuwn Hsu

May 27, 2025

makerworld-icon
DescriptionCommentsTags

Description

Introduction

Here’s a simple but fully functional DIY smartphone spectrometer, built using nothing more than a CD and a 3D printed enclosure.

 

It’s designed for science education and maker projects. By using the spiral grooves of a CD as a reflective diffraction grating, it splits ordinary white light into a colorful visible spectrum—making wavelength separation easy to observe.

 

The entire body is 3D printed and compatible with most modern smartphones (≤Ø16mm lens). With just a few basic parts and minimal tools, it’s quick to assemble and perfect for classroom demonstrations, science fairs, or home experiments.

What You’ll Need

  • CD (reflective grating) – Use a blank, unused CD for best diffraction clarity
  • Slit module (0.1–0.2 mm width) – 3D printed; requires precise XY calibration. Ideally, the slit should fit a single sheet of A4 paper (≈0.104 mm thick)

    Strongly recommended: calibrate your printer before slicing

    Calibration model

    https://makerworld.com/models/1307486

    Bambu Lab guide

    https://wiki.bambulab.com/zh/software/bambu-studio/xy-hole-contour-compensation

  • 3D printed body – Matte black PLA is recommended to minimize reflection and diffuse scattering while maintaining good rigidity.
  • Tracing paper (optional) – Helps diffuse bright light sources
  • Fine sandpaper (optional) – Reduces internal reflection for better contrast

Key Highlights

  • Perfect for science classes, maker demonstrations, or at-home STEM exploration
  • Modular components for easy replacement or upgrades
  • Compatible with most smartphones, including iPhone and Android devices

Suggested Light Sources for Classroom Experiments

This device can be used by educators to demonstrate the spectral characteristics of various light sources:

  • LED bulbs – Discrete band spectrum with sharp transitions
  • Fluorescent lamps – Spiky, jagged emission spectrum
  • Sunlight – Continuous blackbody spectrum
  • Laser pointer – Single-wavelength monochromatic light

     

Assembly Steps

Design Principle: Diffraction Grating Equation

This spectrometer is based on reflective diffraction, using the spiral grooves on a CD to produce interference and separate wavelengths of visible light.

 

SymbolDescription
mDiffraction order (set to m = 1)
λWavelength (in nm)
dGrating spacing (CD ≈ 1.6 μm)
αAngle of incidence (59° in this design)
βAngle of diffraction, varies by wavelength

Assuming a 13 mm internal light path, the diffraction angles calculated above would project a visible spectrum band approximately 2.87 mm wide on a typical smartphone camera sensor (which is around 8–9 mm in width). This setup clearly displays the transition from violet to red wavelengths, ideal for real-time spectral observation.

Sample Spectral Images

Here are real images captured using this spectrometer and a smartphone. You can clearly observe the spread of visible wavelengths from violet to red, with distinct spectral features for each light source.

Calibration & Analysis Results

Using known light sources (e.g., laser pointers, green LEDs), you can calibrate pixel positions against their respective wavelengths.

With image processing tools like ImageJ, you can convert the spectrum image into grayscale intensity plots and analyze RGB channel responses—perfect for building your own material spectrum reference library.

How to Calibrate a Spectrum Image Using ImageJ and Excel

When you capture a spectral image, whether from a DIY spectrometer or a lab-grade setup. You're usually left with a photo where the x-axis is measured in pixels, not wavelengths.

 

To extract meaningful data from this image, you need to calibrate it: map pixel positions to real physical wavelengths. 

 

This guide walks you through how to do just that using ImageJ and Excel. It's perfect for students, hobbyists, and makers working on light optical projects.

Why Calibrate a Spectrum Image?

The x-axis of a raw spectral image only shows pixel positions. To interpret the data physically, like identifying specific emission lines or absorption bands, you must convert those pixel values into actual wavelengths. This is called wavelength calibration.

 

You’ll use a light source with known emission lines (such as a fluorescent bulb, mercury lamp, or gas discharge tube) to match pixel positions to real-world wavelengths.

What You’ll Need

  • ImageJ: A free, open-source image analysis tool.

    Download it from: https://imagej.net/ij/

  • Spectroscope App (optional): capture, calibrate, and analyze light spectra in real time.
    Download it from: https://www.majinsoft.com/education.php
  • Excel or Google Sheets: For organizing data and performing curve fitting.
  • A spectral image of a known light source: Fluorescent lamps are great. They have sharp emission lines at well-known wavelengths.

 

Step 1: Extract Pixel Intensity Profile in ImageJ

  1. Open the Spectral Image

    Launch ImageJ and go to File > Open. Choose your spectrum image (JPG, PNG, or TIFF works).

  2. Ensure Left = Blue, Right = Red

    Make sure the spectrum is oriented correctly: blue (short wavelengths) should be on the left, red (long wavelengths) on the right.

    1. If it’s reversed, go to Image > Transform > Flip Horizontally or use Rotate to correct it.
    2. If the spectrum is tilted, use Image > Transform > Rotate... to fine-tune the angle and align the spectral band horizontally.
  3. Select a Horizontal Area

    Use the rectangular selection tool to highlight a horizontal strip across the spectrum. Try to align it with the axis of the spectral lines.

  4. Generate the Profile Plot

    Go to Analyze > Plot Profile. A graph of intensity vs. pixel position will appear.

  5. Export the Data

    Click List on the profile plot window to view the raw data. Select all (Ctrl+A) and copy (Ctrl+C). Paste it into Excel, you’ll see two columns: Pixel and Intensity.

Step 2: Identify Known Wavelength Peaks

  1. Find Known Peaks

    Look up the emission lines for your calibration source. For example, a typical fluorescent lamp may show:

     

    • 611 nm
    • 546 nm
    • 435.8 nm

     

  2. Match Pixel Positions to Wavelengths
    1. Go to Analyze > Tools > Curve Fitting, this opens the Curve Fitter dialog.
    2. Press the Delete key on your keyboard to clear any default numbers shown in the window.

    3. Use your Excel data to find the pixel positions of these peaks (the local intensity maxima), and create a reference table:

    4. After entering the data, click “Fit” in the Curve Fitter window. Two new windows will appear:

      • y = a + bx: This displays the linear fit equation. For example:

        y = 409.01234 + 0.17534x

        This means: Wavelength = 409.01234 + 0.17534 × Pixel

      • Log: Shows fitting process details and statistics like R² value.

Step 3: Create a Calibration Curve in Excel

Now that you have your calibration formula, you can convert any pixel value into its corresponding wavelength simply by applying the equation.

  • Use your calibration formula to convert pixel values into wavelengths:
    Wavelength(nm) = 409.01234 + 0.17534 * A2
  • Normalize intensity for better comparison by converting to percentage:
    Intensity(counts) = (B2/Max_Gray_Value)*100

In the Profile Plot generated by ImageJ, the intensity values are based on the pixel brightness or grayscale level in the image. If certain areas of your spectral image are very bright, some pixels may reach saturation, resulting in intensity values well over 100. To make your spectrum easier to interpret and compare visually, it’s often helpful to normalize the intensity values in Excel.

 

This scales the data to a consistent 0–100% range, making plots across different light sources or exposure settings easier to compare.

Step 4: Plot Wavelength (nm) vs. Intensity (%)

With your new calibrated data, you can plot a true spectrum: Wavelength (X) vs. Intensity (Y). This chart gives you a real, physics-based view of the light source and is suitable for comparison or analysis.

Excel sample file:

https://www.dropbox.com/scl/fi/qydr4gouyx0muu035mlbw/Fluorescent-light-spectrum.xlsx?rlkey=5x49hw5ntz9mej8te76lmgu04&dl=0

Changelog

All notable changes to this project will be documented in this file.

This changelog adheres to the Keep a Changelog format.

[v2] - 2025-05-30

Changed

  • Added locking slots to Neutral Hood and Lens Hood to improve stability and prevent detachment

[v1] - 2025-05-27

Added

  • Initial release, including the smartphone spectrometer body, slit module, and camera alignment structure

 

References

  1. Theremino Spectrometer Sample Spectrums
  2. Theremino Spectrometer Diffraction gratings
  3. Theremino Spectrometer Technology
  4. Make your own CD spectrometer
  5. Jim's Homemade Spectrometers
     

License:

Standard Digital File License

Related Models

Smartphone Photo Studio for #3DBenchy and tiny stuff preview image

Smartphone Photo Studio for #3DBenchy and tiny stuff

CreativeTools profile image

CreativeTools

26,458

Mobile Exo-Suit preview image

Mobile Exo-Suit

jajaum3d profile image

jajaum3d

8,764

Handyhalter Herz preview image

Handyhalter Herz

Sasch_Un1q3D profile image

Sasch_Un1q3D

217

Articulating, Wall-Mounted, Magnetic Phone Mount preview image

Articulating, Wall-Mounted, Magnetic Phone Mount

doctriam profile image

doctriam

26,450

Geared Phone stand preview image

Geared Phone stand

Thorin Oakenshield profile image

Thorin Oakenshield

7,319

NFC Connector preview image

NFC Connector

Sparks3D profile image

Sparks3D

4

Octopus Stand Version Three preview image

Octopus Stand Version Three

notcolinforreal profile image

notcolinforreal

22,393

USB-C dirt remover preview image

USB-C dirt remover

Dušan profile image

Dušan

8,304