Looking for a high definition DIY spectrometer

In summary, a high resolution spectrometer requires a narrow slit, a diffraction grating and a sensor. You could use a colour or B&W camera as the sensor, then extract the RGB as the brightness, with the pixel position in the image as the wavelength. You will get some IR sensitivity from a CMOS camera.
  • #1
fluidistic
Gold Member
3,923
261
Hello people,
I am looking for a high definition DIY spectrometer website or resource. If you find a good one please let me know.
I've watched several youtube videos about it, used both googles and duckduckgo but I am left unsatisfied.
There are several things I do not understand, both about the physics itself and about the setups I've seen.

In one tutorial, I have seen they made a dark tube where on one end there was a little slit made with 2 razor blades, and in the opposite end there was a hole covered by a CD surface. IMO both ends comply the same role, i.e. diffract light, so I do not understand the need of both of them.

Another thing I don't understand is about the photosensor. Does it need to be moved (or the prism rotated if a prism is used to diffract the light of interest) so that all parts of the incoming light's spectrum interacts with it? Or would the use of a lens to focus the whole spectrum onto the photosensor do the same job?

I have seen many DIY project with either a webcam or a regular camera photosensor. But as far as I know, these sensors are biased in the sense that they try to mimic the human eye, so that they are about 3 times better at catching green light than red. Is the software used to display the result as a spectrum aware of this bias? If each photosensor is biased differently, how does the software knows how to unbias the raw data?

How does a software translate a picture, or image, into a spectrum that shows the intensity/count of each part of the EM spectrum?
 
Physics news on Phys.org
  • #2
fluidistic said:
In one tutorial, I have seen they made a dark tube where on one end there was a little slit made with 2 razor blades, and in the opposite end there was a hole covered by a CD surface. IMO both ends comply the same role, i.e. diffract light, so I do not understand the need of both of them.
The CD is a grating that is doing the job of a prism. It separates light by wavelength.
The two blade slit is narrowing the beam of light so as to increase resolution of the wavelength by reducing the size of the source.

fluidistic said:
How does a software translate a picture, or image, into a spectrum that shows the intensity/count of each part of the EM spectrum?
Without a prism of grating it can only weigh the energy in the three sensitivity bands. It measures Red, Green and Blue bands, to give a very crude estimate of wavelength distribution. The sensitivity of the camera across different bands can be corrected to some extent.

A high resolution spectrometer will need a narrow slit, a diffraction grating and a sensor. You could use a colour or B&W camera as the sensor, then extract the RGB as the brightness, with the pixel position in the image as the wavelength. You will get some IR sensitivity from a CMOS camera.
 
  • Like
Likes fluidistic
  • #3
Baluncore said:
The CD is a grating that is doing the job of a prism. It separates light by wavelength.
The two blade slit is narrowing the beam of light so as to increase resolution of the wavelength by reducing the size of the source.Without a prism of grating it can only weigh the energy in the three sensitivity bands. It measures Red, Green and Blue bands, to give a very crude estimate of wavelength distribution. The sensitivity of the camera across different bands can be corrected to some extent.

A high resolution spectrometer will need a narrow slit, a diffraction grating and a sensor. You could use a colour or B&W camera as the sensor, then extract the RGB as the brightness, with the pixel position in the image as the wavelength. You will get some IR sensitivity from a CMOS camera.
Thank you for the information.
I suppose that the slit cannot be done too thin then, not only because too low intensity will result in more noise in the end, but also because of diffraction which may have a huge impact on what the sensor detects. Is this correct?

A prism would not be appropriate because the diffracted light severely depends on the wavelength and so the UV part is much more spread spatially than infrared. It is not linear like a grating pattern or CD would produce. So, unless the software takes into account that the light comes from a prism, I would have to adjust it myself into the software, I suppose.

I do not really understand the last comment of your last paragraph.
I think for now I'll be using a webcam or 14 M pixels camera or my 64 M pixels cell phone camera.

Do you have any open source software recommendation? Let's say that I build everything and I either film or take a picture. Which software do I use to get the spectrum out of it?
 
  • #4
fluidistic said:
I do not really understand the last comment of your last paragraph.
CMOS B&W cameras can see into the IR. I do not know when the UV sensitivity falls. You must study the sensitivity spectrum of the camera and the lens used.
The CD grating will also have a transmission spectrum. You must identify the material used if the light passes through the plastic.
fluidistic said:
Do you have any open source software recommendation?
I know what I would use, but it is not what you should use. What computer languages are you familiar with? Can you find a driver to load an image into a buffer from a webcam that you can then process?
You will need to fix the camera in position, so it is probably better not to use your phone when webcams are so cheap. You need to practice writing code to read and process images, then study the RGB sensitivity to different wavelengths.
 
  • Like
Likes fluidistic
  • #5
Baluncore said:
CMOS B&W cameras can see into the IR. I do not know when the UV sensitivity falls. You must study the sensitivity spectrum of the camera and the lens used.
The CD grating will also have a transmission spectrum. You must identify the material used if the light passes through the plastic.
Ok I see, is that because all materials will absorb/emit some light, even the CD grating so that if I want to be accurate in the measurements I need to know where in the spectrum it modifies the orignal signal? Can't I just use the sun as source and see if the CD plastic makes a difference from what the spectrum should look like? I already know about the absorbption peaks by the atmosphere, etc.

I know what I would use, but it is not what you should use. What computer languages are you familiar with? Can you find a driver to load an image into a buffer from a webcam that you can then process?
You will need to fix the camera in position, so it is probably better not to use your phone when webcams are so cheap. You need to practice writing code to read and process images, then study the RGB sensitivity to different wavelengths.
I am familiar with Python but no hardware coding, i.e. driver related things. I was hoping that some people had already went through the hassle to do this, open sourced their code and let us do a calibration of the spectrum we get, using several light sources. I have the Sun and a red laser.
But yeah I see no way that they could know which sensor I use, so I'd need to do a study of the sensitivity of the sensor across the EM spectrum... but that's if I wanted to build a professisonal research related spectrometer, which is not what I want. I just want a simple cheap DIY device that I could potentially improve a little upon. I don't care about IR and UV. If the device is able to tell me the yellow color I see comes from a mix of green and red then I'm happy. But I do want to have some kind of precision (because in particular I want to test a light source that appears blue under certain circumstances but violet under others and I know my brain is making tricks otherwise Maxwell equations wouldn't be satisifed), so using the naked eye + CD is not an option, I need more than just that.
 
  • #6
fluidistic said:
I am familiar with Python but no hardware coding, i.e. driver related things.
google; 'python opencv save image from webcam'

fluidistic said:
Can't I just use the sun as source and see if the CD plastic makes a difference from what the spectrum should look like?
Exactly, but you have to get a webcam running with python to do that.
 
  • #8
Quick update. I have finished this DIY project. I used a "Springles" tube and taped a webcam on an end of the tube. Then I used the publiclab website to monitor and get the spectrum I sought.
However having the webcam directly in front of the aperture isn't good in that the publiclab software output is impacted by that direct non diffracted light. Anyway I could get a few spectrums, it was nice, that's about it.
 
  • Like
Likes Tom.G and anorlunda

1. What is a spectrometer?

A spectrometer is a scientific instrument used to measure and analyze the properties of light. It separates light into its different wavelengths and measures the intensity of each wavelength, providing information about the composition and characteristics of the light source.

2. Why would someone want to build a DIY spectrometer?

Building a DIY spectrometer can be a fun and educational project for those interested in science and technology. It can also be a cost-effective way to obtain a high definition spectrometer, as commercially available ones can be expensive.

3. What materials are needed to build a DIY spectrometer?

The materials needed may vary depending on the specific design and purpose of the spectrometer, but some common components include a light source, a diffraction grating, a slit, a lens, and a detector such as a camera or a photodiode. Other tools and supplies such as a ruler, tape, and a box or enclosure may also be needed.

4. How does a DIY spectrometer work?

A DIY spectrometer works by directing light from a source through a narrow slit, which creates a thin beam of light. This beam then passes through a diffraction grating, which separates the light into its different wavelengths. The separated wavelengths are then focused by a lens onto a detector, which measures the intensity of each wavelength. This data is then processed and analyzed to create a spectrum of the light source.

5. What can a DIY spectrometer be used for?

A DIY spectrometer can be used for a variety of purposes, such as studying the composition of different light sources, identifying unknown substances by their spectral signatures, and even conducting experiments in fields such as chemistry and astronomy. It can also be used for educational purposes, such as teaching students about light and its properties.

Similar threads

Replies
14
Views
2K
  • Mechanical Engineering
Replies
20
Views
2K
Replies
3
Views
811
Replies
29
Views
3K
  • Other Physics Topics
Replies
7
Views
3K
  • Introductory Physics Homework Help
Replies
4
Views
3K
  • Electrical Engineering
Replies
27
Views
5K
  • Introductory Physics Homework Help
Replies
2
Views
800
  • Electromagnetism
Replies
3
Views
1K
Replies
29
Views
2K
Back
Top