Sciencemadness Discussion Board
Not logged in [Login ]
Go To Bottom

Printable Version  
 Pages:  1  
Author: Subject: DIY spectrometer resolution
aa1881
Harmless
*




Posts: 14
Registered: 13-10-2021
Member Is Offline


[*] posted on 7-3-2024 at 08:19
DIY spectrometer resolution


I made a diy spectrometer using this tutorial:
https://www.gaudi.ch/GaudiLabs/?page_id=1124

It works, but the resolution isn't great and I'd like to improve it, but the theory isn't very clear to me.

Apart from changing the grating and narrowing the entrance slit, are there any other ways to increase the resolution? I read stuff about angles and distances, but I couldn't get it to improve experimentally. Could i change the camera or add other optics to increase the resolution?

Thanks in advance,
aa1881
View user's profile View All Posts By User
aa1881
Harmless
*




Posts: 14
Registered: 13-10-2021
Member Is Offline


[*] posted on 7-3-2024 at 08:20
DIY spectrometer resolution


Here is an image of a neon bulb and the spectral "lines" are pretty broad and not all are visible.

0_09.bmp - 2.5MB
View user's profile View All Posts By User
RU_KLO
Hazard to Others
***




Posts: 209
Registered: 12-10-2022
Location: Argentina
Member Is Offline


[*] posted on 7-3-2024 at 09:22


sorry, I do not own or constructed a spectometer,- its in my wish list, so take this with a grain of salt.
I think that the most important part is the light source. it should have a broad spectrum.

for example, you cannot meassure in a band (ex: 400 - 500nm) if you light does not produce light in that spectrum.
also, if the light has a high energy in a band, it could overwhelm the sensor, thus blurring the others.
Getting the right amount of light on the camera is important. Too much light, and the lines are blurred.

The same is in accoustics and microphony, thats why, for meassuring microphones, there are calibration charts that adjust the sensor to get the most flat response possible.

In audio/radio, for better precision, filters are used. Try to use optical filters to remove whats unwanted. (it is used in old book chemistry as "use cobalt blue glass, for checking the spectrum of potassium to filter the sodium spectrum)

Also better sensors, give better results. -in this case, a better camera.

I dont think that optics (in case of lenses) will help. In audio if the signal is distorted, amplifying in will get the distortion amplified. (Crap in; Crap out)


try to meassure sun light (pointing with a mirror) to see the spectrum you have and confirm this with internet spectrum meassures.

attached a picture of light spectrums dowloaded from:
https://ledworx.co.za/services/spectrometer/

I did made DIY electronic "equipements" for meassuring -mostly audio-electronics, because it was may last hobby, currently is chemsitry, and have understand that there are a lot of limitations (Y call them tolerances) and you have to be tolerant....
You cannot match a DIY USD 100 to a 2000 usd equipemnt, in accuracy and presicion.

hope it helps

found this, maybe it could help you https://publiclab.org/notes/cfastie/2-5-2013/grating-angle



Wavelenghts_of_light.png - 71kB


[Edited on 7-3-2024 by RU_KLO]




Go SAFE, because stupidity and bad Luck exist.
View user's profile View All Posts By User
Stokes
Harmless
*




Posts: 7
Registered: 6-11-2023
Member Is Offline


[*] posted on 8-3-2024 at 01:04


It might help to add a collimating lens between the fiber optic input and the slit, which is basically just a convex lens with one of its focal points at the point where light enters the spectrometer.
View user's profile View All Posts By User
Twospoons
International Hazard
*****




Posts: 1324
Registered: 26-7-2004
Location: Middle Earth
Member Is Offline

Mood: A trace of hope...

[*] posted on 8-3-2024 at 13:19


Quote: Originally posted by aa1881  
Could i change the camera or add other optics to increase the resolution?
aa1881

That image looks a little out of focus to me.

If you are prepared to buy a camera with a bigger sensor and a better lens, then yes. Those little web cams are not really optimal for making a high resolution spectrometer.
A bigger lens will capture more light, and a sensor with bigger pixels should have a lower noise floor. The focal length of the lens also matters: you want to use as much of the sensor width as possible, so the setup of the lens should spread the spectrum across the entire sensor.
Lens quality also matters, in terms of resolving power, contrast, and optical distortions.




Helicopter: "helico" -> spiral, "pter" -> with wings
View user's profile View All Posts By User
aa1881
Harmless
*




Posts: 14
Registered: 13-10-2021
Member Is Offline


[*] posted on 8-3-2024 at 16:40


The distance from the grating to the camera is 2.8 mm, which should be the focal point for the camera, and if I understand correctly, these camera's have a pretty wide focal range.
Other than the source listed bij RU-KLO with experimental data, I found a reasonably userfriendly guide to designing a spectroscope with a theoretical approach (https://ibsen.com/resources/spectrometer-resources/spectrome...). I'll start by designing a somewhat modular spectroscope to play with these paramaters and find an optimum and also to find a way to fully stretch the spectrum across the sensor, as Twospoons suggested, but if it still doesn't provide satisfactory results, I'll look into getting a better resolution camera with an adjustable focus lens and might add a collimation lens to it as well. I won't get to this anytime soon, but once/if I'll make it work, I'll post an update for those googling the same question and struggling as I am.

Thanks everyone for your input so far, you've been very helpful.
View user's profile View All Posts By User
Rainwater
National Hazard
****




Posts: 919
Registered: 22-12-2021
Member Is Offline

Mood: indisposition to activity

[*] posted on 8-3-2024 at 18:20


You should ditch the gradient and use a prism. That should bring the resolution to the maxium your camera has.
Edit: Preview/post conflict
Using a long bolt, you could rig up a way to accurately move the optics(camera or lens) to find that sweet spot where everything is in focus.
This is on my todo list

[Edited on 9-3-2024 by Rainwater]




"You can't do that" - challenge accepted
View user's profile View All Posts By User
Sulaiman
International Hazard
*****




Posts: 3692
Registered: 8-2-2015
Location: 3rd rock from the sun
Member Is Offline


[*] posted on 9-3-2024 at 02:20


Try watching the video from the camera using a monochromatic light source,
adjust your optics for the thinnest line image.

If no monochromatic light source is available
you could just adjust your optics for the most focussed/sharp image.

I have a diy spectroscope that one day (?) I hope to add a camera to,
just like my remote (in a comfy place) controlled telescope project... someday, maybe. :(




CAUTION : Hobby Chemist, not Professional or even Amateur
View user's profile View All Posts By User
Ubya
International Hazard
*****




Posts: 1247
Registered: 23-11-2017
Location: Rome-Italy
Member Is Offline

Mood: I'm a maddo scientisto!!!

[*] posted on 10-3-2024 at 06:03


cheap webcams have cheap sensors and even cheaper lenses.
Mine isn't the worst webcam on the market, but I still managed to shoot myself in the foot by removing the IR filter, because now it is permanently out of focus for the visible spectrum.

Large sensor, focusable, those are my tips.

0_02.jpg - 1MB

this is the janky spectrophotometer I've been playing with for 4 years, nothing fancy

spectrophotometer.jpeg - 135kB





---------------------------------------------------------------------
feel free to correct my grammar, or any mistakes i make
---------------------------------------------------------------------
View user's profile View All Posts By User
aa1881
Harmless
*




Posts: 14
Registered: 13-10-2021
Member Is Offline


[*] posted on 10-3-2024 at 09:41


So I've been messing around with distances and angles, and although it can get sharper or fuzzier when looking at monochromatic light, the apparant length of the spectrum across the sensor always seems to be about 300 pixels for a white ligth source, and I'd like to use the entire 1280 horizontal pixels.
Here is a video to illustrate what I mean, notice the horizontal length of the spectrum not changing despite moving all variables:

https://youtu.be/sPG8lB17gxE

I also think this camera can't get me the resolution I desire, ideally about 1 nm of separation. Does anyone have any recommendations for sensors and or lenses to get me to that kind of resolution? Does anyone know how to make the desired range of the spectrum fit across the entire sensor? Does that require lenses?
View user's profile View All Posts By User
Sulaiman
International Hazard
*****




Posts: 3692
Registered: 8-2-2015
Location: 3rd rock from the sun
Member Is Offline


[*] posted on 10-3-2024 at 11:22


A longer focal length lens will project a larger image.

All lenses introduce multiple non-ideal behaviours,
A big one is chromatic abberation (eg can focus blue or red but not both)
and each type has a usable transmission spectrum.
'good' lenses aren't cheap.




CAUTION : Hobby Chemist, not Professional or even Amateur
View user's profile View All Posts By User
Ubya
International Hazard
*****




Posts: 1247
Registered: 23-11-2017
Location: Rome-Italy
Member Is Offline

Mood: I'm a maddo scientisto!!!

[*] posted on 10-3-2024 at 13:44


Quote: Originally posted by aa1881  
So I've been messing around with distances and angles, and although it can get sharper or fuzzier when looking at monochromatic light, the apparant length of the spectrum across the sensor always seems to be about 300 pixels for a white ligth source, and I'd like to use the entire 1280 horizontal pixels.
Here is a video to illustrate what I mean, notice the horizontal length of the spectrum not changing despite moving all variables:

https://youtu.be/sPG8lB17gxE

I also think this camera can't get me the resolution I desire, ideally about 1 nm of separation. Does anyone have any recommendations for sensors and or lenses to get me to that kind of resolution? Does anyone know how to make the desired range of the spectrum fit across the entire sensor? Does that require lenses?


The width of the spectrum you see doesn't change if you vary the distance of the camera or the light source from the diffraction grating, it only depends on the grating itself.

https://ibsen.com/resources/calculators/grating-order-calcul...

you can play with this tool to see the angles of the various wavelengths (so that you can capture only what you want, and check if any higher diffraction orders are mixing with your order of interest).

if you want to fill the camera field with the spectrum, you need the appropriate lense to do that.

let's make an example with the tool I linked above.
1000 lines/mm diffraction grating
45° angle of incidence so that the webcam isn't looking directly at the source light (0 order) flooding thesensor with light.
360nm 1° Diffraction Order 20.3°
1000nm 1° Diffraction Order -17°

The delta is 37.3°, so I think you'd need a lense with a 46° field of view to fill most of the image with your spectrum.

(I haven't checked the numbers thoroughly so please make your own calculations!)





---------------------------------------------------------------------
feel free to correct my grammar, or any mistakes i make
---------------------------------------------------------------------
View user's profile View All Posts By User
Sulaiman
International Hazard
*****




Posts: 3692
Registered: 8-2-2015
Location: 3rd rock from the sun
Member Is Offline


[*] posted on 11-3-2024 at 00:05


Quote: Originally posted by Ubya  
... this is the janky spectrophotometer I've been playing with for 4 years, nothing fancy
Janky or not, it's served you well. Nice!

How much learning is required to make use of the spectra?
And where do you get reference spectra from?
And is there any free or cheap easy to use software to do the analysis?




CAUTION : Hobby Chemist, not Professional or even Amateur
View user's profile View All Posts By User
aa1881
Harmless
*




Posts: 14
Registered: 13-10-2021
Member Is Offline


[*] posted on 11-3-2024 at 00:40


The software I showed in the first image is Theremino Spectrometer. It's free and user-friendly, and comes with a manual with common reference spectra. You can calibrate it with a CFL bulb or with custom spectral lines like a neon bulb.
View user's profile View All Posts By User
Ubya
International Hazard
*****




Posts: 1247
Registered: 23-11-2017
Location: Rome-Italy
Member Is Offline

Mood: I'm a maddo scientisto!!!

[*] posted on 11-3-2024 at 04:31


Quote: Originally posted by Sulaiman  
Quote: Originally posted by Ubya  
... this is the janky spectrophotometer I've been playing with for 4 years, nothing fancy
Janky or not, it's served you well. Nice!

How much learning is required to make use of the spectra?
And where do you get reference spectra from?
And is there any free or cheap easy to use software to do the analysis?


UV-VIS spectra are the ones I know the least xD

I ugually just compare existing specctras I find on the web. I'm not too picky about the source for these references since my spectra aren't at all accurate, more like ball parks.


This is an example of how I used my spectrophotometer. I extracted some beta catorene, or so i thought, so I checked the spectra to get confirmation.

as aa1881 said, we are using Theremino Spectrometer (https://www.theremino.com/en/downloads/automation), it's designed for this kind of webcam based spectrophotometer.

On and off (you can see how active I've been on this forum lately...) i'm researching to build an open source spectrophotometer based on a linear CCD. There are already progects like this on the web, but i want to give my spin to it. I need something like this anyway lol, might as well share what I do

beta carotene extract.jpg - 104kB





---------------------------------------------------------------------
feel free to correct my grammar, or any mistakes i make
---------------------------------------------------------------------
View user's profile View All Posts By User
Twospoons
International Hazard
*****




Posts: 1324
Registered: 26-7-2004
Location: Middle Earth
Member Is Offline

Mood: A trace of hope...

[*] posted on 11-3-2024 at 15:57


Quote: Originally posted by Sulaiman  

A big one is chromatic abberation (eg can focus blue or red but not both)
and each type has a usable transmission spectrum.


This is really quite an important point to note if you want to cover a wide spectrum from near IR to near UV. Chromatic correction is always something of a compromise, and the wider the spectral coverage the worse the compromise will be. Unless you want a very complex and expensive lens set.

This is where a first-surface parabolic mirror might be a better option as a focusing optic. Still looking at a fair bit of coin for a good one, but no spherical or chromatic aberrations, and wide wavelength coverage.

[Edited on 12-3-2024 by Twospoons]




Helicopter: "helico" -> spiral, "pter" -> with wings
View user's profile View All Posts By User
aa1881
Harmless
*




Posts: 14
Registered: 13-10-2021
Member Is Offline


[*] posted on 13-3-2024 at 20:03


I've ordered a 1080p camera with an adhustable lens and without an IR-filter, like most seem to have. It'll get here in a weem or two, when I hope I can continue experimenting with my setup.
View user's profile View All Posts By User
Sulaiman
International Hazard
*****




Posts: 3692
Registered: 8-2-2015
Location: 3rd rock from the sun
Member Is Offline


[*] posted on 14-3-2024 at 06:42
Just popped into my head


Chromatic abberation may be significantly compensated for
using a simple lens
if the lens and sensor are NOT parallel.
(blue-end of sensor nearer to the lens than the red-end)

This will introduce some coma, so there is probably a little trade-off.

PS this would not work well with 'achromatic' lenses.
and as above, a first-surface parabolic mirror would be better.

[Edited on 14-3-2024 by Sulaiman]




CAUTION : Hobby Chemist, not Professional or even Amateur
View user's profile View All Posts By User
aa1881
Harmless
*




Posts: 14
Registered: 13-10-2021
Member Is Offline


[*] posted on 21-3-2024 at 06:11


The camera has arrived today. I hope to experiment some more this weekend. I'll post an update on here for anyone who might be building something similar in the future.
View user's profile View All Posts By User
Sulaiman
International Hazard
*****




Posts: 3692
Registered: 8-2-2015
Location: 3rd rock from the sun
Member Is Offline


[*] posted on 21-3-2024 at 07:30


One more thought... Diffraction grating quality.

One of the features of the grating that I bought is
"precision ruled grating" on a PET film.
There are better but more costly options.




CAUTION : Hobby Chemist, not Professional or even Amateur
View user's profile View All Posts By User
aa1881
Harmless
*




Posts: 14
Registered: 13-10-2021
Member Is Offline


[*] posted on 22-3-2024 at 11:46


I've made a first prototype but it doesn't look promosing. Attatched is an image of my current setup.
This is my current camera:
https://vi.aliexpress.com/item/1005006594287109.html?spm=a2g...

The grating is 1000 lines/mm

I am a bit at wits end here. In short, how can I get to an image I can make with this (see attached) to something more like this example (other attachment)?
I'll experiment with a broken CD in the meantime, since that's what I see a lot of other people using, but I don't think it should matter that much.

20240322_203810.jpg - 2.6MB0.jpg - 545kBCapture.PNG - 418kB
View user's profile View All Posts By User
Stokes
Harmless
*




Posts: 7
Registered: 6-11-2023
Member Is Offline


[*] posted on 22-3-2024 at 12:08


You might try seeing whether it improves the resolution to move the light input further away from the slit. Just to test, I would place the setup in a dark room, clamp the fibre-optic cable in line with the input window at about two or three times the current distance from the slit, and see whether that improves the resolution. At a greater distance, the incoming light should be more collimated and diffuse less.
View user's profile View All Posts By User
aa1881
Harmless
*




Posts: 14
Registered: 13-10-2021
Member Is Offline


[*] posted on 22-3-2024 at 12:18


Thanks Stokes, that makes a lot of sense, I'll give it a go right away.
View user's profile View All Posts By User
aa1881
Harmless
*




Posts: 14
Registered: 13-10-2021
Member Is Offline


[*] posted on 22-3-2024 at 12:30


Adjusting the distance of the light source doesn't seem to change collimation that much, mostly just the brightness, so I don't think lack of collimation is my current Issue
View user's profile View All Posts By User
Twospoons
International Hazard
*****




Posts: 1324
Registered: 26-7-2004
Location: Middle Earth
Member Is Offline

Mood: A trace of hope...

[*] posted on 22-3-2024 at 13:03


What sort of image do you get with a monochromatic source, like a small diode laser?



Helicopter: "helico" -> spiral, "pter" -> with wings
View user's profile View All Posts By User
 Pages:  1  

  Go To Top