Pages:
1
2 |
Ubya
International Hazard
Posts: 1247
Registered: 23-11-2017
Location: Rome-Italy
Member Is Offline
Mood: I'm a maddo scientisto!!!
|
|
webcam near UV-VIS-NIR spectrophotometer(proof of concept)
being able to identify what compound we have is particularly hard for amateurs chemists, we can usually try melting/boiling points, using test
reagents, someone even has an HPLC, a spectrophotometer could be useful in the lab, for qualitative or quantitative identifications.
i had in mind to build a spectrophotometer even before taking my spectroscopy class at uni, but after learning more about it in class i really felt an
urge to build something.
this is just a proof of concept, a design pretty well explored on the internet, i did it just to dip my toes in the project and get some positive
results before hitting my head on the harder (and better) version.
this spectrophotometer was build in more or less 15 minutes using scavenged staff around my house, it is not meant to be durable, but could be a
little funny project for anybody interested.
Materials used:
-a webcam
-a CD
-a cardboard box
-2 razor blades
first of all we need a webcam, the one i used is a microsoft lifecam HD-3000. i previously removed the IR filter and added an IR pass filter to make
some pictures in the NIR spectrum, i removed the IR bandpass filter for this project as the visible part of the spectrum is quite important for this
project.
a webcam with a variable focus is recommended, mine has the screw lens glued to the mount, and by removing the IR filter the focus somehow changed,
this influences the spectrum resolution quite a bit.
next important part of the spectrophotometer is the diffraction grating, they are sold on ebay for around $5, 1000 lines/mm is recommended. of course
i didn't buy one (yet) so i improvised with a CD. the distance between the tracks is 1.6 micrometers, equivalent to a 625 lines/mm. i could have just
used a piece of CD has it is, as a reflective diffraction grating, but doing so requires a different setup and a bit more tweeking, so i turned it
into a transmission diffraction grating.
to do so i needed to remove the aluminium layer from the cd and get only the polycarbonate layer, with a knife i scored the aluminium layer, then i
put a piece of scotch tape on the scored line and then i pulled it off, the aluminium layer sticks to the tape and is remived with it leaving the
clean polycarbonate.
next i cut a square piece from the outer edge of the cd, the tracks have a spiral path, and near the outher edge they are straighter because the
radius is bigger (straighter lines give straight diffraction lines).
looking at a light through the clear CD i could clearly see the first and second order of diffraction, in this project i only used the first.
i attached the square piece of CD to the webcam lens being careful of aligning the CD tracks vertically (as my slit), to do so i just used two pieces
of kneaded eraser (being careful to not cover the lens).
i attached the webcam PCB to an aluminium support, but i did this only because i previously broke the casing.
i used a carboard box as the housing, just the box a normal smartphone is sold in. i cut a small square opening with an exacto knife and i covered it
with two razor blades spaced about 0.1mm and secured to the box with tape.
i spray painted the interior of the box in matte black, as to minimize reflections.
next i just attached the webcam at a 30° angle to the slit, checking through the monitor that the slit was not in view and only the first order of
diffraction was visible.
i closed the box and connecter the webcam usb to my laptop.
to transform the picture of a diffraction pattern to a graph i used the free Theremino spectrophotometer software, it is really easy to use.
i registered a few spectra: sunlight, a white LED, a 400nm LED, a tv remote LED, a CFL lightbulb, a candle flame.
the resolution is pretty bad, probably because i'm using a CD as diffraction grating (i touched it barehanded many times, i could have ruined part of
the tracks) and because the webcam is out of focus (the lens is glued to the mount, i will see if i can maybe unstuck it with acetone or just replace
the mount with a 12mm standard one and get a proper lens)
[Edited on 1-11-2019 by Ubya]
---------------------------------------------------------------------
feel free to correct my grammar, or any mistakes i make
---------------------------------------------------------------------
|
|
j_sum1
Administrator
Posts: 6293
Registered: 4-10-2014
Location: Unmoved
Member Is Offline
Mood: Organised
|
|
That is extremely cool. This puts vis/uv spectroscopy within reach of pretty much everyone.
I'd love further details of your image processing and software used.
|
|
Twospoons
International Hazard
Posts: 1321
Registered: 26-7-2004
Location: Middle Earth
Member Is Offline
Mood: A trace of hope...
|
|
The resolution in the IR seems particularly bad - I would expect an IR LED in a TV remote to be much narrower. Its quite possible the lens is failing
to focus properly in that region, as it will have been optimised for visible light. You might get better results with a pinhole, though you would need
a longer exposure. The other thing working against you in the IR is penetration depth in the silicon sensor increases with wavelength, resulting in
blur from pixel to pixel. This is because as the free carriers created by the photons can drift sideways and end up in the wrong place.
Good effort though.
See if you can find a cheap and nasty DPSS green laser - you might be able to see the Nd:YAG line at 1064nm and the pump laser at 808nm. The line
widths should be under a nm, and will give you a better idea of your achievable resolution.
[Edited on 1-11-2019 by Twospoons]
Helicopter: "helico" -> spiral, "pter" -> with wings
|
|
Sulaiman
International Hazard
Posts: 3671
Registered: 8-2-2015
Location: 3rd rock from the sun
Member Is Offline
|
|
Nice introductory project.
Regarding the above post ... would it be better to use a slit rather than a pinhole ?
I'd like to know how to interpret the data,
various bonds and elements, molecular spectra etc.
is there a free library of the spectra of various molecules ?
Better still ... is there any free software that can identify bonds and molecules from the spectrum ?
(preferably with auto-calibration using known spectral sources)
[Edited on 1-11-2019 by Sulaiman]
CAUTION : Hobby Chemist, not Professional or even Amateur
|
|
Ubya
International Hazard
Posts: 1247
Registered: 23-11-2017
Location: Rome-Italy
Member Is Offline
Mood: I'm a maddo scientisto!!!
|
|
@j_sum1 the software is free to use (https://www.theremino.com/wp-content/uploads/files/Theremino...), it reads the live stream from the webcam, you can see in real time the
diffraction pattern from the camera and the interpreted spectrum. calibration of the scale can be done manually or automatically (using the light from
a CFL light bulb) by dragging the 2 peaks to the right value.
it is very easy to use.
@Twospoons, i agree, the resolution is quite bad in my opinion, i already know what's wrong with it, it is a focus problem, but when optimized it
could register really good spectra. an example of someone that used better optics (same cfl light spectrum)
@sulaiman on how to interpret the data, atomic emission is quite easy, there are libraries for the emission lines of each element. for example i
calibrated the scale on two mercury peaks from the mercury emission in the cfl lightbulb.
as to recognize molecular bonds it might be harder. uv-vis spectroscopy is not as good as IR spectroscopy to identify bonds. c-c bonds absorb in the
far UV, in the near UV and Vis part of the spectrum emit/absorb only very conjucated molecules (carotenoids as an example), plus the solvent system
can cause big shifts in frequency and intensity of the peaks, libraries may exist, but i think that it would be quite hard to get any automatic match.
you still need the knowledge to interpret each spectrum
[Edited on 1-11-2019 by Ubya]
---------------------------------------------------------------------
feel free to correct my grammar, or any mistakes i make
---------------------------------------------------------------------
|
|
G-Coupled
Hazard to Others
Posts: 287
Registered: 9-3-2017
Member Is Offline
Mood: Slightly triturated
|
|
That is an awesome project.
Astrophotography has also come on in leaps and bounds the last few years a lot due to cheap webcam technology and the software to take advantage of
it.
|
|
andy1988
Hazard to Others
Posts: 135
Registered: 11-2-2018
Location: NW Americus ([i]in re[/i] Amerigo Vespucci)
Member Is Offline
Mood: No Mood
|
|
Thank you for sharing. I think it would be fun to play with spectra in situations like this.
Here is an article I had bookmarked on the subject, in the comments are links to better articles.
So much fun stuff to try.
At an old workplace we characterized and calibrated UV/VIS/IR sensors as well (very expensive ones), so that the measurements with post-processing
would more closely reflect reality (within defined uncertainties). Not me though, all that was over my head.
|
|
mayko
International Hazard
Posts: 1218
Registered: 17-1-2013
Location: Carrboro, NC
Member Is Offline
Mood: anomalous (Euclid class)
|
|
that........ was me!
I managed to extend that design a little bit, but never got past gluing trash together, and never got a reading that I really, truly believed:
https://web.archive.org/web/20131219000212/http://arkfab.org...
https://web.archive.org/web/20130826091002/http://topologico...
I did get a workable handheld spectroscope from the glue & garbage method though. I have been known to swagger around at night, looking at sodium
& mercury lights.
Right now I'm actually working on a polarimeter, but I really want to get back to this at some point. I'm glad to see people working on this!
[Edited on 2-11-2019 by mayko]
al-khemie is not a terrorist organization
"Chemicals, chemicals... I need chemicals!" - George Hayduke
"Wubbalubba dub-dub!" - Rick Sanchez
|
|
12thealchemist
Hazard to Others
Posts: 181
Registered: 1-1-2014
Location: The Isle of Albion
Member Is Offline
Mood: Rare and Earthy
|
|
I tried a similar sort of project some months ago, but had mixed results. It could be a different webcam that made it so much worse/better
respectively.
The pictures below are some of my results
Left to right: Fluorescent bulb, incandescent bulb, neon or helium/neon discharge bulb
The software will also give you a CSV printout of the spectrum. I had a go at using my setup to analyse solutions of metal salts (CuSO4, KMnO4,
KCr(SO4)2), but couldn't get the spectra to accurately reflect what I was expecting, intensity-wise.
|
|
Ubya
International Hazard
Posts: 1247
Registered: 23-11-2017
Location: Rome-Italy
Member Is Offline
Mood: I'm a maddo scientisto!!!
|
|
Quote: Originally posted by 12thealchemist | I tried a similar sort of project some months ago, but had mixed results. It could be a different webcam that made it so much worse/better
respectively.
The pictures below are some of my results
Left to right: Fluorescent bulb, incandescent bulb, neon or helium/neon discharge bulb
The software will also give you a CSV printout of the spectrum. I had a go at using my setup to analyse solutions of metal salts (CuSO4, KMnO4,
KCr(SO4)2), but couldn't get the spectra to accurately reflect what I was expecting, intensity-wise.
|
did you use a real diffraction grating? or you also used a CD?
---------------------------------------------------------------------
feel free to correct my grammar, or any mistakes i make
---------------------------------------------------------------------
|
|
12thealchemist
Hazard to Others
Posts: 181
Registered: 1-1-2014
Location: The Isle of Albion
Member Is Offline
Mood: Rare and Earthy
|
|
I used a real diffraction grating - 1000 lines/mm
[Edited on 3-11-2019 by 12thealchemist]
|
|
Ubya
International Hazard
Posts: 1247
Registered: 23-11-2017
Location: Rome-Italy
Member Is Offline
Mood: I'm a maddo scientisto!!!
|
|
using CD as a diffraction grating
using a DVD as diffraction grating
i still can't fix the focus problem, but by using a DVD as diffraction grating i can get a wider separation between the lines.
if you look at what the webcamm sees, the lines pretty much fill all the field of view.
the IR lines that were not resolved before, now are resolved.
i still cant resolve the lines between 570nm and 600nm, they are too close to each other even with a DVD (equivalent of 1350 lines/mm)
---------------------------------------------------------------------
feel free to correct my grammar, or any mistakes i make
---------------------------------------------------------------------
|
|
12thealchemist
Hazard to Others
Posts: 181
Registered: 1-1-2014
Location: The Isle of Albion
Member Is Offline
Mood: Rare and Earthy
|
|
I hadn't considered the possibility of using a finer diffraction grating; from your results that could well be worthwhile.
|
|
Ubya
International Hazard
Posts: 1247
Registered: 23-11-2017
Location: Rome-Italy
Member Is Offline
Mood: I'm a maddo scientisto!!!
|
|
finer diffraction grating and better optics to get sharper focus.
i'm thinking about even using a different sensor, like the CCD used in a scanner, as i would have to worry only about 1 pixel in height, and being the
sensor much wider i could use no lenses at all, and just reflect the diffraction pattern on the sensor (right now it's in transmission mode)
---------------------------------------------------------------------
feel free to correct my grammar, or any mistakes i make
---------------------------------------------------------------------
|
|
Twospoons
International Hazard
Posts: 1321
Registered: 26-7-2004
Location: Middle Earth
Member Is Offline
Mood: A trace of hope...
|
|
Hamamatsu have some nice sensors : https://www.hamamatsu.com/jp/en/product/optical-sensors/imag...
Having data on sensitivity vs wavelength could be handy too.
Helicopter: "helico" -> spiral, "pter" -> with wings
|
|
Tdep
National Hazard
Posts: 518
Registered: 31-1-2013
Location: Laser broken since Feb 2020 lol
Member Is Offline
Mood: PhD is done! It isn't good but it's over lol
|
|
How far into the NIR can webcams go? I have a basic webcam at my uni lab that monitors a tuneable laser, and it can see 980 nm but can't see 1000 nm
well.
Is there an ability to push this out any further? I wonder if its possible to cool the sensor to lower the thermal noise, improve sensitivity?
|
|
Twospoons
International Hazard
Posts: 1321
Registered: 26-7-2004
Location: Middle Earth
Member Is Offline
Mood: A trace of hope...
|
|
Cooling the sensor will improve noise (kTC reset noise is a major contributor), but it wont increase the maximum wavelength. Silicon is basically
transparent to wavelengths beyond ~1100nm.
Helicopter: "helico" -> spiral, "pter" -> with wings
|
|
DraconicAcid
International Hazard
Posts: 4313
Registered: 1-2-2013
Location: The tiniest college campus ever....
Member Is Offline
Mood: Semi-victorious.
|
|
This is really cool- would you get better results from a BluRay disc? i think they have more lines than a DVD.....
Please remember: "Filtrate" is not a verb.
Write up your lab reports the way your instructor wants them, not the way your ex-instructor wants them.
|
|
Sulaiman
International Hazard
Posts: 3671
Registered: 8-2-2015
Location: 3rd rock from the sun
Member Is Offline
|
|
I've been googling ....
ccd and cmos camera sensors are sensitive from about 350nm to 1050nm,
so no point aiming for a wider spectrum.
Here is a typical sensor spectral response;
and clearly some form of compensation for sensitivity vs wavelength is required.
If you want to use longer wavelength light then you should use a coarser (less lines/mm) grating,
as diffraction gratings have a cutoff wavelength when 1/2-wavelength >= grating spacing.
e.g. 1200 lines/mm = 833nm/line, so wavelengths of interest should be much less than 1666nm
These three graphs are from Dynasil, they are for 300, 600 and 1200 lines/mm.
(mode 0 is straight through, mode 1 is the first diffracted spectrum, the one that we want)
to get spatial resolution on your sensor just use a greater distance between grating and sensor ?
I want to join in so I've ordered a cheap 600 lines/mm diffraction grating from China
https://www.ebay.com.my/itm/36x38-38x20mm-PET-Nano-Engraving...
P.S. on reflection,my suggestion in my first post above to use a slit instead of a lens makes no sense,
a lens seems necessary, but a lens that has a constant focal length over the required sectrum would be complex and expensive.
The lens seems to be a limiting factor for a simple setup.
Maybe a parabolic mirror from a cheap/used telescope ?
[Edited on 5-11-2019 by Sulaiman]
CAUTION : Hobby Chemist, not Professional or even Amateur
|
|
Ubya
International Hazard
Posts: 1247
Registered: 23-11-2017
Location: Rome-Italy
Member Is Offline
Mood: I'm a maddo scientisto!!!
|
|
" a lens that has a constant focal length over the required sectrum would be complex and expensive."
achromatic lens is the answer, they are not that expensive
---------------------------------------------------------------------
feel free to correct my grammar, or any mistakes i make
---------------------------------------------------------------------
|
|
Sulaiman
International Hazard
Posts: 3671
Registered: 8-2-2015
Location: 3rd rock from the sun
Member Is Offline
|
|
Quote: Originally posted by Ubya | " a lens that has a constant focal length over the required sectrum would be complex and expensive."
achromatic lens is the answer, they are not that expensive |
We would need something like or better than an apochromatic lens.
https://en.wikipedia.org/wiki/Apochromat
Maybe they can be found cheaply ?
.. but for applications that I'm familiar with, photography and astronomy, they are definitely not cheap.
CAUTION : Hobby Chemist, not Professional or even Amateur
|
|
andy1988
Hazard to Others
Posts: 135
Registered: 11-2-2018
Location: NW Americus ([i]in re[/i] Amerigo Vespucci)
Member Is Offline
Mood: No Mood
|
|
Also an issue is transmittance/absorbance of the lens/optics, it varies by wavelength and material. Finding suitable windows with high IR transmittance was tricky, even ran into issues with hydrophilic windows
(crystalline, I don't recall the material) getting irreversibly damaged by water droplets mid calibration, made small cavities in the window surface.
Everyone was devastated and unspeakably upset at the technician responsible... takes a year or more to manufacture such windows (grow them, polish
them, some break in process). If anyone wants to get into that business that would be neat, suppliers are rare.
Neat recent development for IR lenses, hopefully inexpensive!
Quote: Originally posted by Ubya | " a lens that has a constant focal length over the required sectrum would be complex and expensive."
achromatic lens is the answer, they are not that expensive |
I expect issues like that can be worked around via moving the stages/platforms around to match the focal length of whatever wavelength is being
characterized. But I'm not sure what is best really, all this is over my head.
[Edited on 5-11-2019 by andy1988]
|
|
Ubya
International Hazard
Posts: 1247
Registered: 23-11-2017
Location: Rome-Italy
Member Is Offline
Mood: I'm a maddo scientisto!!!
|
|
Quote: Originally posted by andy1988 | Also an issue is transmittance/absorbance of the lens/optics, it varies by wavelength and material. Finding suitable windows with high IR transmittance was tricky, even ran into issues with hydrophilic windows
(crystalline, I don't recall the material) getting irreversibly damaged by water droplets mid calibration, made small cavities in the window surface.
Everyone was devastated and unspeakably upset at the technician responsible... takes a year or more to manufacture such windows (grow them, polish
them, some break in process). If anyone wants to get into that business that would be neat, suppliers are rare.
Neat recent development for IR lenses, hopefully inexpensive!
Quote: Originally posted by Sulaiman | Quote: Originally posted by Ubya | " a lens that has a constant focal length over the required sectrum would be complex and expensive."
achromatic lens is the answer, they are not that expensive |
We would need something like or better than an apochromatic lens.
https://en.wikipedia.org/wiki/Apochromat
Maybe they can be found cheaply ?
.. but for applications that I'm familiar with, photography and astronomy, they are definitely not cheap. |
I expect issues like that can be worked around via moving the stages/platforms around to match the focal length of whatever wavelength thing is being
characterized.
[Edited on 5-11-2019 by andy1988] |
but it shouldn't be a big deal in the near IR, glass is pretty much clear in this region, we are not dealing with medium or far IR, the webcam sensor
wouldn't pick it up anyway
[Edited on 5-11-2019 by Ubya]
---------------------------------------------------------------------
feel free to correct my grammar, or any mistakes i make
---------------------------------------------------------------------
|
|
Twospoons
International Hazard
Posts: 1321
Registered: 26-7-2004
Location: Middle Earth
Member Is Offline
Mood: A trace of hope...
|
|
A first surface mirror would probably be easier and cheaper, simply because building an achromat that's good from UV to NIR is going to be much more
challenging than building one for VIS only - and VIS only isn't exactly cheap.
from what I can find, a prism may be better than a grating for a wideband spectrometer. You get better efficiency and avoid the problem gratings have
with the second order diffraction overlapping the first order diffraction. The penalty is poorer, and non-linear, dispersion.
Worth reading:
https://journals.sagepub.com/doi/full/10.1177/00037028177204...
[Edited on 6-11-2019 by Twospoons]
Helicopter: "helico" -> spiral, "pter" -> with wings
|
|
wg48temp9
National Hazard
Posts: 780
Registered: 30-12-2018
Location: not so United Kingdom
Member Is Offline
|
|
Quote: Originally posted by Sulaiman | ccd and cmos camera sensors are sensitive from about 350nm to 1050nm,
so no point aiming for a wider spectrum.
Here is a typical sensor spectral response;
and clearly some form of compensation for sensitivity vs wavelength is required.
If you want to use longer wavelength light then you should use a coarser (less lines/mm) grating,
as diffraction gratings have a cutoff wavelength when 1/2-wavelength >= grating spacing.
e.g. 1200 lines/mm = 833nm/line, so wavelengths of interest should be much less than 1666nm
These three graphs are from Dynasil, they are for 300, 600 and 1200 lines/mm.
(mode 0 is straight through, mode 1 is the first diffracted spectrum, the one that we want)
to get spatial resolution on your sensor just use a greater distance between grating and sensor ?
I want to join in so I've ordered a cheap 600 lines/mm diffraction grating from China
https://www.ebay.com.my/itm/36x38-38x20mm-PET-Nano-Engraving...
P.S. on reflection,my suggestion in my first post above to use a slit instead of a lens makes no sense,
a lens seems necessary, but a lens that has a constant focal length over the required sectrum would be complex and expensive.
The lens seems to be a limiting factor for a simple setup.
Maybe a parabolic mirror from a cheap/used telescope ?
[Edited on 5-11-2019 by Sulaiman] |
From my understanding of the original set up a lens focuses the spectrum on to the detector. If the diffraction grating is moved further away the
ends of the spectrum will not fall on to the small diameter lens that most cams have. So it will increase the resolution but only over a limite
interval.
It should be possible to correct for the chromatic distortion of a lens by tilting the sensor relative to the lens.
The variable spectral sensitivity of the whole system can be correct for by a reference measurement without a sample or with a white sample.
Some spectroscopes use curved gratings or curved mirrors to focus the spectrum on to the sensor. Old large laser printers and photo copiers have a
variety of optical bits in them, front surface mirrors, large lenses and some have special lens that are wide (~300mm) but narrow actually the middle
slice of a 300mm dia lens. they may be useful. Some have a spinning mirror that could be used to scan the spectrum across a single photodiode.
Incidentally those printers and copiers also have a laser, HT supplies, motors, gears and a selection of shafts, bearings clutches and solenoids.
Search google with "curved grating spectrograph" for configurations
[Edited on 11/6/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.
Be aware of demagoguery, keep your frontal lobes fully engaged.
I don't know who invented mRNA vaccines but they should get a fancy medal and I hope they made a shed load of money from it.
|
|
Pages:
1
2 |