Public Lab Research note


Musings: Spectrometer Stability

by stoft | July 17, 2015 05:46 17 Jul 05:46 | #12074 | #12074

My experiments with the PLab 3.0 spectrometer and PLab oil-test kit prototypes demonstrated the requirement to build mechanically stable devices. While it can be educational to observe a working webcam+DVD spectrometer and recover colorful plots, performing real measurements requires repeatability which means stability.

I'd like to propose some design guidelines for these PLab kits:

1 - The optical path from slit to DVD to camera must be a) rigid and b) allow for precise alignment.

2 - Black paper is good for low reflections and can provide a low cost light-tight volume space, but is useless in terms of mechanical rigidity.

3 - Given the slit-camera distance, with a narrow photo-image slit, the slit material must be held fixed relative to the DVD/Camera to reduce spectral noise (for better resolution).

4 - Any "add-on", such as the oil-test-kit module, must be mechanically tied to the spectrometer "frame" (which provides the spectrometer optical path stability) -- a paper interface is not enough.

5 - The UV laser illumination of an oil sample (to be viewed by the spectrometer) must also be rigid so as to eliminate amplitude variations in the spectral signal. (Remember, if you are comparing signatures of samples where the major difference is amplitude of a broad peak, amplitude variations can easily create measurement noise that is a large fraction of the signal you want to measure.

6 - Mounting of oil-test-kit components must be rigid, relative to each other and relative to the spectrometer because any variation or vibration can cause poor measurement repeatability and sample-to-sample repeatability.

7 - Reflections. Light from the UV laser can easily reflect off the black paper and cause intensity variations. Black paper is good, but reflections from it, and from distortions in the cuvettes, can cause significant variations.

8 - At such "close range", the alignment (and alignment stability) of the spectrometer optical path through the slit becomes critical.

A measure of stability of such a system could be verified by repeat set-up, calibration and measurement of multiple samples and comparing the resulting data to calculate the measurement noise error.

Comments are welcome.


11 Comments

Reply to ctoft musings,

Your (ctoft) experiments with the PLab 3.0 spectrometer and PLab oil-test kit prototypes demonstrated the requirement to build mechanically stable devices. While it can be educational to observe a working webcam+DVD spectrometer and recover colorful plots, performing real measurements requires repeatability which means stability.

I agree wholeheartedly!

I'd like to comment on your musings one by one: This comment webpage doesn't allow me to add co Reply_to_ctoft.jpg

loured text, which makes my reply clearer. I have therefore done a WORD file and added it below.

1 - The optical path from slit to DVD to camera must be a) rigid and b) allow for precise alignment.

I have built my own spectrometer for studying the chemical composition of garden soil by building it fromsquare black plastic rainwater downpipe, which is available in the UK (referred to hereafter just as downpipe)

2 - Black paper is good for low reflections and can provide a low cost light-tight volume space, but is useless in terms of mechanical rigidity.

Inside the downpipe I slide a tube made from folded cardboard, covered with black velvet. I get no reflections from the black velvet. The folded cardboard tube just slides into the downpipe, it is not glued in place, it doesn't need to be glued in place.

3 - Given the slit-camera distance, with a narrow photo-image slit, the slit material must be held fixed relative to the DVD/Camera to reduce spectral noise (for better resolution).

I have made, from pieces of downpipe, frames for all of the components needed to make the spectrometer. I use a black epoxy resin glue (available in the UK as JB Weld). It is sold for glueing metal. It is black and stronger than normal epoxy glue. I use an angle grinder to cut up the downpipe.

4 - Any "add-on", such as the oil-test-kit module, must be mechanically tied to the spectrometer "frame" (which provides the spectrometer optical path stability) -- a paper interface is not enough.

See comments for number 3

5 - The UV laser illumination of an oil sample (to be viewed by the spectrometer) must also be rigid so as to eliminate amplitude variations in the spectral signal. (Remember, if you are comparing signatures of samples where the major difference is amplitude of a broad peak, amplitude variations can easily create measurement noise that is a large fraction of the signal you want to measure.

See comments for number 3.

6 - Mounting of oil-test-kit components must be rigid, relative to each other and relative to the spectrometer because any variation or vibration can cause poor measurement repeatability and sample-to-sample repeatability.

See comments for number 3.

7 - Reflections. Light from the UV laser can easily reflect off the black paper and cause intensity variations. Black paper is good, but reflections from it, and from distortions in the cuvettes, can cause significant variations.

My cuvettes also fit into frames made from downpipe. The cuvettes slide into velvet lined holes for rigidity, and to prevent scratching of the surface of the cuvettes. The 2 UV lasers also fit into frames made from downpipe; this frame also holdes multiple cuvettes for easier comparison of samples.

8 - At such "close range", the alignment (and alignment stability) of the spectrometer optical path through the slit becomes critical.

A measure of stability of such a system could be verified by repeat set-up, calibration and measurement of multiple samples and comparing the resulting data to calculate the measurement noise error.

I wholeheartedly agree.

All of the frames etc. fit into the downpipe ends rigidly. They could be glued in place, but I have not found that necessary.

I also have frames for:

Various cameras

Various light sources

Various diffraction gratings

Adjustable slit

Microscope slides

Petri dishes

I had a frame for an angular adjustment of the diffraction grating, but once I determined the correct angle I no longer need to use it.

If you wish to see photographs, look at my earlier contributions under Guillaume123. If you wish to see photographs that don't appear there, please contact me.

Guillaume123

Reply to this comment...


Hi, Dave - thanks for the input, as always.

As to #1, absolutely, as even a small movement can change the position of a spectrum. Do you feel that the wood-and-velcro stage is not adequate stability? The glued-wood upgrade you published looks great, but is significantly more complex and expensive, and the plots you publish don't show any wavelength shift within our ability to measure it. In fact, the major improvement came only from increasing the resolution of the webcam:

graph

The stability of the relationship between the camera and slit doesn't seem to be easy to shift enough to cause trouble for our work, although I guess the question is, "how much force should the spectrometer be able to withstand, and what kind?" -- i.e. how much do you have to press it, push it, crush it to cause the wavelength calibration to shift? Given that I recalibrate each time, I haven't had any trouble, but I don't carry the thing in my bike bag or anything.

For #2-3, you're talking particularly about the slit mounting. Black paper is actually quite rigid, but if there's a good design for a more rigid DVD holder and slit holder, the latter of which connects directly to the wood stage but for which it remains easy to switch slits, we'd love to incorporate it into an upcoming revision. But it has to remain simple to assemble and inexpensive enough to manufacture, or we could alternatively consider offering it as an "upgrade pack".

For #4-6, I have some thoughts too, but will post in a bit. For #7, do you have suggested alternatives to black paper that would be similarly easy to assemble? Work by @lukebrown has examined noise inside the device empirically, and it looks pretty good, especially with the sleeve he proposed.

In general, unless we can empirically demonstrate that there is a measurable gain, I think we're reluctant to adopt more expensive parts and complex assembly procedures.

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


For #4-6, I'm not sure I agree. The rigidity of the attachment of the Oil Testing Kit to the spectrometer itself only has an effect on amplitude, as you point out. But we already use an attenuator based on a design you proposed -- printed on acetate:

attenuator

And in our analysis, as I went through on Monday, we use macros in Spectral Workbench to equalize the height for comparison. And we haven't fully explored the differing total amount of fluorescence produced by different oils or different concentrations. Not to mention possible variability in laser intensity. (Note the links in my Monday post to our work on equalizing curve height and area)

So with several different ways that amplitude is already varied, and that we work to equalize amplitude in software, I'm just not persuaded the rigidity of the attachment itself is having a critical effect on the kinds of oil comparisons we're doing. How would you propose to test that out?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Thanks - Lots of great feedback. - First, remember that we are dealing with light with extremely short wavelengths -- which is why most optical experiments are mounted on granite slabs.

  • I found that with velcro it was impossible to maintain a fixed alignment of the parts.

  • I found that even the double-stick tape holding the camera was marginal for stability -- remember that if the camera angle moves, the position of the spectrum in the display moves (not the relative wavelength cal) which means the pixel data is subject to this noise -- i.e. location of peaks can change during your measurements.

  • The Spec is much less sensitive to the slit moving sideways but a lot more sensitive in the other direction. If the mechanics locating the slit relative to the camera is not stable, then then that will translate into measurement noise.

[ By noise, I include anything from random noise to jitter to low-frequency shifting. This means that if the housing "bends" a tiny bit between sample measurements you will no longer have a single reference point.]

  • Not quite: Note in the plot the difference between the V3.0 and V3.1 (ignore the 1600 pix plot for now). The effective double peak resolution bandwidth was significantly improved because of the improved mechanical stability. No, the camera, DVD and slit did not change, so it was purely a result of lower noise. If the spectrometer stops bouncing around, the rest of the system is able to perform to it's measurement limits. Going to 1600 pix was not much of an additional improvement -- largely because of other system limits which mask the effect of more pixels.

  • While a piece of the black paper, on a flat surface, is dimensionally quite stable ( in 2D) a U-shape or even a double-U-shape as a folded enclosure is NOT dimensionally stable (3D). Yes, the board in 3.0 was a good idea, but then the DVD was mounted on folded paper (wobbly), stuck on with velcro (still more wobbly) and then the slit was held between paper at the end of the paper cover -- which was NOT attached to the board (yet more wobbly). Not a stable, rigid design for an optical measurement system.

  • Yes, the black paper is good for low reflections and for blocking out ambient light -- in fact, I found the 3.0 to be generally very good at keeping ambient light noise out of the spectral signal. The problem is using the black paper for mechanical stability of the optical path. That is why I experimented with wood and glue to create a rigid optical path and then let that assembly "float" inside the black paper cover.

  • Given the above, when coupling to another module (i.e. the oil-test-kit) the concept is to mechanically couple the V3.1 wood platform to an oil-kit wood platform and let the black paper covers handle the ambient light and internal reflections.

  • The amplitude effects are important if you are expecting to compare sample spectra amplitudes and amplitude stability is important if you want to compare measurements between setups or days or measurement devices. Remember, as of yet there is still no process for users to do any form of amplitude calibration or even amplitude reference for measurements.

  • Yes, the attenuator is a good idea and, since it is filtering the light source, it's sensitivity is lower. From a user point of view however, there is a need to ensure and assure the user can select a single attenuation step, not a partial step, just for repeatability. A continuously variable attenuator could also work (and maybe eliminate this issue) but it is still best to ensure the setting, whatever it is, remains unchanged over the life of the measurements and sample changes during measurement comparison.

  • When trying to measure the oil spectra, I was simply unable to keep the paper-to-paper alignment stable enough to reduce the amplitude noise to below ~10% while holding all the parts -- and the whole assembly would shift while sitting on the desk. This is not a recipe for a stable measurement instrument even for PLab.

  • Yes, the issue of kit cost is real, but at least the material cost in my 3.1 prototype was very cheap -- leading me to believe it is possible to keep the kit cost very low by scaling the design of manufacturing the component parts and being creative about the design.

  • What "kind of oil comparisons" are more important? Any broadband spectral comparison will require a stable amplitude -- which so far, there is little control. If you compare 5 oils and you get a nice spread of broad peaks, then you know the measurement is sensitive to a change in oils. If you always did these 5 oils (and they and the system never change) then that might start to be some form of reference. But if the system is not sufficiently stable, then you don't have a reference. I think it is possible but I just don't see the component design is, as yet, sufficient to send out measurement kits where 95% of users can get it right the first time.

I do believe that PLab can, in fact, produce kits which are stable, can be calibrated and will be repeatable from user to user such that results can be rationally compared; the components are just not there yet. I may be alone in this, but I believe the future value of the kits is very dependent on the measurement stability, repeatability and ability to verify measurement specifications of the first official devices to go to users. I believe it can happen.

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Sorry, I've been coding. Some more thoughts:

In the graph I posted of the basic, upgraded, and hi-res spectra, I realize it's hard to say what's more consistent without some absolute reading to compare to -- what we can do, however is see how much movement or crushing/moving of the Spec v3's case is needed to cause wavelength shift. Note the shif in this spectrum, for which I don't know what instrument was used, but which demonstrates wavelength drift:

image

If we can demonstrate that a) the amount of rigidity doesn't prevent such shifts with reasonable handling of the device, and b) the shifts are large enough to substantively affect the outcome of tests we wish to do, then we should definitely work on rigidity. I haven't had trouble with wavelength shift, but perhaps I'm not pushing the limits of my spectrometer's durability as much as the average user.

For kit costs, the wood blocks you proposed are indeed cheap as materials (and well thought through!), but I'd like to push for even fewer unique parts and easier manufacturing. Any opportunity to use the same part multiple times, or to reduce the need for more steps to manufacture it (hole drilling, angle cutting, etc) is very helpful to keep the number of manufacturing steps down. I'm also not convinced we can't create a more stable paper design for the grating and slit -- assuming that we demonstrate that more rigidity is needed.

To be clear -- at the moment, we are discarding amplitude information in our procedure in the Oil Testing Kit (read more here), but I definitely agree that we should make it easy for users to enter -- as tag metadata, perhaps -- what attenuation level they were using. This would be important for any quantitative work especially. There are many reasons to more precisely -- and absolutely -- control amplitude, but at the moment we haven't staked that out as a necessity.

Reply to this comment...


Ack, seems like embeds in comments still isn't working. I'll update with just the picture.

Reply to this comment...


Thanks for a lot of good thoughts to consider.

I agree that the optical paths need to be rigid, both from the slit to the DVD and from the DVD to the webcam in order to reduce noise, and (more importantly, I think) reduce the potential for drift. I have not observed noisy data likely to result from changing path lengths and angles, but we should definitely monitor that with replicated analyses over the course of a month or two, and perhaps with some gentle jostling of the spectrometer (e.g. carry it in a backpack while riding a bike to another Public Labber's house) between analyses.

I disagree that we need to tie the laser/cuvette assembly to the spectrometer, especially because it reduces the utility of the spectrometer piece to do other things. As long as they are easily aligned, it should be fine. Perhaps we can include a flat card for a base, with markings to align each piece to ensure a proper 90-degree angle between the laser and slit (through the cuvette)?

Webcam stability is potentially an issue... I have used two spectrometers now, and the first one my webcam wouldn't hold position when I shifted the whole case, but the one I use now is very solid. I think a lot of the issue stems from the tension on the wires connecting the webcam to the computer, so in future versions we might want to consider that part of the design. That being said, my webcam is totally solid right now.

I think we do need to improve the stability of the attenuator piece. Mine drops unexpectedly, which makes it difficult to use the same attenuation factor on multiple analyses.

As Jeff mentioned, amplitude isn't as much of an issue as lambda-max right now for the Oil Testing Kit. For sample concentration analyses, then amplitude would become important, but for oil type classification, wavelengths, rather than intensities, are the primary data of interest.

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Let me also add that I think added stability of OTK attachment to the spec would be great! But I just don't see it as something we have to prioritize now, and think we should wait until we have a cheap, easy, simple solution for it.

Reply to this comment...


Yes, I understand the wish for simple, cheap and insensitive to construction or handling -- but I'd like to propose some alternative, yet associated, perspectives.

  • Look again at the V3.0 / V3.1 / high-rez plot. It is not the "shift" that is of such importance as it is the resolution -- i.e., look at the 'sharpness' of the definition of the double-peak. Just the one change from cardboard to wood, produced much sharper peaks -- better defined. What this says is that not having stability, guarantees noise. Note that the data acquired for all 3 plots was with the Spec just sitting there with no mechanical forces on it at all.

  • I apologize for insufficient clarity on the concept of mechanically coupling the Spec to the OilTest modules. I was suggesting the Spec and Oil modules are independent components, so the Spec can be used by itself. The Spec would just have a simple means to "connect" to the Oil test module as desired -- but there would be a real mechanical linkage such that the two would act as a rigid system.

  • Amplitude: Whether you try to collect absolute amplitude data or relative data, either one should be repeatable. So, if you do the same setup a week later with the same sample, you should read the same values -- within a "reasonable" tolerance. Otherwise, the value of your data is very limited and comparing data between users and over time will be of even less value. Granted, if you have a stable reference, relative amplitude is easier to make reproducible. However, there really is not way to just hand-wave amplitude out of the way and 'ignore it' and then attempt to compare results.

  • The more variables which the user must or can adjust or can/cannot control the less meaningful the results will be and the less comparison of results will have any meaning and the greater the difficulty in ensuring and assuring users are actually measuring the same things. This is simple the nature of scientific measurements.

  • Prototypes, Products and Manufacturing: A first proto just has to prove feasibility. A first Beta needs to show viability to build many. A product will have reproducible specs and manufacturing tolerances. When you have user construction, the design must then have sufficient limits such that the user tolerances will not exceed the expected performance tolerances. We're not there yet. Generally, attempting to re-design-in fixes (afterthought) to an existing product is more costly to everyone and to the product than doing it "right" in the first place.

  • True, my V3.1 did not have an ideal set of parts for simple manufacturing -- the parts were cheap, but there was too much labor (time) to make them relative to your desired goals. However, V3.1 was a prototype, not a model design ready for manufacture. It just proved the value of stability and the viability of simple materials to get there.

  • I'm suggesting a new perspective: 1) modular design, 2) build stable then just cover it, 3) provide means to 'connect' the stable part of the Spec to the stable part of the OTK. Make the Spec a solid functional block and then there's no need to 'fix' it later. Yes, the design phase is separate from this discussion -- that's a thought-experiment phase.

Reply to this comment...


Hi, Dave - have you had any success reproducing the kind of wavelength drift shown in the example by @priyanka above? Having an idea of how much force and what kind of force can cause drift is an important first step in determining if we need further reinforcement.

I think @ygzstc is going to post soon proposing an easy way to dramatically improve grating/webcam stability, but we need a baseline assessment of stability in the current design to see if it's an improvement.

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Also, regarding the noise you believe is a result of instability without even applying force to the spectrometer housing, what do you think is the mechanism for that? I'm most concerned about wavelength drift, and the idea of stability-related noise is surprising and unexpected. Do you really think there's some way that mechanical instability can create video noise?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Login to comment.