Public Lab Research note

Spectrometer for analysing garden soil

by Guillaume123 | January 21, 2015 19:52 | 372 views | 8 comments | #11535 | 372 views | 8 comments | #11535 21 Jan 19:52

Read more:

I am new to this game and have already made one mistake. I hope that this effort gets published.

What I want to do I would eventually like to be able to test garden soil to find out the amount of NPK in the soil; that is Nitrogen, Phosphates, and potash. I have built a home-made spectrometer from square black plastic rainwater downpipe. It is available in the UK, but I'm not sure of its availability in the USA or elsewhere. See attached.

My attempt and results I have made the spectrometer so that ambient light is excluded, and so that it will be safe to use ultra-violet within it. I have made the angle of the diffracted beam and the camera mounting adjustable; I can then measure an angle to a spectral line and from that I can deduce the wavelength that it represents. I have measured the angles to various spectral colored lines and superimposed them on a CFL spectrum fro SpectralLab. See attached. I have made the slit width adjustable to any width. It can also be measured with a car mechanic's feeler gauges. I can also alter the angle of the slit in relation to the centre of rotation of the defracted beam and camera mount.

Questions and next steps My Test 1 spectrum shows curved spectral lines and I don't know why. Th black line in the centre of the spectrum is to give me a datum line for measuring the angle of the diffraction grating and camera when I alter the angle. When I captured the Test 1 spectrum with Spectral Workbench software the graph had only a small height. To my eye the intensity of the Test 1 spectrum looked of a reasonable intensity for a good graph. Can anyone put me right? I have added an attachment about slit width, but I have yet to do slit width tests.

Why I'm interested I am intending to use a pair of cuvettes alongside each other. I hope that I will be able to have the soil test sample in one cuvette and the solvent alone in the other. The idea being that I can subtract the two spectra and thus eliminate the spectrum of whatever light source I am using and also whatever solvent I am using.

Comments would be appreciated! Angle_of_deflection_of_diffraction_Grating.doc









Reply to this comment...

Hi, Guillaume - my understanding is that curved lines can result both from curved diffraction gratings (which you've avoided) and from the lens in your webcam, which is probably the culprit here.

use a pair of cuvettes alongside each other

I am very excited about this possibility. If you want to coordinate on some of the software for comparison, please get in touch!

Reply to this comment...

i like your re-adjustable grating angle setup. real nice.

Reply to this comment...

Markdown I have observed similar effects in the past and found the difficulty to be the orientation of the "Grating Lies" in respect to the inlet slit. Google this: Curvature of the Lines in Plane-Grating Spectra.

Reply to this comment...

Thanks idahoboy1941! I have looked at the Google entries. Many of them require payment, but one by WG Fastie is immediately interesting. I can easily adjust the slit in relation to the bend axis of the diffraction grating. It just requires a relative rotation of the two screws at the bottom of my spectrometer; then appropriate compensation of the pair of hidden screws on the opposite side of the spectrometer. I will carry out this change and publish the results. It will be interesting to see if this does change the curvature, in fact it may be the easiest way to watch the change as I make the correction. If it works, then the helpful people who have suggested that the diffraction grating not being flat, or the problem lying in the camera lens, will have an extra cause to "add to their bows". It will also mean that adding the slit adjustment the way that i have done was serendipitous; just a fortunate accident. I knew that I may not get things exactly aligned so I built in adjustment.

I will post the result when I have made the change. I will also do another post on the internal workings of the slit adjustment, with photos. But many things are piling onto me now.


Reply to this comment...


That was a great idea to allow adjustments to the angle of the slit and grating. You should be able to find positions that produce very good spectra. I found that adjusting the distance between the slit and grating also made a difference, but I never learned why.

The 1952 paper by that WG Fastie fellow describes how a precisely curved entrance slit in an Ebert spectrometer can eliminate astigmatism in the spectral lines. So it is not about curved spectral lines, but nonetheless a notable contribution.


Reply to this comment...

To Chris

It will be relatively easy for me to take out the slit adjusting mechanism and move it further from the diffraction grating adjustment by adding an extra piece of rainwater tube. It would be difficult to get the slit adjusting mechanism much closer to the diffraction grating adjustment. What sort of distance would you recommend between the slit and the diffraction grating. I noticed somewhere that the camera should really be focused on the slit, so moving the slit further from the diffraction grating should improve the focus.

I still have to add a fixed light source, such as a CFL bulb; would you have any recommended distance between the light source and the slit? At the moment I just hold my spectrometer near the CFL bulb.


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

Reply to this comment...

Guillaume, Moving the entrance slit farther from the grating might help. I found that the grating does not have to be angled so sharply when the grating is farther from the slit. I found that as the distance increases, the grating angle has to be decreased to get the sharpest diffraction pattern.

I have not tried to determine how varying the distance to the light source might affect the sharpness of the diffraction pattern.


Reply to this comment...

Login to comment.

Public Lab is open for anyone and will always be free. By signing up you'll join a diverse group of community researchers and tap into a lot of grassroots expertise.

Sign up