Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

Laser Pointer Store

# Is there such a thing as a "hobbiest grade" spectrometer?

#### rhd

##### New member
Um... can anyone here do non-linear regressional analysis? That would be the kind of "mathing" technique that would be most helpful right now. Build a polynomial function given some "n" points are true.
This camera approach is actually starting to seem viable.

I *think* I could code a VB6 program (sorry, all I actually know how to code in) that would take an input image, and then locate the center of two dots, and the distance in pixels between them (provided it was a pretty basic image with nothing other than wall, and dots).

If we had the math figured out, it would be trivial to write a 3 step program (IE, input 3 images: known1, known2, unknown). It could let everyone use their wall as a spectrometer with nothing more than a camera and a grating.

#### rhd

##### New member
its really more of advanced algebra which im decent at, but in all honesty the 2 lines of it scare me too. to me its obvious they don't want you to calibrate it yourself IMHO

EDIT: it linear algebra mostly coefficients are just a name to scare you and polynomials can be ridiculously simple but they can get complicated to ...:thinking:
Question - (I'm jumping around here a bit, and for that I apologize)

If I take the plunge on one of the uncalibrated Science-Surplus units, is there anyone that would be willing to lend me a hand in explaining the math required to accomplish that final stage of calibration? That's all that has me turned off from the process at this stage. I'm afraid I'd probably need a fairly step-by-step walk-through of the math behind it.

Although they recommend an HG-AR lamp, I think I should be able to do the same based on the known DPSS wavelengths I have on hand (473, 532, 556, 589, 593) With 5 known wavelengths, I think I should be able to accomplish calibration.*

* with the help of a math tutor

##### New member
Question - (I'm jumping around here a bit, and for that I apologize)

If I take the plunge on one of the uncalibrated Science-Surplus units, is there anyone that would be willing to lend me a hand in explaining the math required to accomplish that final stage of calibration? That's all that has me turned off from the process at this stage. I'm afraid I'd probably need a fairly step-by-step walk-through of the math behind it.

Although they recommend an HG-AR lamp, I think I should be able to do the same based on the known DPSS wavelengths I have on hand (473, 532, 556, 589, 593) With 5 known wavelengths, I think I should be able to accomplish calibration.*

* with the help of a math tutor
LOL, honestly, you're reading way too much into the math thing. Look at the directions, it says "using a program...we fit...". As in, the software does it for you. As in Excel does it for you.

Type wavelength vs pixel number into Excel. Plot the data in a scatter plot. Click the data points, right click, and "Add Trendline". Choose polynomial fit, choose 3rd order, and choose "Show Equation". Those are your coefficients.

Yeah, that's it.

#### rhd

##### New member
LOL, honestly, you're reading way too much into the math thing.
No I'm not. Because I wouldn't have known to do this \/

Type wavelength vs pixel number into Excel. Plot the data in a scatter plot. Click the data points, right click, and "Add Trendline". Choose polynomial fit, choose 3rd order, and choose "Show Equation". Those are your coefficients.
Thanks!

EDIT: Trigger pulled. Lets see how hard this is to calibrate after all

Last edited:

#### lasersbee

##### Well-known member
I think that tool Jerry linked to is total BS. I don't trust the creator of it. He's a sketch bag

On a serious note though, let me propose something -

I think you could setup a reasonably high resolution DSLR pointed at a clean wall. Somewhere (probably off the left of the DSLR) position a stationary diffraction grating. Then, on the wall towards the left-most of your DSLR frame, put a little dot.

Shine a known laser (a 532 would be perfect) through the center of the diffraction grating. Aim the laser, through the grating, at the dot on your wall. Scale the camera's zoom so that the dot one to the right of your center dot, is over near the right hand side of the frame.

With everything stationary, shoot a frame.

Then swap the 532 with the laser you want to test. Shine the unknown laser through the center of the grating, with the central dot lined up with the same point on the wall. Obviously you need the dot one to the right of your center dot to also be on frame.

With everything stationary, shoot a frame.

I believe that with 4000 horizontal pixels, you would be able to apply the diffraction grating math to your two photos, and determine the unknown wavelength with a +/- of no more than 2nm.

You'd have 3 or 4 pixels to a nm, so even if you loose some precision in the process of determining the center of a dot, you could have a 10 pixel wide dot and still maintain a pretty good ~2nm precision. If you hugely underexposed the photo, you would minimize dot bleed.

Ultimately, this could be automated in software. IE, feed in 532 calibration photo, feed in unknown photo, calculate the unknown wavelength.

Because both photos would use a consistent grating-to-wall ratio, and a consistent grating lines/mm figure, you wouldn't actually need to measure that. You could use a constant variable for both figures, and by virtue of the fact that you have a known (532) photo for calibration, you'd never need to identify the value of those variables.

You might actually require two known wavelengths in order to correct for an off-angle camera plane, but even then, many members here have a 532 and a 473.
I just see one major hurdle with this...
Remember that when coming up with DIY project you must
keep in mind that a DIYer may not have any of the parts or
equipment at hand.

I just checked the lowest priced new DSLR camera on eBay and
found this....

â˜… New SAMSUNG WB210 3.5" DSLR Digital Camera 12X ZOOM | eBay

There may be cheaper and maybe good used DSLR cameras
out there but I think at \$364.99 like qumefox stated it is a bit
expensive for a starting point to a DIY Spectrometer that hasn't
really been proven yet...:thinking:

Mind you... I'm not saying it would not work...

Jerry

Last edited:

#### proud2deviate

##### New member
rhd said:
Thanks!

EDIT: Trigger pulled. Lets see how hard this is to calibrate after all

Last edited:

#### Ablaze

##### New member
Of course it could be made, and even cheaper. If you used a short bundle of fiber optic cable you could solve the problem of different angles of incidence. That way you could just mark on the screen in bold black ink right where the known common laser wavelengths should fall. Leave the back open so that people could use their cell phone or any camera to record the results.

Cost = \$50 at most.

#### laser_freak

##### New member
rhd, you are over complicating your idea with the DIY spectrometer. It is easier to diffuse the laser light, and put the diffracting grating in front of the camera lens. You don't need an expensive DSLR camera, you only need a decent resolution black and white camera. In fact, a B&W would be better for spectroscopy as the CCD's sensitivity is more likely to be linear across multiple wavelengths. Then again it seems like most people here only want a spectrometer to measure the wavelength and don't care about the relative magnitudes of multiple wavelengths.

If you know the focal length of the camera's lens and the camera sensor's pixel size, you should be able to calculate wavelength without needing a calibration source.

Edit, you can also adjust the focal length of the camera to adjust the wavelength spread of the spectrometer. This would allow for either higher resolution measurements with a lower resolution camera. A DSLR is not necessary.

Last edited:

#### rhd

##### New member
rhd, you are over complicating your idea with the DIY spectrometer. It is easier to diffuse the laser light, and put the diffracting grating in front of the camera lens. You don't need an expensive DSLR camera, you only need a decent resolution black and white camera. In fact, a B&W would be better for spectroscopy as the CCD's sensitivity is more likely to be linear across multiple wavelengths. Then again it seems like most people here only want a spectrometer to measure the wavelength and don't care about the relative magnitudes of multiple wavelengths.

If you know the focal length of the camera's lens and the camera sensor's pixel size, you should be able to calculate wavelength without needing a calibration source.

Edit, you can also adjust the focal length of the camera to adjust the wavelength spread of the spectrometer. This would allow for either higher resolution measurements with a lower resolution camera. A DSLR is not necessary.
If you guys want, I'll do exactly this ^

I'll place a diffraction grating on the front of my lens, photograph (what, the dot on a blank surface?). Then I'll post the focal length, and the sensor's pixel size.

I'll post the photograph itself, but I'm going to remove the colour so that you can't cheat. We'll see if that's enough to play "guess that wavelength" ?

#### Cyparagon

##### Well-known member
I could probably do it if you take one photo with a known wavelength, and a different photo with an unknown one. I think a constant would be easier to put in a formula than the focal length and resolution.

#### laser_freak

##### New member
If you guys want, I'll do exactly this ^

I'll place a diffraction grating on the front of my lens, photograph (what, the dot on a blank surface?). Then I'll post the focal length, and the sensor's pixel size.

I'll post the photograph itself, but I'm going to remove the colour so that you can't cheat. We'll see if that's enough to play "guess that wavelength" ?
I have never done the set up I described in my post, but in theory is should work. Now that I think about it some more I see a potential problem: any movement in the laser would ruin the result. If this exact setup was used, you would need to aim the laser at exactly the same spot in the camera's frame.

That is obviously not possible, at least not to a desired degree of accuracy. Instead you could de-focus the laser, and put a pin hole in front of the diffraction grating. The set up would then look like:

unfocused laser spot on wall -------> pin hole --> diffraction grating --> camera

The pinhole should not be small enough to cause additional diffraction. The pinhole and diffraction grating can be fixed in a set position relative to the camera allowing for multiple light sources to be precisely measured. The camera's angle relative to the wall also shouldn't matter.

The only problem I see is that the wall / other surface you point the unfocused laser at could fluoresce if the wavelength is low enough.

Last edited:

#### rhd

##### New member
I'm going to do as discussed, with two very low powered lasers. Two photos. One known.

Last edited:

594nm

#### rhd

##### New member

Now let me ask you a question -

Obviously you knew from my signature what options I had at my disposal. You also knew with some lever of certainty that it wouldn't be 592 or 596, etc. How much of that "594nm" was the math, and how much was it an approximation"

IE, on math alone, knowing nothing about the laser wavelength options, what would you have calculated?

#### laser_freak

##### New member

Now let me ask you a question -

Obviously you knew from my signature what options I had at my disposal. You also knew with some lever of certainty that it wouldn't be 592 or 596, etc. How much of that "594nm" was the math, and how much was it an approximation"

IE, on math alone, knowing nothing about the laser wavelength options, what would you have calculated?
I'm on my laptop which doesn't have any tools to measure the pixels between two points and I didn't want to download any. But I did have my ruler handy
Obviously that introduces a lot of error, especially since I had to view the images at a 50% scale to fit them on my screen. I measured the separation for the 532nm laser to be 9 and 11/16 inches. I measured the separation for the unknown laser to be 10 and 13/16 inches.

532 / 9 and 11/16 = x / 10 and 13/16
x=593.78nm

You should be able to get much more accurate results by properly measuring the number of pixels.

Last edited: