My thesis for obtaining my undergraduate degree was about developing a UV-Vis spectrophotometer for which I won the Best Thesis Award.
For the completion of the project I combined research, physics, optics, electronics and programming thus developing various skills. I learned how to read and distill important information from scientific papers, I experimented with optics and the physics of light, figured how to make 3D designs using CAD software and not only 3D printed some parts for my device but also had to troubleshoot the printer whenever a print failed. I made a prototype to act as a proof of concept and then finalized the design. Finally I wrote code in Arduino to control the electronics and created a GUI in Matlab to control the device and view and save the data measured by the spectrophotometer.
Below you can find pictures of the process and final make of my spectrophotometer as well as the paper and poster for my thesis.
Purchasing a spectrophotometer can cost thousands. Even then, most spectrophotometers use a standard sized cuvette or sampling plates as measurement inputs. The aim of this project is to be the stepping stone for creating a specialized UV-Vis spectrophotometer to measure the absorbance of nano-particles (NPs) in real time as opposed to measuring them post production. A DIY spectrophotometer has the advantage that it can be built to a specific standard, or with a specific feature in mind. Therefore, this project in which we will create a ”standard” UV-Vis spectrophotometer, will be the basis for a next iteration for a modified version, in which we can escape the constraint of having to use a cuvette or sample plate to measure our sample. In addition, a DIY spectrophotometer can be easily taken apart and be studied by engineering students, to help them grasp engineering, design and optics concepts.
With this I had three main goals in mind for my spectrophotometer:
Make it affordable
Make it as accurate as possible
Make it modular/modifiable
A spectrophotometer is essentially a device that measures the absorbance of different wavelengths going through a sample. Absorbance can be described mathematically as the logarithm of the initial intensity of the wavelength divided by the intensity of the wavelength after passing through the sample. All I needed for my spectrophotometer where a light source, a lens, an LDR, a prism to disperse light and a stepper motor to rotate the prism, moving every wavelength over the LDR enclosed in a dark box that would minimize reflections and stray light.
These where the main parts, the positions of which should be fixed for best results. I discovered that placing the lens in the distance of two focal lengths from the light source and the prism one focal length from the lens, that the rainbow was bright and wide. The wideness of the rainbow is usefull as I can separate more wavelengths using a small slit which I 3D printed. After some trial and error and trying the parts in different locations, I settled on the final design of the project.
Due to limitations of size and budget, my device measures the intensity of lights for 115 steps of the stepper motor, corresponding to the steps in which the light which need to be translated into absorbance per wavelength.
Another challenge was that the rainbow created by the prism was not equally distributed, meaning that I did not measure a snapshot of each wavelength an equal amount of times.
The final challenge was with ease of use. To get an absorbance diagram I needed the Arduino code to control my the motor, LED and LDR, a specifically formatted excel spreadsheet, with a third party add-on to capture data from the Arduino which would then be imported into Matlab, in a separate code that would process the raw data and return a useful graph. This whole process was a hassle and I needed to find a way to simplify it.
In order to validate my design and calibrate my results I used the commercial UV-Vis spectrophotometer at the lab to measure various samples from batches of nanoparticles with different properties and dyed water. The process included applying the absorption formula on the intensity data, normalizing the two graphs, average out any blank readings at the start and end of my data and stretch the x-axis. To find the best stretch equation I used an iterative method testing different values for both the linear and non-linear parts of the equation. After getting the optimal stretch equation for every sample I averaged the variables and used the average stretch values for the linear and non linear parts for my final equation.
After the stretch I needed to match the two graphs before comparing them. I used interpolation as well as an algorithm I developed based on finding and matching the peaks of the graphs . Finally, to test and select the best equation for each sample, I used cross-correlation. The summary of the process can be seen in the four following images.
In my thesis I also discuss a second method of calibration and verification using a red, green and blue LED.
Raw absorption of my spectrophotometer
Using iterations to find the best stretch
The raw DIY and industrial graphs compared
Matched graphs of industrial and DIY spectrophotometer
The project was a total success. The challenge of the limited number of steps and unequal number of measurements for each wavelength where compensated with calibration and the results are perfect for their use case - getting an early report on the properties of the nanoparticles being produced in real time, without having to wait days to measure and discover that the nanoparticles produced are not the ones intended. After a successful production, they can also be measured in the industrial spectrophotometer for validation and more detail.
I also managed to tie up Matlab, Arduino and Excel in a Matlab GUI. This GUI allows the user to take measurements, control the spectrophotometer, view results and save the raw data in an excel spreadsheet. Furthermore, the user can save the produced graph as a figure or an image, and can even compare new readings with old ones and save those images as well.
As for my goals, the total cost was about €250 (€200 spent on the prism and lens), so an order of magnitude cheaper than an industrial one. The accuracy was surprisingly good as seen from the correlation in the figures above. As for modularity and customizability, the device was built from corrugated plastic with a removable top and some 3D printed parts. The prism, cuvette and slit are removable giving the opportunity to study the system or modify the area where the base of the sample cuvette is located to enclose a different container for the sample.
Thesis presentation
Through this project I acquired several skills:
Discovered some fundamental properties of light and got experience using optics equipment
Kept an organized log file of my progress and daily lab notes
Combined electronics, hardware and software in a final working prototype
Learned how to interpret and use scientific data
Familiarized myself with Matlab
Integrated three different software in a single GUI
Did research and wrote a scientific article
Worked on my presentation skills
Figuring out the position of each part
Marking measurements and positions on a cardboard base
Circuitry
Wavelength Selector
The end result
GUI initial screen
GUI finalscreen