Spectra Scope

Spectra Scope

thingiverse

This is a DIY light spectrum analyzer designed to work in tandem with a smartphone, capturing spectral images of a given light source and analyzing the results. Two Python scripts are included: one for batch processing files and another that contains the analysis code. To assemble this device, you'll need a toilet paper roll, a small mirror (a 2" square model from Amazon), and a diffraction grating, also obtained from Amazon. The diffraction grating I used has 1000 lines/mm, but deviating from this value will alter the diffraction angle relative to wavelength. The aperture cover's hole should be covered with tinfoil, and its backside, including the foil, painted with matte black paint. Secure the foil in place by applying hot glue around the edges, pressing down firmly to eliminate any gaps. Next, pierce the foil near the center of the hole using a small needle. The smaller the hole, the more accurate the scope will be. To minimize reflections, paint the inside of the aperture and diffraction bodies with matte black paint. If you're capturing images of high-intensity point sources like LEDs, consider using a refractory material to eliminate the pinhole camera effect and reduce overall intensity. I use white semitransparent tissue paper or a thin piece of white foam held over the pinhole. Once assembled, seal any light leaks with a combination of matte black paint and hot glue. The analysis takes a vertically oriented spectrum photo, which is a cropped version of the full-sized image captured by your smartphone. It sums pixel intensity (calculated using a sum of squares average across RGB values) on a per-row basis and produces a scaled plot of intensity overlaid on a rotated version of the spectrum photo. This plot can be viewed directly or output to a PNG file, which is set as the default. This analysis appears to provide a reasonable estimation of the actual spectral output, but keep in mind that calibration sources should be considered when interpreting results. I've included many analyzed outputs as proof of my claims. If you have any questions, need more information, or would like to provide feedback, feel free to contact me at matthew.czyzewski@gmail.com. Please excuse the state of my code; I'm a messy coder who struggles with commenting. Required Python packages include matplotlib, os, PIL (also known as Pillow), and math.

Download Model from thingiverse

With this file you will be able to print Spectra Scope with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Spectra Scope.