

To calibrate, shine 2 Lasers of known wavelength (He-Ne, Argon or DPSS recommended! (Diode Lasers can have wavelengths that can be +/- several nm!)) at a piece of card in front of the spectrometer.Ĭlick the two peaks on the graph, and in each of the boxes enter the corresponding wavelength. Run the program with: python3 pyspectrometer-v1.py
#Music spectrograph install
Sudo apt-get install python-dev libatlas-base-dev As a consequence it will work with some webcams on probably any Linux box (Tested on Debian with a random webcam))įirst attach the Picam, and enable it with raspi-config
#Music spectrograph software
(Note the software uses the Linux Video Driver, not the Picam Python module. The blue end should be on the left and the red on the right.ĭeveloped and tested on: -raspios-buster-armhf-full.img for anything else your milage may vary! Use the command: raspistill -t0 for a live view.Īdjust the lens so the spectrum is in focus and rotate the sectroscope so the spectrum is aligned horizontally. Point the spectromter at a light source and preview with a utility such as raspistill. Refer to the above photographs for example mounts. Mount the Picamera and Lens in such a way that it "looks down the barrel" of the spectroscope. M12x0.5 F2.0 Fixed 12mm Focal length Lens: Of course, this build is physically much larger, but not enormous!Ī video of this project specifically is available here:Ī commercial Diffraction grating Spectroscope Ī Raspberry Pi Camera (with an M12 Thread) Ī CCTV Lens with Zoom (M12 Thread) (Search eBay for F1.6 zoom lens)Įverything is assembled on an aluminium base (note the Camera is not cooled, the heatsink was a conveniently sized piece of aluminium.)įor the MINIATURE version the hardware is:Ī commercial Diffraction grating Pocket Spectroscope: Ī Raspberry Pi Camera (with an M12 Thread): Resolution/accuracy seems to be +/- a couple of nm or so, pretty reasonable for the price of the hardware, especially when you consider the price of commercial components such as the Hamamatsu C12880MA breakout boards which run north of 300 bucks, and has a resolution of 15nm. The hard work was developing the software. The hardware is simple and widely avilable and so should be easily to duplicate without critical alignment or difficult construction. Most importantly at a cost that is in reach of everyone! The motivation beind this project was to build a tool that could measure the wavelength of home-made Dye Lasers and perform some fluorescence spectroscopy. The PySpectrometer is a Python (OpenCV and Tkinter) implementation of an optical spectrometer.

The Project is hosted at GiHub and all source code can be found here:
