Shop OBEX P1 Docs P2 Docs Learn Events
incorporating spectrograph? — Parallax Forums

incorporating spectrograph?

prof_brainoprof_braino Posts: 4,313
edited 2013-02-03 09:46 in Announcements
There's a kickstarter for an open source spectral library

http://www.kickstarter.com/projects/jywarren/public-lab-diy-spectrometry-kit

The instructions show how to use a piece of DVD as diffraction grating, and your smart phone camera can serve as a spectrogram. We can upload a spectrograph to the site, and the site can match to existing samples, and determine the make up of the sample. (I've gotten as far as taking pictures of rainbows and uploading them).

This seems pretty powerful to me. It feels like this should open up a whole new realm of analysis, but I don't know how to use it.

I've already got the idea to use a smart phone or android device as part of the system, to provide extra storage, processing, and communication services. Anybody have any ideas on how a spectrograph would fit in?

Comments

  • mindrobotsmindrobots Posts: 6,506
    edited 2013-01-29 10:24
    I've gotten as far as taking pictures of rainbows and uploading them.

    What does it say your rainbows are made of?? :lol:

    It seems like an Android phone and associated Apps could be an interesting addition. Micro-controller monitoring and Android recording and alerting.

    I'm not sure about the Spectrograph part. Poisons, toxins, contaminants?
  • ElectricAyeElectricAye Posts: 4,561
    edited 2013-01-29 13:35
    ...

    The instructions show how to use a piece of DVD as diffraction grating....

    Just be aware of a few things. First, the most powerful techniques using spectrographs involve adding a chemical to the stuff you're trying to analyze. The added chemical then forms a complex with the stuff you're looking for, and there's a marked color change, often in a very narrow band of wavelengths. Second, the real challenge of building a spectrograph is getting sharp peaks that can pinpoint those chemical complexes. The difficulty in getting sharp peaks has something to do not only with the quality of your diffraction grating but also with the scanning ability of your motors that turn the grating and scan through all the colors. I kinda doubt you could get that sort of scanning precision out of a cheap servo motor, so just be aware of that.

    It might be tempting to use LEDs for a light source instead of a diffraction grating, but be aware that LEDs can have a wide spread of wavelengths. You could use some filters, like interference filters or laser line filters, etc. to narrow your wavelengths for a particular application, but that causes things to get very expensive and limits the usefulness of what you're trying to do.

    Having said all of that, spectrographs can be very powerful devices, and if you're intrigued by the technology, then definitely go for it. Maybe you can be the one to invent a cheap, portable way of getting spectrographs to work in ways other people have failed at.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2013-01-30 11:19
    Braino,

    big.brain_.alien_-150x150.jpg

    oh, look what I found - just for you!

    http://gratings.newport.com/information/handbook/toc.asp

    Happy now?
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2013-01-30 13:46
    I saw a multispectral imaging approach yesterday that employed a variety of light wavelengths the output sinusoidal light patterns and took an image. The resulting combination of different light frequencies produced and image that showed where blood was flowing underneath the skin and has been validated to identify viable vs. non-viable tissue due to burns. Very cool.

    The kickstarter video was fairly awesome. I think some sort of imaging/spectroscopy application would be a big hit!
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-01-30 15:20
    .... adding a chemical ...getting sharp peaks ... scanning ability of your motors

    Thanks for the info. I don't want to build one. I am just suggesting using this particular method described in the kickstarter. The device adds no chemicals, has no motors, and is pretty much free. All that's needed is an existing smartphone and a broken DVD. The peaks come from the photograph of the rainbow. All the work is done by the server when we upload our photo of the spectrum. It matches our sample to whats in the library.

    Uploading a photo of a rainbow of a CFL got me a calibration, I guess they can determine the difference between my calibration photo with any future samples I send in. I also did calibration with LED lights, and sun light.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2013-01-30 16:11
    ...
    Uploading a photo of a rainbow of a CFL got me a calibration, I guess they can determine the difference between my calibration photo with any future samples I send in. I also did calibration with LED lights, and sun light.

    Intriguing. I suppose they somehow compensate for the differences in the various cellphone cameras's various sensitivities, the qualities of the various light sources, the various different absorption properties of all the various different types of plastic, glass, etc. containers they are using, and the various multitude variety and spectral spread of the different LEDs, etc.? I guess it's all a matter of resolution, and what you are really trying to accomplish with this sort of thing. Their approach certainly has some good buzzy opensourcey feel to it, but I'm somewhat skeptical how useful it will actually turn out to be. I mean, you can tell (via your eyeballs) something about chemicals just by looking at their colors, especially if you use a filter or two, so it is possible to do some useful work with low-res equipment (litmus paper or phenol red, for example).

    In short, if you employ spectrography, I think you need to constrain some of the variables at least somewhat. For the microMedic, that should be easier to do since it's going to standardize at least some of the materials.

    Don't get me wrong - I love the DIY community. After all, that's part of what I do. But too many times I see this sort of stuff coming out. It's "Golly gee, look how easy and cheap this is to do. Give us money so we can make it happen!" But the actual utility of the thing isn't really there. That's not to say it doesn't have potential. It's just that more thought - and often money and work - needs to be put into the process/product.
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-01-30 19:59
    Yep, apparently they did, but I'm not any expert. It would require someone of your ability to critique the work. It looks like a totally simple and elegant solution, but what would I know. For example, I think that since they know what a CFL spectrum looks like, they can take what ever I send them as calibration, and apply whatever transform is required to get it to scale properly. That would mean it doesn't matter what type of phone, plastic, glass, etc. Seems logical, but I don't know how accurate it is or if its even close.

    What type of constraints are you indicating? These folks claim that the spectrometry can distinguish between visually identical looking types of olive oil, and different brews of Starbucks coffee. They say they identified the chemicals in the oils spill in the gulf (to detect if the spill is still present).

    Oh, and the guy gave us the instructions so we could did it at home, without giving any money. I sent in $10 just because I wanted to kick in for the server and library of spectra. You could make one for you phone in under 10 minutes, and signing up for the site is free. Apparently the only thing they need now is lots and lots of data, from lots and lots of users.

    AND the project lead answered my questions when I was bitching about the instructions. I don't think they are grabbing for money.

    Please take a look. Its probably too good to be true, but in case its real, it would be nice to know one way or the other.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2013-01-30 21:21
    ... I don't think they are grabbing for money.....

    I didn't mean to imply they are merely trying to make money off of DIYers. But I do see this sort of over-optimistic outlook in some of the DIY endeavors and I sometimes see people thumbing their noses at "traditional" techniques simply because they're expensive and, well, traditional. Maybe the over-optimistic outlook might be summarized this way: "Because it took us only 10% of our oxygen to get 90% of the way up the mountain, then surely we can make it all the way to the top with less than what the other guys are breathing." Problem is, very often that last 10% up the slope is the killer. That final 10% of needed capability is what sucks up all your resources, yet it's what makes the endeavor possible - or safe.

    Case in point: I'm always being confronted with super cheap biological incubators. The makers show me what miraculous things they have created out of cardboard boxes, light bulbs, paper mache, Arduinos, etc. They sneer at how incubator manufacturers are raping everyone with their prices. Problem is, these student-built incubators sometimes look like something designed to, first, electrocute their owners, then, second, burn down their buildings. Unfortunately a lot of money must be put into such a device to make it safe, so it fails safe, etc. And that's what causes the costs to creep up. (Not to mention a bunch of dreary regulations written that, in the aggregate, save peoples's dreary lives.)

    Anyway, so maybe these kickstarter people have figured out some new trick to normalizing all of this data with super cheap techniques regardless of whatever cuvette they're place in or not. God knows I hope so. Again, I don't want to discourage anybody from building on a concept like this DVD diffraction grating thing. Maybe all it would take is a better grating, for example, or some amazing statistical way of filtering all of this data. Beats me. But I am painfully aware of the lengths people go to so they can separate their spectral peaks, so I'm forced to question just how good is this DVD approach. Certainly it's worth tinkering with and learning from, but I'm guessing it is more of a point of departure than a destination.

    I don't mean to sound pessimistic but I just wanted to warn people to be cautious when it comes to the requirements of analysis vs. what something like this might - or might not - do. The devil, as it's known, is always in the details.
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-01-31 06:50
    I didn't mean to imply they are merely trying to make money off of DIYers. But I do see this sort of over-optimistic outlook in some of the DIY endeavors and I sometimes see people thumbing their noses at "traditional" techniques simply because they're expensive and, well, traditional. Maybe the over-optimistic outlook might be summarized this way: "Because it took us only 10% of our oxygen to get 90% of the way up the mountain, then surely we can make it all the way to the top with less than what the other guys are breathing." Problem is, very often that last 10% up the slope is the killer. That final 10% of needed capability is what sucks up all your resources, yet it's what makes the endeavor possible - or safe.

    I don't mean to sound pessimistic but I just wanted to warn people to be cautious when it comes to the requirements of analysis vs. what something like this might - or might not - do. The devil, as it's known, is always in the details.

    Thank you for the warnings. You opinions are valid, but individual projects need to be evaluated before the generalizations and pessimism are applied. This is not climbing mountains and limiting oxygen. This is not building a DARPA research project quality spectrometer from scratch. This is taking the reflected light from a sample, breaking it into a rainbow, and taking a picture from it. The idea is to calibrate the photo using a rainbow from the light source, and use that to compare with future samples. This is done by the server, against an existing library of samples. Ease pease, and free. The question is very specific: How well does this work, and how can we evaluate this?

    If you want to contribute, answering this question is where we are at.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2013-01-31 11:51
    ...This is not climbing mountains and limiting oxygen......

    Hold on a second while I get some air here.... ahh..... ahh...

    film40_129881d.jpg

    ...You opinions are valid, but individual projects need to be evaluated before the generalizations and pessimism are applied.....

    You're right. It all depends on what you want to use this for. Maybe something crude is enough to make something work. Your application will dictate what you need and how to design it. I guess you'd get the most bang for your buck after finding a spectroscopic application that the human eye can't do very well (by just looking at the sample) but that a crude spectrograph might possibly do. Then work from there. Start with your capability and find an application.

    But keep this in mind. Diffraction gratings are often in a material that is fairy rigid and not terribly prone to temperature effects. DVD material, on the other hand, is fairly flexible, so if you aren't nailing it down somehow, I can see how your calibration curves might suffer from incidental warping and twisting. If you're using a library and you're counting on the computer to keep track of your color positions via their pixel colors, then somebody must keep track of a half dozen different variables that go into the color processing: the light curve sensitivity of the camera you used, the lighting source, how the camera or computer compresses the color file, how the library computer interprets that color file, how things are compensated for in the lighting. That part is above my pay grade.

    I mean, so long as you're sticking to comparing some simple samples, maybe it won't matter. But telling the difference between two different cups of coffee might be so obvious that anybody could have done it by merely glancing at it. In an automated system, where no human operator is there to test things, then perhaps this would be exactly what is needed.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2013-01-31 16:14
    Is your technique using a slit of any kind?

    Some interesting info on this technique (using a slit) from a link on that kickstarter site:

    http://publiclaboratory.org/notes/cfastie/1-21-2013/spectral-image-quality

    8402686620_7fae44b3eb.jpg
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-02-02 05:47
    But telling the difference between two different cups of coffee might be so obvious that anybody could have done it by merely glancing at it.

    If you check out the article, you can the device can differentiate samples that look identical to the eye. The coffee examples were visually identical (being coffee colored) as were the olive oil samples (being clear greenish).
    Is your technique using a slit of any kind?

    Some interesting info on this technique (using a slit) from a link on that kickstarter site:

    Yes, thats the one, the site shows the entire set up, how to make it, how to sign up, and how to use it.

    So far it looks like all your worries about different light sources, different cameras, and keeping track of many variables associate, are taken into account and have been addressed.

    Now the question is, are there any case in a medical environment where a spectrograph might be useful? If we could determine a case where this might be useful, I could try it out, and see it works and if there is something we can automate.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2013-02-02 06:53
    ....

    Now the question is, are there any case in a medical environment where a spectrograph might be useful? If we could determine a case where this might be useful....

    That's where the problem is toughest of all. A general doctor probably wouldn't know. Maybe a specialist - a pathologist - could provide some ideas. But then, on top of it, said pathologist would need to have an excellent understanding of the inner workings of spectroscopy so that they could make a judgement call on which tests would be good candidates for this kind of low-res device.

    One of the more powerful developments in spectroscopy might be the use of fluorescent markers - chemicals that bind to specific targets and which glow at particular wavelengths when they are exposed to UV. Analysis of raw precious bodily fluids might be possible, but far more difficult than considering the use of markers of some sort. BTW, UV leds are available. If you use them, just be sure you don't expose yourself to too much of the output.

    The holy grail is a fluorescent marker that glows in different wavelength signatures depending on what sort of disease it binds to, and can identify many different kinds of diseases.

    For starters, I suggest you try something simple with your own equipment, Get some phenol red (maybe check swimming pool supply stores, used for water testing), or just cheap stuff off of ebay or onlinesciencemall.com, or universal pH testing fluid. And play with some of it and your equipment. See what kind of pH shifts you can detect and, most of all, how repeatable are your tests.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2013-02-02 07:18
    ...
    So far it looks like all your worries about different light sources, different cameras, and keeping track of many variables associate, are taken into account and have been addressed.....

    Well, maybe my worries have been acknowledged but I'm not sure they've been resolved (no pun intended). For example, in the camera comparison picture, look at the output of the Canon A810 vs. the LifeCam VX6000. On the far right of the Canon A810 picture is a faint reddish band. But for the LifeCam VX6000, that band is absent. Yet in the LifeCam VX6000, the middle red band is more intense than it is in the Canon A810. How is the computer supposed to "lock in" on a band distribution like that? Geometrically, they are not the same. So how does the computer know where things are? how does it calibrate with differences like that?

    Now, since geometric position might not be a good way to match up spectra, let's take a look at the color distribution. Surely the computer can match things based on their color differences. Problem is, look at the colors. In some cameras, what is displayed as green is showing up reddish on other cameras. To me, this appears like an enormous challenge, and the author of that camera article was presenting these differences, I think, to illustrate the kinds of problems that still needed to be solved. In my own humble opinion, these could be significant problems - but again, it all depends on what you need to do with the device. Just be aware of the limitations.
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-02-03 08:04
    How is the computer supposed to "lock in" on a band distribution like that? Geometrically, they are not the same. So how does the computer know where things are? how does it calibrate with differences like that?

    From my understanding, its all done on the server using the library. The server know what a spectrum a CFL produces (though previous measurements, using very fancy lab equipment). The serve does processing, to determine the difference between your calibration photo, and the "pro" spectrogram in the library. The server calculates a transformation to get from your calibration photo to the pro spectrogram. Then, each time you submit a sample, the server applies this transformation. Apparently it works very quickly, you upload a picture, they download a result, in about as much time as posting a photo to facebook.

    I don't think they actually care about the color so much as the position of the peaks. They match the spectral fingerprint. The only time color is used is when the user manually clicks on the "the green peak" and then clicks on "the blue peak".
  • ElectricAyeElectricAye Posts: 4,561
    edited 2013-02-03 09:46
    ... Apparently it works very quickly, you upload a picture, they download a result, in about as much time as posting a photo to facebook....

    Okay, keep us posted on how it goes.

    Another thing maybe to look into: using fiber optics as a kind of interface to fluids, tissues, etc. instead of needing to place samples into containers. I seem to remember some people doing something with "frustrated internal reflection", in which the leaking of the light through the optic fiber walls could be measured at different wavelengths to provide some kind of info when the bare fiber is pressed against a sample or immersed in it. I don't recall any details, however.
Sign In or Register to comment.