{"id":1065,"date":"2013-02-06T22:56:26","date_gmt":"2013-02-06T20:56:26","guid":{"rendered":"http:\/\/saisa.eu\/blogs\/Guidance\/?p=1065"},"modified":"2013-02-13T19:30:45","modified_gmt":"2013-02-13T17:30:45","slug":"diy-spectrometer","status":"publish","type":"post","link":"https:\/\/saisa.eu\/blogs\/Guidance\/?p=1065","title":{"rendered":"DIY Spectrometer, and notes on online Spectral Workbench"},"content":{"rendered":"<p>There exist several variations of DIY spectrometer by using CD or DVD as the main component (ie. generating the rainbow of colors by diffraction from the optical disk grooves). The output is a spectra, light intensity versus wavelength.<\/p>\n<p>In Wikipedia:<\/p>\n<blockquote>\n<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/Diffraction\">Diffraction<\/a> refers to various phenomena which occur when a wave encounters an obstacle. The most striking examples of diffraction are those involving light; for example, the closely spaced tracks on a CD or DVD act as a diffraction grating to form the familiar rainbow pattern seen when looking at a disk.<\/p>\n<p>In optics, a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Diffraction_grating\">diffraction grating<\/a> is an optical component with a periodic structure, which splits and diffracts light into several beams travelling in different directions. The directions of these beams depend on the spacing of the grating and the wavelength of the light so that the grating acts as the dispersive element.<\/p>\n<p>A <a href=\"http:\/\/en.wikipedia.org\/wiki\/Spectrometer\">spectrometer<\/a> is an instrument used to measure properties of light over a specific portion of the electromagnetic spectrum, typically used in spectroscopic analysis to identify materials. A spectrometer is used in spectroscopy for producing spectral lines and measuring their wavelengths and intensities.<\/p>\n<\/p>\n<\/blockquote>\n<p><strong>Portable version<\/strong><\/p>\n<p>The portable version is for visual detection. The vertical entrance slit is on the right, and the DVD&#8217;s optical layer is on the left at 45 degree angle towards the incoming light. The optical layer is obtained by separating the reflecting layer from optical layer by using knife. (Place and press the knife firmly to the border of the layers, and do it 2-4 times and the layers will separate themselves. But watch out the knife). Allternatively one can first cut the DVD with scissors, and then the separation is easier. In this model, I used the full DVD in order to avoid sharp edges.<br \/>\n<img loading=\"lazy\" alt=\"spectrometer1\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/spectrometer1-1.png\" width=\"550\" height=\"185\" \/><br \/>\n<img loading=\"lazy\" alt=\"spectrometer3\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/spectrometer3-1.png\" width=\"275\" height=\"206\" \/><\/p>\n<p>The viewpoint is from behind about at the right angle to DVD. From right to left: First the slit is visible on the right (bright light), then the camera and hand picture are reflected from the DVD, and then the spectra (rainbow) is visible on the left.<br \/>\n<img loading=\"lazy\" alt=\"spectrometer2\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/spectrometer2-1.png\" width=\"550\" height=\"412\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>An <a href=\"http:\/\/spectralworkbench.org\/analyze\/spectrum\/3591\">example spectra of CFL<\/a> is taken with this setup, is shown below. The photo is taken by placing camera very close to DVD. The top part shows the photo, and down part is the spectra produced by online tool <a href=\"http:\/\/spectralworkbench.org\">Spectral Workbench<\/a>. (I know, the calibration is not correct, on the <a href=\"http:\/\/publiclaboratory.org\/wiki\/spectral-workbench-calibration\">online calibration<\/a> it is using 2 points. Sorry about that. See down for calibration chapter).<br \/>\n<a href=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/portable-spectra-1.png\"><img loading=\"lazy\" alt=\"portable-spectra\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/portable-spectra-1-small.png\" width=\"550\" height=\"128\" \/><\/a><\/p>\n<p><strong>Webcam version<\/strong><\/p>\n<p>The webcam version is the same system, but now with webcam &#8220;permanently&#8221; attached to the 45 degree angle tube. The good side is that the results are more compareable to each other, since detector parts stays the same between usage. The negative side is that the quality of the pictures and of the spectra are significantly reduced due to webcam used. (In this &#8220;infrared enabled&#8221; <a title=\"Test, convert normal webcam into night vision webcam (infrared)\" href=\"http:\/\/saisa.eu\/blogs\/Guidance\/?p=981\">webcam<\/a>, after removing external part in order to get the lens as close as possible the DVD, I had problems to focus the picture)<\/p>\n<p><a href=\"http:\/\/spectralworkbench.org\/\">Spectral Workbench<\/a> can be used to create the spectra of the photo. It contains option to calibrate the spectra by using <a title=\"Compact fluorescent lamp\" href=\"http:\/\/en.wikipedia.org\/wiki\/Compact_fluorescent_lamp\">CFL<\/a> as calibration sample. Before processing with online tool, the pictures are cropped (with <a title=\"IrfanView, Tool for viewing and converting pictures and graphics\" href=\"http:\/\/saisa.eu\/blogs\/Guidance\/?p=142\">Irfanview<\/a>) to include only the &#8220;active&#8221; area of the diffracted light. In my case, the spectral stripe is between Y=420-600 pixels.<\/p>\n<p>The spectra from CFL (Ikea) shows that the CFL light actually contains distinct colours, and the spectra is not continuous.<br \/>\n<a href=\"http:\/\/spectralworkbench.org\/analyze\/spectrum\/3669\"><img loading=\"lazy\" alt=\"wb-cfl\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/wb-cfl-1.png\" width=\"550\" height=\"259\" \/><\/a><\/p>\n<p><strong>Spectral Workbench issues<\/strong><\/p>\n<p>Sometimes the online tool does not process the picture properly. I&#8217;m not sure, if the problem is systematic, or the issue is related to unstability.<\/p>\n<p>I had some issues with some pictures, and sometimes the intensity is not calculated? One of those example is the candle light case. The figure below shows the picture taken by webcam. Clearly there is a nice spectra in this photo. The band on the right seems to be an reflection artifact.<\/p>\n<p><img loading=\"lazy\" alt=\"candle\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/candle.png\" width=\"450\" height=\"337\" \/><\/p>\n<p>By using other tools, the &#8220;uncalibrated&#8221; intensity spectra looks like this.<\/p>\n<p><img loading=\"lazy\" alt=\"candlelight-spectra\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/candlelight-spectra.png\" width=\"450\" height=\"222\" \/><\/p>\n<p>Another Workbench problem with <a href=\"http:\/\/spectralworkbench.org\/analyze\/spectrum\/3675\">White LED<\/a> spectra. The online tool has problem with the intensity.<br \/>\n<img loading=\"lazy\" alt=\"whiteLED-spectra-online\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/whiteled-spectra-online.png\" width=\"450\" height=\"191\" \/><\/p>\n<p>The intensity should be much more visible, see below.<br \/>\n<img loading=\"lazy\" alt=\"whiteLED-spectra\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/whiteled-spectra.png\" width=\"450\" height=\"221\" \/><\/p>\n<p><strong>The design<\/strong><\/p>\n<p>I ended up to this design from various reasons. The main one was the simplicity for attaching camera into the system. In many other setups, the camera stays further behind, and since camera lens is small, then narrower angle is collected by the webcam.<\/p>\n<p>The other reason was to use something more solid than cupboard material. (Yes, I did build those first) And with the plumming tube material available in nearby store, this setup provide options for later modifications. Note, the tube parts are not glued to each other, making the pieces interchangeable. For example, and can add or change the entrance slit, or internal reflection slits without using screwdriver.<\/p>\n<p><img loading=\"lazy\" alt=\"design\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/design-1.png\" width=\"500\" height=\"197\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Calibration with LEDs<\/strong><\/p>\n<p>For this type of project, <a href=\"http:\/\/en.wikipedia.org\/wiki\/Light-emitting_diode\">LEDs<\/a> with known peak wavelengths are good alternative for calibration.<br \/>\n<img loading=\"lazy\" alt=\"led-board\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/led-board-1.png\" width=\"550\" height=\"412\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>The LED requires the usage of resistor in the circuit in order to limit the current through the LED. Otherwise the circuit is simple, see figure below.<br \/>\n<img loading=\"lazy\" alt=\"led-resistor\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/led-resistor-1.png\" width=\"550\" height=\"189\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>There are several online &#8220;LED resistor calculator&#8221; tools available, for example <a href=\"http:\/\/www.hebeiltd.com.cn\/?p=zz.led.resistor.calculator\">here<\/a> and <a href=\"http:\/\/led.linear1.org\/1led.wiz\">here<\/a>. The LEDs used here are summarized in the following table. The peak wavelengths, forward voltages and currents are from data sheets (found via google).<br \/>\n<strong><img loading=\"lazy\" alt=\"calibration-LEDS\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/calibration-leds.png\" width=\"399\" height=\"269\" \/><\/strong><\/p>\n<p>For each LED, the peak position in pixels (X axis) is placed in spreadsheet program (<a href=\"http:\/\/www.openoffice.org\/product\/calc.html\">OpenOffice Calc<\/a>), and a line is fitted to the data (feature called &#8220;Trend Line&#8221;), see figure below. (X is pixel position, Y is nanometers)<img loading=\"lazy\" alt=\"Calibration-linefitting\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/calibration-linefitting.png\" width=\"335\" height=\"303\" \/><\/p>\n<p>In the Spectral Workbench, I used blue and amber data for custom calibration. The custom calibration is done by using the special link as shown below (XXXX is the spectrum id)<\/p>\n<p><a href=\"http:\/\/spectralworkbench.org\/spectrums\/calibrate\/XXXX?x1=546&amp;w1=470&amp;x2=854&amp;w2=605\">http:\/\/spectralworkbench.org\/spectrums\/calibrate\/XXXX?x1=546&amp;w1=470&amp;x2=854&amp;w2=605<\/a><\/p>\n<p>(Forblue,x=546,y=470. For amber, x=854, y=605).<\/p>\n<p><strong>Improvement possibilities<\/strong><\/p>\n<p>The main improvement ideas are for the same design (DVD+tube):<\/p>\n<ul>\n<li>\n<div>Minimize reflections from 2 origins; the entrance slit and the DVD entrance hole.<\/div>\n<\/li>\n<li>\n<div>Slits with various widths, or adjustable DIY slit<\/div>\n<ul>\n<li>\n<div>Variable slit could be made from pencil sharpener and mini pipe cutter<br \/>\n<img loading=\"lazy\" alt=\"variable-slit-idea\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/variable-slit-idea.png\" width=\"225\" height=\"168\" \/><\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<div>webcam which can focus better the lines<\/div>\n<\/li>\n<\/ul>\n<p>The CFL spectra with narrow slit was taken. The slit made from pencil sharpener and the result is shown below.<br \/>\n<img loading=\"lazy\" alt=\"narror-slit\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/narror-slit.png\" width=\"225\" height=\"168\" \/><br \/>\n<a title=\"CFL with narrow slit\" href=\"http:\/\/spectralworkbench.org\/analyze\/spectrum\/3694\"><br \/>\n<img loading=\"lazy\" alt=\"cfl-narrow-slit-spectra\" src=\"http:\/\/saisa.eu\/blogs\/Guidance\/wp-content\/uploads\/2013\/02\/cfl-narrow-slit-spectra.png\" width=\"450\" height=\"188\" \/><\/a><\/p>\n<p>It seems that the focus problem with the webcam is the limiting factor for the resolution. (Note, that this spectra is different from the earlier CFL spectra. This lamp was cold, while the first one was warm)<\/p>\n<p><strong>Enhanced DIY Versions<\/strong><\/p>\n<p>Some requirements:<\/p>\n<ul>\n<li>\n<div>solid structure (instrumental box with removeable cover)<\/div>\n<\/li>\n<li>\n<div>good quality diffraction grating<\/div>\n<\/li>\n<li>\n<div>variable slit for resolution vs intensity control<\/div>\n<\/li>\n<li>\n<div>efficient photo data collection<\/div>\n<ul>\n<li>\n<div>single photo for data collection is not enough<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<div>Calibration with lasers<\/div>\n<\/li>\n<li>\n<div>Calibration of system overall sensitivity over wavelength<\/div>\n<\/li>\n<\/ul>\n<p><strong>Other DIY examples<\/strong><\/p>\n<p>The idea to this DIY came from the following DIY examples:<\/p>\n<ul>\n<li>\n<div><a href=\"http:\/\/sci-toys.com\/scitoys\/scitoys\/light\/cd_spectroscope\/spectroscope.html\">Building a simple spectroscope<\/a><\/div>\n<ul>\n<li>\n<div>Reflection from CD\/DVD<\/div>\n<\/li>\n<li>\n<div>Using cardboard box<\/div>\n<\/li>\n<li>\n<div>razor blades as slit<\/div>\n<\/li>\n<li>\n<div>using leds for calibration<\/div>\n<\/li>\n<li>\n<div>higher resolution with holographic diffraction gratings<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<div><a href=\"http:\/\/sci-toys.com\/scitoys\/scitoys\/light\/spectrograph\/spectrograph.html\">A high resolution spectrograph<\/a><\/div>\n<ul>\n<li>\n<div>Transmission through holographic diffraction grating<\/div>\n<\/li>\n<li>\n<div>Using plastic tube<\/div>\n<\/li>\n<li>\n<div>slit in rubber cap<\/div>\n<\/li>\n<li>\n<div>digital camera<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<div><a href=\"http:\/\/publiclaboratory.org\/tool\/spectrometer\">spectrometer<\/a><\/div>\n<ul>\n<li>\n<div>Transmission through DVD optical layer<\/div>\n<\/li>\n<li>\n<div><a href=\"http:\/\/publiclaboratory.org\/wiki\/dsk\">webcam<\/a> and <a href=\"http:\/\/publiclaboratory.org\/wiki\/foldable-spec\">smartphone<\/a> versions<\/div>\n<\/li>\n<li>\n<div>with open source spectrometry software<\/div>\n<ul>\n<li>\n<div>use <a href=\"http:\/\/spectralworkbench.org\/\">online<\/a> server version<\/div>\n<\/li>\n<li>\n<div><a href=\"http:\/\/publiclaboratory.org\/wiki\/spectral-workbench-offline\">offline<\/a> version is not working (well, I did not get it to work)<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<div><a href=\"http:\/\/www.inpharmix.com\/jps\/CD_spectro.html\">Jim&#8217;s Homemade Spectrometers<\/a><\/div>\n<ul>\n<li>\n<div>Transmission through CD\/DVD optical layer<\/div>\n<\/li>\n<li>\n<div>using plastic tube<\/div>\n<ul>\n<li>\n<div>contruction examples<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<div>explaining diffraction mathematics<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<div><a href=\"http:\/\/www.cs.cmu.edu\/~zhuxj\/astro\/html\/spectrometer.html\">A CD spectrometer<\/a><\/div>\n<ul>\n<li>\n<div>Spectra examples from various every day sources, nice!<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Links<\/strong><\/p>\n<ul>\n<li>\n<div><a href=\"http:\/\/astro.u-strasbg.fr\/~koppen\/spectro\/designe.html\">How to design a spectroscope<\/a><\/div>\n<\/li>\n<li>\n<div><a href=\"http:\/\/astro.u-strasbg.fr\/~koppen\/spectro\/mk4e.html\">Mk IV: Transmission gratings from CDs<\/a><\/div>\n<\/li>\n<li>\n<div><a href=\"http:\/\/astro.u-strasbg.fr\/~koppen\/spectro\/detailse.html\">The CD ROM Spectroscope<\/a><\/div>\n<ul>\n<li>\n<div>variable slit<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<div><a href=\"http:\/\/astro.u-strasbg.fr\/~koppen\/spectro\/photoe.html\">How to photograph the spectra<\/a><\/div>\n<ul>\n<li>\n<div>showing spectra details<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>There exist several variations of DIY spectrometer by using CD or DVD as the main component (ie. generating the rainbow of colors by diffraction from the optical disk grooves). The output is a spectra, light intensity versus wavelength. In Wikipedia: &hellip; <a href=\"https:\/\/saisa.eu\/blogs\/Guidance\/?p=1065\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,17,68,74,67,34,51],"tags":[],"_links":{"self":[{"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=\/wp\/v2\/posts\/1065"}],"collection":[{"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1065"}],"version-history":[{"count":4,"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=\/wp\/v2\/posts\/1065\/revisions"}],"predecessor-version":[{"id":1081,"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=\/wp\/v2\/posts\/1065\/revisions\/1081"}],"wp:attachment":[{"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/saisa.eu\/blogs\/Guidance\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}