The LED fits snugly into a LEGO Technic brick with holes and is powered by a battery pack. Then there is space for the sample, followed by a slit. After this, there is a sliding rail for a lens (3D printed mount), a transmission grating, and a viewing card to display the spectrum. The image of the spectrum is then taken with a simple webcam.
To support UG lectures on absorption spectroscopy, we have developed a spectrometer based on LEGO. The components include a light source (white-light LED), slit, lens, diffraction grating (transmission), and a webcam for data acquisition. The overall layout is shown below.
The experiment then involves capturing an image on the webcam and transforming this into a spectrum. Calibration can be done using a known spectrum of a filter. An overview of the experiment's lab script can be found here.
Conversion from jpg image to spectrum and paste * https://github.com/cjcjordan713/lego-spectrometer * into GitHub repository name or URL