Search models, users, collections, and posts

Mobile spectrometer

GIF

Print Profile(1)

All
H2D
H2C
P2S
P1P
A1 mini
X1
X1 Carbon
A1
H2S
X1E
H2D Pro
P1S

0.2mm layer, 2 walls, 15% infill
0.2mm layer, 2 walls, 15% infill
Designer
1.3 h
1 plate
4.9(8)

Open in Bambu Studio
Boost
567
1345
39
71
292
150
Released 

Bill of Materials

Maker's Supply Kits and Parts
Select all
M2x8 SHCS Machine Screw (20PCS) - AA023
M2x3.5x4 Round Threaded Brass Heat-Insert Nut (20PCS) - AB009
Bambu Filaments
Select all
Matte Charcoal (11101) / Refill / 1kg
List other parts
  • CD x 1: 1
  • Tracing paper x 1: 1

Description

Boost Me (for free)

Greetings! I am a maker with a passionate dedication to design and innovation. Through 3D modeling and printing, I translate concepts into tangible realities. Your support enables me to create elegant, practical solutions! Ways to Contribute: •Experiment with My Designs: Test them and provide valuable feedback. • Spread the Word: Share my creations within your network. • Collaborate or Offer Encouragement: Your support fuels my creative pursuits! Thank you!

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

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
     

☕ Enjoying the design?

If you found this design helpful and would like to support my work, feel free to buy me a coffee!

👉 https://buymeacoffee.com/shuwn

 

Comment & Rating (39)

(0/1000)

License

This user content is licensed under a Standard Digital File License.

You shall not share, sub-license, sell, rent, host, transfer, or distribute in any way the digital or 3D printed versions of this object, nor any other derivative work of this object in its digital or physical format (including - but not limited to - remixes of this object, and hosting on other digital platforms). The objects may not be used without permission in any way whatsoever in which you charge money, or collect fees.