This is a substantial revision to an earlier design, which integrated a bunch of other earlier design concepts.
The earlier version came back from the Barnraising a little crunched. While the idea of being able to print the whole thing out on 8.5"x11" pieces of paper is something I really like, the three-piece design was a little fragile.
I figured that a stiffer material was needed, with fewer exposed tabs. I also wanted to introduce more flexibility and modularity into the design.
I started out by finishing up and revising the files for the printable version and integrating everyone's comments. Now the fold lines are dashed, the tabs are more protected, and the grating is at a 65 degree angle. @fastie was right that the 65 degree angle gets a slightly clearer spectra. See my earlier note for assembly instructions.
Then I designed a new box, with a little trial and error and a a good bit of patience. I started with cardboard, but that was too thick.
So I went to paperboard, essentially a black card stock about the thickness of a cereal box, and reworked the cardboard into to this pattern:
spectrometer_box3_3mm_4cm_wide.pdf
you will also need a board 5mm x 40mm x 235mm, some velcro, and this mounting angle for the grating:
I couldn't fit the box design all on one sheet all at once, and had to cut it up a bit.
I crimped the folds into the material by running over the fold lines with a ball point pen really firmly. This makes great creases and destroys ball points.
Then I started putting the parts together. The mounting board is masonite, 5mm x 40mm x 235mm, and covered in velcro. The block is a 45 degree angle block that ships with the existing desktop spectrometer. It is attached with velcro, as is the angle for the diffraction grating.
The collimation slit mounts on a 4cm x 6cm card and slides into a pocket in the front, locked into place by the top of the boxes' tabs. The idea of a little pocket for collimation slit cards was @amysoyka's.
The double-folded walls of the spectrometer make it really stiff and durable, and quite crunch-resistant, the velcro means that the distances can be changed, and the grating can be changed or re-mounted on a new angle, and the slit can be easily interchanged. The front tabs will also allow it to click into an oil testing kit sample station (more to come).
I haven't had a chance to really play around with this one as a spectrometer, but the initial spectra I captured (there was some weirdness on spectralworkbench today owing to a server switch) looked very clear.
Tell me what you think!
The mount for the grating needs to be a little narrower, as opening and closing the lid can sometimes tork it a bit.
also: Me and @warren brainstormed some ideas as to how to give credit to all the contributors to the oil testing kit in the design, and I asked if we could print the names of people's notes directly on the kit. Jeff said that there are shortened URLs that are just numbers for research notes. I'm going to put some printing on the outside of the different parts.
Follow related tags:
spectrometer oil oil-spill-toolkit spectrometry
build a spectrometer that doesn't use a conduit box, out of mostly paper and cardboard. I want it to be easy to open and close, and ideally all the pieces could be printed on 8.5' x 11" paper
suggested by @cfastie in his research note on
In light of various ideas in the history
Eschewing the more flexible concepts (more 1, 2 ) that Warren and I were prototyping before the breakthroughs in the oil testing kit assay ( 1 2, 3, 4, 5, 6, 7) that lead to a realization that a fixed geometry was fine-- we don't seem to really need to play with the geometry much.
That doesn't mean we couldn't do better than the existing conduit box, as @stoft, @cfastie, and others have pointed out. Getting the relationship of spectrometer's grating, slit, and camera just right is hard in the short conduit box spectrometer.
Following @cfastie's empirical data (from the note linked above), I wanted a spectrometer with a 20cm distance between the camera and slit, and therefore a 45 degree camera angle and 60 degree grating angle.
I started by making a very rough prototype from an existing desktop spectrometer insert and parts, and some black aluminum foil.
I made a little cap for the 45 degree wood block that holds the grating at 60 degrees:
And used another small block to step the .18mm optically printed slit 5mm back from a 2mm wide baffle. this "double slit" a wider baffle and second slit, came out of an experiment to limit stray light. That was very effective, but needed a longer distance to the camera.
Then I set about making an open-and-closable shroud out of the prototype parts. To make sure everything was in easy metric relationships, I prototyped on some Open Structures grid paper I printed out. i then rapidly violated their guidelines regarding tape :-P open_grid_8.5x11.pdf
after getting a prototype of the tab closures working, I made some vector plans:
And then taped them to black paper and cut them out with an exacto.
here they are in their assembly relationship, and partially assembled:
Here are the printable PDFS. I should really differentiate the cut and fold lines, this is a first draft so they aren't super clear yet: endcaps.pdf
I glued two blocks together so they were the full width (4cm) of the spectrometer chamber-- it makes easier alignment.
I then glued down the bottom panel of the rear end cap onto the cardboard panel that forms the bottom of the spectrometer:
I mounted the camera assembly flush to the rear cap, and also taped a dvd grating in place:
unfortunately I didn't account for where the webcam cord was going to go. so I cut a slit in the rear panel and slid it out, and then taped everything closed. Big oversight:
I then lined up the optical slit, little block, and front endcap with baffle slit:
and then glued its base down too:
then it was time to close the wrapper around the spectrometer and close all the tabs:
Then It was time for light-tightness testing with a halogen. Some light can slip underneath the gap between the cardboard panel and the front cap. that was the only spot I could find.
spectra look nice and clear. The two green peaks are visible (though blown out in this image)
I'm really happy with the tabs, they let the whole thing be opened and closed for adjustments to the camera or slit, etc.
I'm going to replace the cardboard with a piece of plywood or other more rigid material, its not rigid enough.
the connecting tabs need to be 1mm shorter to make them easier to insert into the slits.
I need a solution to the USB cable that is straightforward.
I want to make a laser-pointer/cuvette holder that attaches to the front.
Follow related tags:
spectrometer desktop-spectrometer fold-up dsk
I was thinking we might be able to do a crude but very fast CFL detection by measuring the amount of contrast in spectra, so I wrote a script (could have used the API but wanted it to be loaded by default) to try it out. I ended up being a little more complex once I tried it out on a lot of spectra; I discarded sections with low slope, too.
So it kind of measures how spiky a spectrum is, and does an OK job! It could use some tweaking and testing. My thought was to run this "cheap" method, then run a more complex matching if we have higher confidence that it's a CFL.
Try it out at https://spectralworkbench.org/capture (you may be prompted to reload the page once the cache clears) -- there's a little "lightbulb" button that will turn red if it thinks you're looking at a CFL.
Screenshots would be nice either if it works well or if it doesn't, to debug.
@sreyanth - does your code have a "degree of confidence" that it's found a CFL? Like, say it finds blue and green, but red doesn't match up. Is there some way to have a 'threshold' where it's like "yes, this is a CFL"?
In any case the dream is that the capture interface auto-detects a CFL and prompts you to auto-calibrate (the latter using @sreyanth's new code)
Follow related tags:
spectrometer calibration cfl spectrometer-calibration
Related Posts: http://publiclab.org/notes/amysoyka/10-07-2014/a-lil-box-for-the-oil-testing-kit
I was trying to work out how to keep the brightness of the image produced. Due to the laws of physics (I know! Those again...) each time the beam of light was bouncing/passing through an object, it was losing energy & thus losing its overall brightness/strength.
So, what I did was get three different shaped glasses & fill them with water, so as to record the effects of light passing through them. The result was some interesting revelations about how passing light through different shaped containers could potentially affect resolution.
In the image above, you can see what I am calling my circular glass, my square glass and my prism glass (which has an octagon base for those wondering).
The .gif above is of me passing a red laser pointer through the circular glass. The point of origin for the laser beam is at the bottom of the image - where I am holding it against the glass. You can see as part of the light beam reflects back off of the other side of the glass, the beam splits, continuing to bounce until the photons escape to the right of the image.
You can see what I am assuming happened in this image below:
So, every time the light beam bounces, it loses intensity, as photons are split between reflecting, refracting and being absorbed by the glass.
To see how light is divided, I then passed a light back and forth along an x, y and z axis through the prism glass, to help measure how the light bounces.
Passing light through the prism glass on a X-Axis:
Passing light through the prism glass on a Y-Axis:
Passing light through the prism glass on a Z-Axis:
Things that I asserted from what you can see in the .gif's above. X-Axis: The light source needs to be as close to the edge of the sample for the beam to be visible. Y-Axis: It is best that the light source is perpendicular to the surface that it is shining through. Z-Axis: It is best that, whatever the volume of the sample in the container, to shine the light through the middle of the sample.
Keeping the above in mind and applying these rules to the square glass, this is what happens when light is shone through it:
The light loses intensity each time it interacts with a surface. To keep the intensity of the light, it is best to use a container with as few surfaces as possible to contain the sample. This means, that containers with flat sides work better than those with round ones (so a squared vial is better than a circular one). Even better still, removing a dimension entirely, having the sample contained between 2D slides as opposed to being held in a 3D glass vial works best.
Re-designing the inside of the 'lil box for the oil testing kit - so that the light is shining directly onto the sample and interacting with as few surfaces as possible.
Follow related tags:
spectrometer laser container oil-testing-kit
Just a quick update here - I added a webcam preview to the capture interface (see above) as well as a combined RGB graph so you can see clipping more easily. It also marks clipping (overexposure) in yellow to warn you.
Finally, there's a "centroid detection" feature which tracks the center of area under the curve, a metric which we're using in oil grading: http://publiclab.org/notes/mathew/09-23-2014/graded-oils-using-uv-fluorescence
Follow related tags:
spectrometer fluorescence spectral-workbench oil-testing-kit
At the New Orleans oil testing meetup, started using reflective foil mylar (like the inside of a potato chip bag, as @stevie is holding in the photo below) to increase brightness of fluorescence spectra, since we've had some trouble getting them to be bright enough for some webcams. If we increase brightness, we might also have a larger area of fluorescence and not need to worry as much about alignment.
Started this in the comments of this research note, where I wanted to try out foil reflectors.
The lead image (also at https://spectralworkbench.org/analyze/spectrum/35937) shows just a photo of a cuvette, where I placed a strip of adhesive-backed foil on the back of a cuvette, but one thin enough to only affect the middle of the beam path. We should (and do, whoopee!) see a distinct sawtooth "notch" of higher brightness in the middle. I want to know how much this helps.
The red channel shows a ~25% increase in brightness; the green, more like 15-20%, but the blue is clipping in this image. I can try again, but we're talking about double-digit increases, which is super, and much more than I expected.
I think this is enough to say that we should essentially always use foil reflectors. @mathew was also seeing clipping in a lot of spectra, which is the opposite problem. But we can always filter out some of the light; that's not a hard limit. I'm just glad we have a way to increase brightness now too.
Well, basically the more control we have over brightness, the better we can get a good signal-to-noise ratio and good dynamic range for our tests. A tiny square of foil is an easy addition!
Follow related tags:
spectrometer reflective cuvette clipping