Table of Contents
Building a Simple Spectrometer With Household Materials
A CD, cardboard box, and phone camera build a working spectrometer for under $5. What kids learn about light, emission spectra, and how astronomers identify elements in distant stars.
In 1814, Joseph von Fraunhofer invented the spectroscope. Within a few decades, scientists realized they could identify specific elements by the precise colors of light they emit when heated. By the end of the 19th century, astronomers were identifying hydrogen, helium, calcium, and iron in the sun’s atmosphere using nothing but light. They had never visited the sun, could never visit the sun, and never needed to.
That is the power of spectroscopy. And your kid can build the instrument that makes it work using a scratched CD and a shoebox.
Key Takeaways
- A CD-based spectrometer built in 30 minutes for under $5 can visibly distinguish the emission spectra of LED, incandescent, fluorescent, and flame light sources
- Light is a continuous spectrum, but atoms emit and absorb only specific wavelengths — producing emission lines that act as atomic fingerprints
- The same spectroscopy principles used in this $5 project are used in the James Webb Space Telescope to identify atmospheric components of exoplanets
- Comparing spectra from different light sources is a genuine physics investigation — not a demonstration but an experiment with results that vary and require explanation
- This project is appropriate from age 10+ and pairs well with photography and chemistry topics
What a Spectrometer Does
White light contains all visible wavelengths mixed together. A spectrometer separates those wavelengths into a spectrum by using a diffraction grating — a surface with thousands of tiny parallel grooves that bend different wavelengths of light at different angles.
The back of a CD is a diffraction grating. Hold a CD under a light and tilt it — the colors you see are the visible spectrum separated by diffraction. The scratches you sometimes see in a spectrum are dust or scratches interfering with the diffraction pattern.
In a professional spectrometer, a narrow slit admits light, a grating separates it, and a detector records the intensity at each wavelength. Your cardboard version does the same thing — the slit is a cut in the box, the CD is the grating, and your phone camera is the detector.
Building the Spectrometer
Materials:
- Old CD or DVD (scratched is fine, the reflective side is the grating)
- Cardboard box (a shoebox or cereal box works well)
- Craft knife or scissors
- Black electrical tape
- Aluminum foil
- Smartphone
Cost: Under $5 (if you don’t have an old CD, a pack of blank CDs costs $3–5)
Age: 10+
Time: 30–45 minutes
Step 1 — Make the slit. Cut a thin slit (about 1mm wide, 2cm tall) in one end of the box. Cover the rest of that end with black tape so only the slit admits light. Narrower slits produce sharper spectra but admit less light.
Step 2 — Mount the CD. At the opposite end of the box, cut a hole the size of your phone camera lens. Tape a section of CD (cut it into a small square — reflective side up) inside the box at a 45° angle to the slit. The angle may need adjustment — start at 45° and rotate slightly until you see colors in your phone screen.
Step 3 — Seal the box. Any stray light entering the box reduces contrast. Use black tape to seal all seams.
Step 4 — Aim and focus. Point the slit at a light source, look through the camera at the CD angle, and you should see a spectrum on your screen. Focus the camera manually if your phone auto-focuses on the wrong distance.
What You’ll See: Light Sources Compared
This is where the spectrometer becomes a scientific instrument rather than a craft project. Different light sources produce dramatically different spectra.
Incandescent bulb: A continuous rainbow spectrum — all wavelengths, smoothly blended. This is thermal emission from a hot filament.
LED bulb: A distinctive pattern — usually a bright spike in the blue, a gap, then a broad yellow-green band. LEDs work by pumping a blue LED through a phosphor that converts some blue to yellow, and your eye blends them to white. The spectrometer unmasks this.
Fluorescent (CFL) bulb: A series of bright discrete lines — usually greens, yellow, and oranges. These are the emission lines of mercury and phosphor. Completely different from the continuous thermal spectrum of an incandescent.
Candle flame: A continuous spectrum tilted toward red and yellow — thermal emission from hot carbon particles (soot) in the flame.
Neon sign (if accessible): Vivid red lines — the characteristic emission spectrum of neon gas.
| Light source | Spectrum type | Dominant colors | What produces it |
|---|---|---|---|
| Incandescent | Continuous | Full rainbow | Hot metal filament thermal emission |
| LED (white) | Discrete + broad | Blue spike + yellow band | Blue LED + phosphor conversion |
| Fluorescent (CFL) | Discrete lines | Green, yellow, orange | Mercury vapor emission lines |
| Candle flame | Continuous, red-shifted | Orange, red, yellow | Hot carbon particle thermal emission |
| Neon sign | Discrete lines | Red, orange-red | Neon gas emission at specific wavelengths |
| Sunlight (indirect) | Continuous + absorption lines | Full rainbow with dark gaps | Thermal solar + Fraunhofer absorption by atmosphere |
The Fraunhofer lines in sunlight — dark lines in the continuous solar spectrum caused by elements in the solar atmosphere absorbing specific wavelengths — are visible with a good spectrometer and are exactly what Fraunhofer first mapped in 1814.
The Astronomy Connection
The reason spectroscopy is one of astronomy’s most important techniques is this: every element has a unique set of emission lines. Hydrogen emits at 656nm (red), 486nm (blue-green), 434nm (violet). Helium emits at 588nm (yellow). Sodium emits at two lines very close together in yellow-orange, which is why sodium street lamps appear a characteristic orange.
When astronomers observe a star, they take a spectrum. The dark absorption lines in the star’s spectrum tell them exactly which elements are absorbing light in the star’s atmosphere. This is how we know the sun is 75% hydrogen and 24% helium without ever visiting it. It’s how the James Webb Space Telescope detects water vapor and carbon dioxide in the atmospheres of planets orbiting other stars.
The same physics operating in a cardboard box with a CD tells us what exoplanet atmospheres are made of.
How to Teach Your Kid About Light and Spectra
Ages 5–8: The Prism Rainbow
A glass prism or a crystal (even a glass of water at the right angle) separates sunlight into a rainbow. Point a flashlight through a CD in a dark room. Ask: where do the colors come from? This builds the intuition that white light contains colors before introducing why different light sources have different spectra.
Ages 9–12: Build and Compare
Build the spectrometer together. Then visit four different light sources: a window (sunlight), an LED, a fluorescent, and a candle (with supervision). Photograph each spectrum. Print the photos side by side and ask: what’s different? Which sources show sharp lines vs. continuous colors? What might cause the differences? This is scientific comparison from observation — no prior knowledge required.
Ages 13+: Quantify the Lines
Use a free spectroscopy app like Spectrum (iOS) or SpectralWorkbench (spectralworkbench.org) to calibrate your spectrometer against a known light source (green laser pointer or neon lamp) and produce wavelength-calibrated spectra. Compare your measured mercury emission lines against the known values from NIST (nist.gov/pml/atomic-spectra-database) and calculate your measurement error. This is real analytical chemistry methodology.
The question to ask: “If you could only measure the light coming from a distant planet — and nothing else — what could you figure out about it?”
What to Watch For Over the Next 3 Months
Month 1: After the first spectrometer session, watch for whether your kid points at light sources in everyday life and asks about their spectra. LED streetlights at night, neon signs, a candle at dinner. The spectrometer project is successful when it changes how your kid sees light.
Month 2: If initial interest holds, introduce SpectralWorkbench.org — a community science platform where students upload calibrated spectra and contribute to a public database. Your kid’s home spectra can become part of a dataset used for educational research.
Month 3: Introduce the concept of absorption spectroscopy — which is what astronomers actually use for stars. A simple experiment: dissolve a small amount of copper sulfate in water and look at what colors it absorbs (it will transmit blue and absorb red). This is absorption rather than emission, and it’s the principle behind the Fraunhofer lines in the solar spectrum.
See hands-on STEM learning research for why physical investigation of real phenomena produces better scientific reasoning than passive observation.
Frequently Asked Questions
Does the CD need to be unscratched?
No — scratches affect the clarity of the spectrum but don’t prevent it from working. The reflective layer is the diffraction grating; it’s embedded under the clear polycarbonate layer and isn’t easily damaged by surface scratches. A badly warped or delaminated CD won’t work well.
Can you see individual atomic emission lines with this spectrometer?
Yes, but resolution is limited by slit width. A 1mm slit produces spectra where the mercury lines in a CFL bulb are visible as distinct orange, green, and blue-green lines. A 0.3mm slit (cut with a craft knife very carefully) produces noticeably sharper spectra.
What’s the difference between a spectrometer and a spectroscope?
A spectroscope is any instrument that separates light into its spectrum for visual inspection. A spectrometer includes calibration so you can measure the wavelength of each feature quantitatively. A spectrophotometer additionally measures the intensity at each wavelength. Your cardboard version starts as a spectroscope and becomes a basic spectrometer once you calibrate it.
Can this detect invisible light like UV or infrared?
No — CD diffraction gratings work in the visible range. Your phone camera also doesn’t capture UV or infrared well. Dedicated UV or IR spectroscopy requires different sensors and gratings.
About the author Ricky Flores is the founder of HiWave Makers and an electrical engineer with 15+ years of experience building consumer technology at Apple, Samsung, and Texas Instruments. He writes about how kids learn to build, think, and create in a tech-saturated world. Read more at hiwavemakers.com.
Sources
- Fraunhofer, J. (1817). “Bestimmung des Brechungs- und des Farbenzerstreuungs-Vermögens verschiedener Glasarten.” Denkschriften der Königlichen Akademie der Wissenschaften zu München, 5, 193–226. (Historical primary source.)
- NIST Atomic Spectra Database. (2024). Atomic Line Data. https://www.nist.gov/pml/atomic-spectra-database
- NASA James Webb Space Telescope. (2023). Spectroscopy: Reading the Rainbow of Space. https://webbtelescope.org/contents/articles/spectroscopy
- Public Lab Spectrometry Project. (2024). SpectralWorkbench Community Science Platform. https://spectralworkbench.org/
- Nave, C.R. (2023). HyperPhysics: Light and Vision — Diffraction Grating. Georgia State University. http://hyperphysics.phy-astr.gsu.edu/hbase/phyopt/grating.html
- Hecht, E. (2017). Optics (5th ed.). Pearson Education.