Hello if you like this please take the time to vote in the competitions


At the end of my light sensing instructable where I played with the measurement of reducing sun light levels as well as making it into a laser game , I mentioned that I wanted to have a go at making a full spectrometer. This instructable is a step closer.

In the instructable I said I wanted to add a diode array, unfortunately I have not been able to get hold of one, so this will be a scanning spectrometer.

Diode array spectrometers

These work generally by having no moving parts. The light passes through the sample and is split into its separate spectral components using a prism or similar device. The separate wavelengths then fall onto the detector where each absorbance value is measured at the same time.

Scanning spectrometers

These work slightly differently in that the light is first split by the prism, it the passes through a narrow slit which helps to reduce the number of wavelengths of light that can fall on the sensor after it has passed through the sample.

In this type of system there is a single detector that has to measure each value in turn and because of this the light splitting device has to rotate to direct the sequence of wavelengths onto the sample and so onto the detector.

The spectrometer in this guide will use a diffraction grating a hologram printed onto a price of glass, I got this from work (a spare from a service visit).

If you don't have access to a gratting, you can make one by cutting a piece of a DVD.

HOW Usefull is this instrument

The usefullness of this instrument is limited only by your imagination examples are as follows:

  1. Analysis of the light spectrum (measuring the amount and colour of available light
  2. Measurement of spectral reflectance transmitance and absorbance of materials
  3. Food colourants analysis
  4. Environmental analysis - pollution in water - its inexpensive and connect to a laptop and not a big issue if it gets field damaged
  5. Training tool (educational) A great way to get your children into progamming and developing imaginative solutions.

The above and many more would of course all require calibration of the equipment

Step 1: Parts list and software


Variousjumper wires
TenLight Emitting Diodes
OneLight Dependent Resistor 10 K Ohm up to approximately 130 K Ohm

Batteries : The light source uses 'AAA' x 2 for the LED's you can also make the unit portable by powering the Arduino using a 9 volt battery and of course if you do go portable you will need a battery in the laptop you use to collect your data

Light source

The light source for the spectrometer is a battery powered head inspection lamp - I got a cheap one to canablise from the pound shop


The Arduino is an UNO, the LED's are low values and the Pot is one I had laying around.

The LDR is one salvaged from my Cybot which was modified in a previous guide see


I found a good site for calculating the values for resistors - see the first picture on this guide, the link to which is just below here. I used 33 ohm resistors - these where considerably smaller than my first attempt using some a rescued from an old alarm system - they where way too big leaving me wondering why nothing worked when I switched the "finished thing on"?.



There are two bits of software and one add on required for this project to work:

The Arduino IDE is free to download from the following location and comes as either an install of zip file - I like the Zip (easier to use and and be run from a flash drive for portability)


MICROSOFT EXCEL - unfortunately not free - I have office 2013 on a windows 7 computer

Finally the most important bit is the add on - this is for Excel and comes from a site called PRALAX


The file you want is PLX-DAQ and runs as a macro from inside Excel. This is a great little file as it can be used to monitor any serial port and gather the resultant data sent through it. All that is required is some specific lines of code in the Arduino sketch to tell it the send data to specific cells in Excel.

You also need to specify the port speed and ensure that the Arduino is set to the same speed - initially I tried 9600, but although this worked for the test spreadsheet that only sent text to excel from the Arduino, I needed to set it to 128000 for the final project as I would be monitoring the response times for the LED's dependent upon the resistance of the LDR at any given time.

<p>nice build, but what would be the distance and angle between each parts(like lamp, prism, sample).</p>
<p>Hi the servo is set so that the body is approx perpendicular to the sample ans slits - because the diffraction grating rotates the angle is not really an issue as you an adjust position in the programming. </p><p>Thanks</p>
<p>Great build, lots of good ideas. I will do one of these (but not soon). A possible suggestion for the light sensor might be the scanner head out of a photocopier. (you find them in junk piles from time to time) These already have a slit, and multiple, high quality light sensors in them, creating a ready made sensor array. </p><p>Thanks again for your great instructable.</p>
<p>Thanks for the comments glad you enjoyed the instructable - I will take a look at the sensors you suggested when I have a chance - good idea.</p><p>As you liked this one you might also enjoy my other on spectrometers for a dual beam model at <a href="https://www.instructables.com/id/Linkit-One-Dual-beam-spectrometer/">https://www.instructables.com/id/Linkit-One-Dual-be...</a></p><p>Cheers again</p>
<p>Hey! I really like your design and am planning to make it. I am doing a research on the impurities present in hard water in different areas in my town. I am planning to use this spectrometer to find out the impurities (from the wavelengths) and the concentrations of the ions. How can I do it using this instrument? You mentioned in the beginning of the instructable that this is possible. Please help me out here! Thanks!</p>
<p>Hi thanks for the comments and will be create if you do make it. As for concentration analysis. Keep in mind that accuracy will depend upon the greating. You will need to know the type of contaminants you are looking for and will need to accurately make up standard solutions. Example say your looking for chloride make up a set of solutions at a range of concentrations. Run each on the instrument several times , pick a point on the traces and plot the average for each solution against concentration. Then measure you unknown and read off the concentration from the average reading and the chart. Keep in mind that you do not have a database of responses so will not be able to use this to identify only measure.</p><p>Have fun and let us know how it goes</p>
<p>Hi thanks for comment.I think that the type of motor is an important factor in accuracy of the selection of the part of the spectrum being directed to the sensor, however its dependant upon the the quality of the detector. At present its only an ldr so its sufficient to use the servo and take an average of the readings. I am still trying to identify a better quality sensor then I think it will be good to have the stepper, not only for accuracy, but also repeatability.</p><p>Thanks again</p>
<p>Hi sir. </p><p>I love this project that you are doing. I am just curious about the precision of a servo motor. Wont a stepper motor work better for this part?</p>
<p>can you please please please give me the exact values for the LDR and the POT. please. at least tell me in what range there values are. thx for the great project.</p>
<p>Hi have had a look at the LDR there are no values to be seen, it was one left over from a cybot, but it is not of any great resistance - a low value one (cheap is best) one will do - the higher the resistance the less responsive the spectrometer will be</p>
<p>thx, really helpful. But can you at least tell me in what range the LDRs resistance is? Like from Xohms to Y ohm. Or at least tell me if its in the range of kiloohm or ohm. Really really helpful tanks for the great project </p>
<p>Hi back from holidays now and have had a chance to put a meter on the LDR if I am reading correctly the LDR goes from 10 K Ohm to 130 K Ohm approximate readings only as you will get a bit of variation depending on the light levels you measure in.</p>
<p>Just an additional comment - its the POT that will give you the range as it adjusts the overall resistance of the LDR and so the speed of the signal measured, You could try other detectors e.g. the sensor from a TV remote - Try it as is then try cutting the crystal bulb off an see if it changes sensitivity.</p>
<p>Hi will take a look and post info shortly - just back from holiday so a bit of a mess at present. </p><p>Just looked at pot - LIN 220 Kohm let you know the LDR shortly</p>
<p>Only one question...Could/should a prism be put on the motor insted? Would it be easier to regulate the wavelengths?</p><p>Very nice instructable. One of the best i've seen. I'm considering building one like yours.</p>
<p>Hi I tried to reply last night but the message did not send for some reason.</p><p>A Prism will work, but depending on quality /size etc you will only get a narrow split of the spectrum, in this case you could try to narrow the slit gap to be more selective on which part to the spectrum you are sampling at any one time.</p><p>Alternatively do a search for CD spectroscope - you can use a good quality CD/dvd and cut a section out - mount that on the motor it should work fine (listed in the instructable). </p><p>here's a link that might help:</p><p><a href="http://www.livescience.com/41548-spectroscopy-science-fair-project.html" rel="nofollow">http://www.livescience.com/41548-spectroscopy-scie...</a></p><p>The grating I used was a part replace during the service of a piece of lab equipment, if you want one like that you could try to email the service department at Perkin Elmer or possibly Schimadzu and ask if they have any old parts - they are of no further use in a laboratory environment once swapped out during a service and are usually just binned.</p><p>Hope this helps</p>
<p>As a fellow scientist, I've got to hand it to you, this seems really well thought out and made - I've seen lab equipment comparable to this (though arguably more expensive!).</p><p>I am curious though, I saw where you were working with different light sources. I'm willing to be the household incandescent gave issues due to it's size (the whole point source thing and all). I am wondering if you compared the 'empty' runs (no and/or empty cuvet) to a blackbody curve - this could help with looking at other materials, as well as other light sources (such as LEDs). Unless your headlamp was using those nice fancy white leds, in which case I'd be willing to bet that one of the older flashlight incandescents (or a non-LED uncolored Christmas light bulb) would give some good relatively unbiased runs that you could subtract out with said bb curve. In any case, I'd guess that this'd be something I think many readers here would also be interested in.</p><p>Again, I've got to say, pretty nice setup - I'm impressed!</p>
<p>Thanks for the great suggestions on comparison /subtraction. Yes I did try incandescent - but for the size of body I could not at the time finds a suitable lamp. The light sight source used is the LED sort - the head lamp had a cluster of 6 which I was able to fit inside the turned tube to help direct the light and shield the detector fro direct light.</p><p>I think the secret will be to get better signal to noise ratio which you can see when I reduced the rotation speed- this gave the detector a fighting chance to take a reading. If I can add to this better slits the readings will be more specific to the wavelength being transmitted - I have a couple of vernier gauges that I will be trying to make a set of adjustable slits to test this at differing settings.</p><p>I think that once I can doe this it will make testing different light sources more meaningful and allow for better calibration of the setup.</p><p>Its been nice to talk - but have to go now - thanks again for the comments and if anyone else has suggestions please add them on to the responses.</p>
<p>great instructable rare to see elec tonics and physics in instructables</p>
<p>Thanks I work a bit with Lab equipment and from an interest created the light sensor and arduino combination that developed into this one. I hope to take it a bit further and use a diode array to get better descrimination and signal strength.</p><p>Thanks again glad you liked</p>
<p>Sounds Interesting and well written !</p>
<p>Thank you glad you liked it</p>
<p>Wow, heckuva build....!</p>
<p>Thanks, it is an interesting one and I had fun making it. I think the hardest part was getting the software to run the servo without interrupting the operation of the led timers. Thanks for your comment. If you like this did you have a look at the other light sensor that this started from.</p>

About This Instructable




Bio: Hi I like to have a go at anything that's interesting, from CNC to toy making, recently I have been dismantling an old Cybot ... More »
More by HUKBMBEAR:Nine Men's Morris Life Hack - repair using a 3D printer LinkIt One - 3d Printed Case 
Add instructable to: