##Basics## SpectralWorkbench.org is a web-based software suite for collecting spectra, using your [Public Lab DIY spectrometer](/tool/spectrometer). Once you have an [assembled spectrometer](/wiki/spectrometer-construction) connected to your computer or smartphone, go to https://spectralworkbench.org and click **Capture**. _To use the full functionality, and especially on iOS, you should first [log in using your PublicLaboratory.org username](https://spectralworkbench.org/login)._ You'll then be able to connect to your spectrometer (desktop or [Opera Mobile](https://play.google.com/store/apps/details?id=com.opera.browser)) or [upload a spectrum](https://spectralworkbench.org/upload). Give it a title, tags, and description. ###Calibration You'll notice that many other spectra on the site have a scale showing "nm" or nanometer units on the horizontal axis. To get scaled data, you must calibrate your spectrometer. There are several kinds of calibration but here we're talking about wavelength calibration, which allows your spectrometer to display a wavelength value for any color of light it sees. Luckily, this is easy. 1) Find a **fluorescent light bulb** -- preferably a compact fluorescent bulb you can put your spectrometer very close to. Point your spectrometer at the bulb -- if it's too bright, point it at a piece of white paper or wall which is brightly illuminated by the bulb. ![pointing at a light bulb](https://farm9.staticflickr.com/8487/8246326905_8051ecc8c4_m.jpg) ![example spectrum](https://spectralworkbench.org/images/example-cfl.jpg) 2) You'll see an image like the above example; if you're on a computer, it may appear horizontally. The lines you see are from mercury in the bulb, and since we know what wavelengths they **should** be, we can use this to calibrate your device. Save this spectrum, and tag it "fluorescent". Now you'll need to use the analysis tool to calibrate; it will walk you through the process. Read more and watch a short intro video here: **[Spectral Workbench calibration](/wiki/spectral-workbench-calibration)** ###Analysis **Once your spectrometer is calibrated, what do you do next?** This is the central question of our open spectrometry community. People are building and using these spectrometers for many reasons and there are different approaches being actively developed. For the time being, try browsing recent [contributed open spectrometry research](/notes/spectrometer), and look over [our growing list of applications and resources](/wiki/spectral-analysis)
We are planning to add details and next steps for: * setting up a light source (a laser, halogen, or UV light) to illuminate your sample * preparing samples of liquids or solids * analysis and interpretation of the data you collect However, exploring exactly how these things work & how to do them is exactly what we hope to better understand by working together. Join now and take these next steps with us! ##Videos Various tutorial videos on using Spectral Workbench. ###Intro A brief intro to [Spectral Workbench](https://spectralworkbench.org)'s new web-based capture interface, including absorption spectroscopy: ###Calibration Learn to calibrate your spectrometer with a compact fluorescent light (CFL). This shows some interfaces which have since been updated and revised, but the basic steps are the same. See [Spectral Workbench Help](/wiki/spectral-workbench-help) if you have trouble. ##Troubleshooting Many things can go wrong (or right) when collecting spectra. Here are a few to look out for: ###Blurriness **DUE TO AN ERROR IN THE PRINTED INSTRUCTIONS**, your webcam may be focused incorrectly. The lens should be twisted to focus about 9" or 22 cm away from the webcam (not 3" as the printed instructions said). [Read here for more detail](/wiki/spectral-workbench-help#the-spectrum-image-is-blurry-no-sharp-peaks) ###Overexposure If there's too much light, the camera's sensors can't compensate and will be maxed out. On your graph, this looks like it's "hitting the ceiling" and you get a section with only 100% brightness. (Sometimes this happens in only one channel and you can't see until you enable RGB mode, as in the below image.) There are a few things you can do: * dim the source light * move it further away * use a diffuser (milky plastic, a sheet of paper), although this may affect your spectrum * reflect light off of a piece of white paper or a wall (or, for something with a very clean white spectrum, try Teflon) * use more sample (if you have, say, a colored liquid) ###Light leakage If your spectrometer is not sealed well, light may enter the imaging chamber and mess up your readings. The below image has some white light leaking in -- just seal up your spectrometer well with dark tape, especially where your camera attaches to it. ![Leakage](https://spectralworkbench.org/system/photos/1995/thumb/image.jpg) ##Advanced use ###Timing Sometimes, when using the "waterfall" interface in live capture, you don't quite catch that moment when a flare of light is _just perfect_. You can use **Set sample row** under "More tools" on the Analyze page to choose the best cross-section of the image, or use **Auto-detect brightest spectrum** and the website will try to do it for you. ![Timing](https://spectralworkbench.org/system/photos/1991/thumb/capture.png) ###Webcam configuration Most webcams have auto exposure and color "correction" so that in dim light, you can still see. This will unfortunately change the exposure between readings, so for quantitative work, it must be disabled. On Linux, you can use the "uvcdynctl" utility [as outlined here](https://github.com/jywarren/spectral-workbench/issues/2). On a Mac, you can download this utility: http://www.phoboslab.org/log/2009/07/uvc-camera-control-for-mac-os-x "Sluggo" from DM9.se has written a UVC library and control app for OS.X. It works pretty well with a logitech c900 webcam, allowing GUI-based control of whitebalance, exposure, and focus(!). He's also working on an ObjectiveC wrapper. http://www.dm9.se/?tag=uvc-ctrl If you find a comparable utility for Windows, please post it here. ###Webcam selection Some computers/browsers will initially choose the built-in webcam instead of the one in your spectrometer. On Chrome, some recent versions make it quite difficult to select the correct camera. Please first confirm that your computer can recognize the camera **at all** by using a desktop photo booth program and/or [trying out this demo site](http://shinydemos.com/color-picker/). **Chrome v26+** In these more recent versions of Chrome, you can click the camera-shaped icon in the address bar: ![Screen_Shot_2013-06-02_at_10.07.43_AM.png](https://i.publiclab.org/system/images/photos/000/000/458/medium/Screen_Shot_2013-06-02_at_10.07.43_AM.png) Click "Manage media settings" and close the dialog which pops up (the menu you want is behind it). Then scroll down to find the Media section, and select the webcam, as shown below. Close the Settings page. You may need to reload the Spectral Workbench page now. ![Screen_Shot_2013-06-02_at_10.08.16_AM.png](https://i.publiclab.org/system/images/photos/000/000/459/medium/Screen_Shot_2013-06-02_at_10.08.16_AM.png) **Chrome v25** If you are using Chrome 25+ and have a webcam in addition to your spectrometer, Google hid the "camera selection" menu under **Settings > Advanced Settings > Privacy > Content Settings > Media > Camera**. This is really unfortunate, but Google has improved that interface in more recent versions. **Chrome 21-24** In older versions, you can just choose a camera in the dropdown to the upper-right corner, then click Allow to the upper left. ###Offline use The offline-usable Java version of Spectral Workbench is **no longer actively developed or supported**, but you can read about it here: [Spectral Workbench Offline](/wiki/spectral-workbench-offline) A new browser-based offline version is in development; ask [on the mailing list](/wiki/mailing-lists).