Introduction: Student Spectrophotometer
Let me first give credit where credit is due. My inspiration for this project comes from AlfonsVH with his "A simple DIY spectrophotometer". Having said that I have made some improvements to his design and I want to share what I have learned.
Why I built it:
This project was meant for one of my professors of instrumental analysis (chemistry required coursework). He had mentioned something about cutting back on the amount of chromatography labs and having the students build their own instrument to better understand how they work. I was really excited about that idea, and even though my class at the time wouldn't have been able to try it out, I wanted to show that it was possible. That way future students could have a template. Also so that my professor would be more inspired to test out different ideas for himself.
Step 1: The Specifications
Specifications / Limitations:
- Visible spectrum (tungsten filament a.k.a an incandescent light bulb)
- Minimum of 15 steps (using a servo motor)
- Lens to focus spectrum
- external 5V power supply for servo motor (AC adapter)
- Separate 3V power supply for light source (batteries)
- Protoshield for easy removal from arduino
Tools / materials needed:
- An Arduino
- Resistors (10K x 2, 560)
- Cuvette (a.k.a the sample holder)
- Servo motor Razor blades (the slit)
- Hot glue
- light source (small flashlight with incandescent bulb)
- Stuff to solder
- Mini lens
- CD (the diffraction grating)
When it's done it should be able to:
- Compile a spectrum in a short amount of time
- Give averaged values
- Provide some characterstics of the compound being studied
Step 2: What's Important to Know
I've written and attached a summery about building your own scientific instruments with Arduino if anyone is interested. It goes into a little more detail with the project and more. I want to keep this instructable as simple as possible because I could go much further in depth, so if you want more detail check out the attachment.
Lets keep it simple
What's important from the schematic:
- The order and location of the photoresistor and the 10K (circled in red)
- The external 5V power supply
Why it's important:
- The order of the resistor and photoresistor is important because the order defines the voltage divider equation. We want to measure transmittance*(see theory basics) so we need the numbers in the Arduino serial monitor to be proportional to the intensity of the light.
- The external 5V power supply is necessary to drive the motor because if the motor and the photoresistor are on the same 5V from the Arduino the signal will be really noisy. We avoid this by having an external 5V (Note: All grounds should still be tied together).
Transmittance is the light that makes it through the sample (measured)
Absorbance is just that, the light absorbed by the sample (calculated using A = 2 - log(%T)
For a more in depth explanation see attachment.
Step 3: Building It
I think the pictures say it all, and what they don't the schematic will. You can choose to lay it out slightly differently but it's all the same principle. The light from the incandescent bulb hits the CD (diffraction grating) hot-glued to the servo motor. As the motor moves the different wavelengths pass through the slit (two razor blades) and through the cuvette which holds the sample and then finally to the detector (in this case the photoresistor).
The protoshield was just a little added bonus, but the design could have easily worked the same with a bread board as long as the schematic is followed exactly.
Step 4: The Code
I'm not a coder but I know how to copy and paste. I modified a code that I got online see attachment.
Brief outline of what the code does
1. Waits for button press (assumes you turned light source on)
2. Indicator LED turns on (when button is pressed)
3. Motor takes 3 big steps then takes 5 measurement
4. Motor takes 15 small steps (repeating the measurement 5 times) Note: serial monitor must be visible!
5. Light shuts off and motor goes back to "home position"
After the data is in the serial monitor it needs to be uploaded into Microsoft excel. I find that copying and pasting it first into notepad works best. Then copy again from there and paste special into excel (it will go straight into columns). Then I recommend looking up a macro for excel that averages every five measurements (google it).
Note: for each sample there needs to be a blank. The sample data must be subtracted from the blank data and then you can use A = 2 - log(%T). Make sure you understand the x-axis so that you know whether the wavelengths are going from high to low (or vice versa).
Step 5: Results
The above spectrum is an extraction of chlorophyll a, b, and carotenoids from spinach leaves. Next to it I have the actual spectrum and they surprisingly match up quite well!
Step 6: Messing Around
I also did spectra of dilute wine and bourbon. I think it would be fun if I took a bunch of spectra of different wines and whiskys and then logged the taste data next to the spectra to see if I could place what tannin went with what wavelength.
Maybe in a future experiment!
Step 7: Closing Thoughts
Improvements from AlfonsVH's design:
- Using the Arduino to do analog readings (using a separate 5V source for motor as necessary)
- Using a lens to focus the light into a more concise wavelengths
- Having a somewhat portable enclosure
- Time it takes to run a spectra is less than a minute
- Using a protoshield for easy removal from Arduino
Improvements from my design
- It is definitely obvious that a different type of motor could be used to get more wavelengths (the downside is of course the amount of time will greatly increase)
- A laser and a standard could be used to calibrate which steps correspond to which wavelengths
- Maybe varying the slit width
- possibly taking fluorescence measurements (after some alterations)
- A sexier enclosure
P.S. if you guys want me to do spectra of anything cool (chemical sample in solution) post a comment and I just may update the instructable!
We have a be nice policy.
Please be positive and constructive.