Sciencemadness Discussion Board » Special topics » Technochemistry » webcam near UV-VIS-NIR spectrophotometer(proof of concept) Select A Forum Fundamentals   » Chemistry in General   » Organic Chemistry   » Reagents and Apparatus Acquisition   » Beginnings   » Responsible Practices   » Miscellaneous   » The Wiki Special topics   » Technochemistry   » Energetic Materials   » Biochemistry   » Radiochemistry   » Computational Models and Techniques   » Prepublication Non-chemistry   » Forum Matters   » Legal and Societal Issues   » Detritus   » Test Forum

Pages:  1  2
Author: Subject: webcam near UV-VIS-NIR spectrophotometer(proof of concept)
Sulaiman
International Hazard

Posts: 2958
Registered: 8-2-2015
Location: UK ... on extended Holiday in Malaysia
Member Is Offline

 Quote: Originally posted by Twospoons Worth reading: https://journals.sagepub.com/doi/full/10.1177/00037028177204...

______________________________________________________________
Folowing Twospoons coment above, it seems that a diffraction grating is only really useful over one octave of wavelengths

A simple version of the diffraction equation is sin( Θ ) = m.λ/d

sin(angle of diffraction) = m.(wavelength)/(distance between lines)
m = mode = 0,1,2,3.. etc.

so for example, (mode 1 900nm) will be at the same angle as (mode 2 450nm) also (mode 3 300nm) etc..

CAUTION : Hobby Chemist, not Professional or even Amateur
Ubya
International Hazard

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

Quote: Originally posted by Sulaiman
 Quote: Originally posted by Twospoons Worth reading: https://journals.sagepub.com/doi/full/10.1177/00037028177204...

______________________________________________________________
Folowing Twospoons coment above, it seems that a diffraction grating is only really useful over one octave of wavelengths

A simple version of the diffraction equation is sin( Θ ) = m.λ/d

sin(angle of diffraction) = m.(wavelength)/(distance between lines)
m = mode = 0,1,2,3.. etc.

so for example, (mode 1 900nm) will be at the same angle as (mode 2 450nm) also (mode 3 300nm) etc..

Yea overlapping patterns are a common problem, real spectrophotometers have filters after the diffraction grating, so if you want to see 900nm in the first diffraction order, you put a filter that lets pass only light over 800nm for example, this way you block the other orders. Or better they use spacial diffraction gratings that have triangular grooves(blazed grating). But this is relevant only for precise measurings, the second order of diffraction has pretty weak intensity, before using the DVD I tried to just tilt the webcam and use the second order to get a bigger resolving angle between the lines, but I could barely see any distinguishable peaks over the background noise. So yea if we build a real spectrophotometer of course we need more things, it's not a coincidence their high price.

[Edited on 6-11-2019 by Ubya]

---------------------------------------------------------------------
feel free to correct my grammar, or any mistakes i make

If you are looking for chemicals check this out: [For Sale]300 chemicals (rare & unusual)
---------------------------------------------------------------------
Sulaiman
International Hazard

Posts: 2958
Registered: 8-2-2015
Location: UK ... on extended Holiday in Malaysia
Member Is Offline

before I get too involved in yet another significant project i'd like some advice;

IF I made a spectrophotometer for visible light (e.g. 380nm to 760 nm),
with 1nm resolution and 30dB to 40dB SNR,
would it be useful for my general chemistry hobby ?

e.g. could such an instrument analyse the products of sugar:yeast fermentation ?
EDIT:________________________________________________________________
D'oh ! ... the answers are obvious (after a little more googling)
only chemicals/pigments/dyes that can be seen by eye are going to be 'seen' by a VIS spectroscope,
so the most I could do is Beer–Lambert law type concentration measurements ... boring.
It seems that parts of the UV spectrum have some use in chemical spectroscopy,
but all of the interesting stuff is in th IR (micrometers) range

[Edited on 8-11-2019 by Sulaiman]

CAUTION : Hobby Chemist, not Professional or even Amateur
Twospoons
International Hazard

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

Mood: Despair

I see what you mean. So the answer there is a monochromator using a ZnSe prism for dispersion, and hacking the sensor out of a PIR ( they work out to 10um or more)

Helicopter: "helico" -> spiral, "pter" -> with wings
Sulaiman
International Hazard

Posts: 2958
Registered: 8-2-2015
Location: UK ... on extended Holiday in Malaysia
Member Is Offline

I have more than enough ongoing major projects,
so I'll give diy spectrometry a miss.
I'll probably just use the grating for amusement,
and possibly for a little astronomy.

At least I now see why a couple of members were stimulated by the Raman spectrometer thread.

CAUTION : Hobby Chemist, not Professional or even Amateur
phlogiston
International Hazard

Posts: 1325
Registered: 26-4-2008
Location: Neon Thorium Erbium Lanthanum Neodymium Sulphur
Member Is Offline

Mood: pyrophoric

Another application may be atomic emission spectroscopy. Spray a sample into a flame, or excite it in some other way (eg. sparking between metals, low pressure gas with high voltage)

It would be interesting to see to what extent you can do elemental analysis with a simple setup like this.

Being able to do qualitative analysis (is element X present or not?) would be pretty useful.

-----
"If a rocket goes up, who cares where it comes down, that's not my concern said Wernher von Braun" - Tom Lehrer
Tdep
National Hazard

Posts: 487
Registered: 31-1-2013
Location: Fixed Lasers
Member Is Offline

Mood: *laser noises*

Ok I've been convinced that this is cool. I'v invested $12 total to get a webcam and a 1000 line diffraction grating, and we'll see what happens when they arrive wg48temp9 International Hazard Posts: 557 Registered: 30-12-2018 Member Is Offline I think to do any analysis the system needs to be developed to the point that lines are visible. From a brief play with the software it does not have any calibration function and the zero level is not zero. I suspect that's due to the image not being black clamped meaning black (zero signal) is not at a specific level. i am wg48 but not on my usual pc hence the temp handle. Thank goodness for Fleming and the fungi. Old codger' lives matters, wear a mask and help save them. Ubya International Hazard Posts: 1151 Registered: 23-11-2017 Location: Rome-Italy Member Is Offline Mood: I'm a maddo scientisto!!!  Quote: Originally posted by wg48temp9 I think to do any analysis the system needs to be developed to the point that lines are visible. From a brief play with the software it does not have any calibration function and the zero level is not zero. I suspect that's due to the image not being black clamped meaning black (zero signal) is not at a specific level. Yeah the intensity scale it's not fixed, it varies with the maximum peak, even pure darkness won't show a flat line as the sensor noise will just be amplified in the scale. --------------------------------------------------------------------- feel free to correct my grammar, or any mistakes i make If you are looking for chemicals check this out: [For Sale]300 chemicals (rare & unusual) --------------------------------------------------------------------- wg48temp9 International Hazard Posts: 557 Registered: 30-12-2018 Member Is Offline  Quote: Originally posted by Ubya Yeah the intensity scale it's not fixed, it varies with the maximum peak, even pure darkness won't show a flat line as the sensor noise will just be amplified in the scale. Yes exposure/integration time, video gain and color balance need to be fixed on the webcam and not set to auto but not all webcams have the option to switch off the auto control of them. The software apparently integrates many frames from the webcam and may have its own auto functions for some reason.. Assuming the auto functions can be turned off, a black area could be added to one end of the spectrum so the software could then adjust the offset of the whole image so that that area is zero in the spectrum. I do not recall if the software is open source or not. But if we were going to that much trouble it would probably be best to use a camera board for a arduino to replace the webcam. In a thread about GC, free software was mentioned but I don't recall name. and can not find the thread. That software may be a more sophisticated alternative. Found it. Its called Openchrom see https://lablicate.com/platform/openchrom [Edited on 11/14/2019 by wg48temp9] i am wg48 but not on my usual pc hence the temp handle. Thank goodness for Fleming and the fungi. Old codger' lives matters, wear a mask and help save them. Sulaiman International Hazard Posts: 2958 Registered: 8-2-2015 Location: UK ... on extended Holiday in Malaysia Member Is Offline From what i read it looks like that software is for analysing various file formats, not for live camera interface/control, display and interpretation. CAUTION : Hobby Chemist, not Professional or even Amateur Ubya International Hazard Posts: 1151 Registered: 23-11-2017 Location: Rome-Italy Member Is Offline Mood: I'm a maddo scientisto!!!  Quote: Originally posted by Sulaiman From what i read it looks like that software is for analysing various file formats, not for live camera interface/control, display and interpretation. the theremino software should be able to export the spectrum data (not just the image as the few i posted here), but i don't know if the formats are compatible --------------------------------------------------------------------- feel free to correct my grammar, or any mistakes i make If you are looking for chemicals check this out: [For Sale]300 chemicals (rare & unusual) --------------------------------------------------------------------- wg48temp9 International Hazard Posts: 557 Registered: 30-12-2018 Member Is Offline  Quote: Originally posted by Sulaiman From what i read it looks like that software is for analysing various file formats, not for live camera interface/control, display and interpretation. Yes that's correct. It takes a series of values stored in a file and processes it and can then display as various types of spectrums (graphs), compare to references, perform calibrations and area under peaks and much more. I should add I down loaded the software from the link I gave. Its huge almost 1/2 Gbyte but I could not get it to install due to problems with the length of paths of some files (maybe a problems on this PC) and problems with my java. On a previous PC I was able to load a version of the software and was able play with it. If I remember correctly there are plugins that are available that allows it to be used in real time but I doubt there is one for a webcam. Apparently there are also other open source versions of this type of software that appeared to be free but I have not confirm that because I haven't used them. i am wg48 but not on my usual pc hence the temp handle. Thank goodness for Fleming and the fungi. Old codger' lives matters, wear a mask and help save them. Ubya International Hazard Posts: 1151 Registered: 23-11-2017 Location: Rome-Italy Member Is Offline Mood: I'm a maddo scientisto!!! from this spectrum i noticed that the near IR lines were much more resolved vs the lines on the left. at first i thought it was a lens problem, but then i tried to rotate the webcam so i would have the lines shifted on the right side of the sensor/grating. i guessed right. apparently the dvd diffraction grating is not uniform, the resolution is better on the right of the viewing field. now i can get a bit better resolution but i can't get a full spectrum. another thing i did i tried to measure the transmittance spectrum of a dilute copper acetate solution i used an incandescent tube as a light source, i can't recognize any specific lines, just a general absorbtion in the red/near infrared spectrum --------------------------------------------------------------------- feel free to correct my grammar, or any mistakes i make If you are looking for chemicals check this out: [For Sale]300 chemicals (rare & unusual) --------------------------------------------------------------------- G-Coupled National Hazard Posts: 287 Registered: 9-3-2017 Member Is Offline Mood: Slightly triturated Really interesting stuff - wouldn't different CD/DVDs have different grating patterns on them? Have you tried using different discs? Maybe burning a CD/DVD with a particular bit pattern on it (0,1,0,1 etc.) provide a more predictable, structured pattern? Ubya International Hazard Posts: 1151 Registered: 23-11-2017 Location: Rome-Italy Member Is Offline Mood: I'm a maddo scientisto!!!  Quote: Originally posted by G-Coupled Really interesting stuff - wouldn't different CD/DVDs have different grating patterns on them? Have you tried using different discs? Maybe burning a CD/DVD with a particular bit pattern on it (0,1,0,1 etc.) provide a more predictable, structured pattern? honestly i didn't try that, i used virgin DVDs and CDs. IMO they are good only if you don't have other options, if you need to find and burn a particular bit pattern you are better just buying a diffraction grating on ebay, even the plastic cheap ones are better than the better tweaked diffraction gratings made from DVDs or CDs. diffraction gratings from discs have an intrinsic curvature, i always used the outer edge of the disc where the radius is biggest, but still, you could see the curved spectral lines. for christmas my girlfriend gave me a diffraction grating as a gift (10x30cm PET diffraction grating 1000 lines/mm for like$6.90), and i used right now less than 1x1cm, but the results are clearly visible.

on the left my best cold CFL spectrum using a dvd grating, on the right the first spectrum made with my new grating. as you can see the lines are much thinner, and some bands are more resolved

---------------------------------------------------------------------
feel free to correct my grammar, or any mistakes i make

If you are looking for chemicals check this out: [For Sale]300 chemicals (rare & unusual)
---------------------------------------------------------------------
Twospoons
International Hazard

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

Mood: Despair

You getting a diffraction grating for christmas reminds me of my poor mum going to radioshack with my list in hand when I was a kid. If not for the helpful sales people she would have been completely lost.

Its an interesting comparison though, between the DVD and the grating.
The grating is clearly better, but the DVD isn't actually that bad really.

Helicopter: "helico" -> spiral, "pter" -> with wings
Ubya
International Hazard

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

 Quote: Originally posted by Twospoons You getting a diffraction grating for christmas reminds me of my poor mum going to radioshack with my list in hand when I was a kid. If not for the helpful sales people she would have been completely lost. Its an interesting comparison though, between the DVD and the grating. The grating is clearly better, but the DVD isn't actually that bad really.

it's been years since i got a "normal" gift . for my graduation my collegues gave me a 60cm chromatography column, i still need to try it.

anyway, yea the dvd is not bad, but it bugged me a lot that the resolution would change so much going to the outer edge of the disk, you can still work with it though, you just need to cut your spectrum in multiple pieces and register each piece at the outer most edge of the grating (remembering to calibrate each time), it can be done, but honestly i prefer to spend \$7 and have pretty much a life supply of diffraction gratings (for this spectrophotometer at least).

---------------------------------------------------------------------
feel free to correct my grammar, or any mistakes i make

If you are looking for chemicals check this out: [For Sale]300 chemicals (rare & unusual)
---------------------------------------------------------------------
Pages:  1  2

 Sciencemadness Discussion Board » Special topics » Technochemistry » webcam near UV-VIS-NIR spectrophotometer(proof of concept) Select A Forum Fundamentals   » Chemistry in General   » Organic Chemistry   » Reagents and Apparatus Acquisition   » Beginnings   » Responsible Practices   » Miscellaneous   » The Wiki Special topics   » Technochemistry   » Energetic Materials   » Biochemistry   » Radiochemistry   » Computational Models and Techniques   » Prepublication Non-chemistry   » Forum Matters   » Legal and Societal Issues   » Detritus   » Test Forum