Oil testing kit Blog



a paper spectrometer design, pt 2

by mathew | about 10 years ago | 11 | 3

What I want to do

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.

IMG_20141205_180218.jpg

I figured that a stiffer material was needed, with fewer exposed tabs. I also wanted to introduce more flexibility and modularity into the design.

My attempt and results

Finishing what I started

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.

Screen_Shot_2014-11-07_at_12.17.40_PM.png

angle65_3.pdf

angle65_2.pdf

wrapper2.pdf

endcaps3.pdf

A New Case

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.

IMG_20141202_144829.jpg

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:

Screen_Shot_2014-12-05_at_6.13.41_PM.png

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:

angle65_3.pdf

I couldn't fit the box design all on one sheet all at once, and had to cut it up a bit.

IMG_20141204_165256.jpg

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.

IMG_20141204_173356.jpg IMG_20141204_174649.jpg

IMG_20141204_183859.jpg

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.

IMG_20141205_172408.jpg

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.

IMG_20141205_172511.jpg

IMG_20141205_172716.jpg

IMG_20141205_172651.jpg

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.

Questions and next steps

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.

Read more Follow

spectrometer oil oil-spill-toolkit spectrometry


a paper spectrometer design

by mathew | about 10 years ago | 7 | 3

What I want to do

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

My attempt and results

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.

IMG_20141021_201721.jpg

IMG_20141021_201921.jpg

I made a little cap for the 45 degree wood block that holds the grating at 60 degrees:

IMG_20141021_201854.jpg

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.

IMG_20141021_201904.jpg

IMG_20141021_201738.jpg

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

IMG_20141107_112029.jpg

after getting a prototype of the tab closures working, I made some vector plans:

Screen_Shot_2014-11-07_at_12.18.08_PM.png

Screen_Shot_2014-11-07_at_12.17.40_PM.png

Screen_Shot_2014-11-07_at_12.17.52_PM.png

And then taped them to black paper and cut them out with an exacto.

IMG_20141106_113317.jpg

here they are in their assembly relationship, and partially assembled:

IMG_20141106_151328.jpg

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

wrapper.pdf

angle.pdf

Assembly

I glued two blocks together so they were the full width (4cm) of the spectrometer chamber-- it makes easier alignment.

IMG_20141106_154502.jpg

IMG_20141106_154456.jpg

I then glued down the bottom panel of the rear end cap onto the cardboard panel that forms the bottom of the spectrometer:

IMG_20141106_152727.jpg

IMG_20141106_155703.jpg

I mounted the camera assembly flush to the rear cap, and also taped a dvd grating in place:

IMG_20141106_161013.jpg

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:

IMG_20141106_160602.jpg

I then lined up the optical slit, little block, and front endcap with baffle slit:

IMG_20141106_162920.jpg

and then glued its base down too:

IMG_20141106_163221.jpg

then it was time to close the wrapper around the spectrometer and close all the tabs:

IMG_20141106_161359.jpg

IMG_20141106_161431.jpg

IMG_20141106_161452.jpg

IMG_20141106_163530.jpg

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.

IMG_20141106_164337.jpg

spectra look nice and clear. The two green peaks are visible (though blown out in this image)

Photo_on_11-6-14_at_4.50_PM.jpg

Questions and next steps

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.

Read more Follow

spectrometer desktop-spectrometer fold-up dsk


CFL detection by contrast, for auto-calibration

by warren | about 10 years ago | 0 | 1

What I want to do

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.

continuous.png

My attempt and results

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.

Questions and next steps

@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"?

Why I'm interested

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)

Read more Follow

spectrometer calibration cfl spectrometer-calibration


Passing Light Through an Object.

by amysoyka | about 10 years ago | 0 | 1

What I wanted to do

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).

My attempt and results

bounce.gif

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:

refract.png

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:

x-pass.gif

Passing light through the prism glass on a Y-Axis:

y-pass.gif

Passing light through the prism glass on a Z-Axis:

z-edit.gif

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:

squared.png

What does this all mean?

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.

What am I going to do next?

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.

Read more Follow

spectrometer laser container oil-testing-kit


Spectral Workbench previewing and clipping warnings

by warren | about 10 years ago | 1 | 3

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

centroid.png

Read more Follow

spectrometer fluorescence spectral-workbench oil-testing-kit


Quantifying reflector brightness assistance

by warren | about 10 years ago | 1 | 2

What I want to do

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.

IMG_20140731_210411.jpg

My attempt and results

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.

Questions and next steps

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.

Why I'm interested

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!

IMG_20140911_160739.jpg

Read more Follow

spectrometer reflective cuvette clipping