When air travel security began to inspect bags and banned bottled drinking water and baby formula I began thinking about why security did not have a device to determine the contents of liquids. If a liquid was detected to be safe, security could allow it on the plane.  Liquids can be positively identified through a technique known as spectroscopy using a device called a spectrometer.  
 
A spectrometer is an optical instrument used to measure the properties of light over a specific portion of the electromagnetic spectrum.  Spectroscopic analysis is used to identify materials. All materials have a spectral signature.  The spectral signature of some materials is within or near the visible light portion of the electromagnetic spectrum.  By measuring the intensity of light at each wavelength a spectrometer can determine the spectral characteristics of a material under investigation.
 
When material burns the transition from solid to a gaseous state emits light at specific wavelengths.  That light can be detected and analyzed by a spectrometer to determine the composition of the material that is burning.  In astronomy, spectrometers are used to determine the composition of the gases that are ionizing and emitted as light energy from a star.  These types of spectrometers are highly specialized and typically large and very expensive.  
 
For this project I have designed and fabricated a simple and inexpensive spectrometer that can detect and identify liquids by analyzing the spectral characteristics of various liquids. You can adapt this same project to determine the color of a swatch of paper or cloth or identify a gem or semi precious stone.  
 
I used an Arduino Board to sequentially illuminate 5 different colored light emitting diodes (LED) and measure the intensity of the light detected by a photo transistor as the light of each illuminated LED passes through a vial of a liquid. I used Blue, Green, Yellow, Red and Infrared LED’s.   The spectrometer has a “learn” mode and an “identify” mode.  In the learn mode a known sample is placed in the unit and sampled at each wavelength of light emitted by the LED’s.  The sampled values are stored in a database in the Arduino memory.  In the identify mode an unknown sample is spectrally scanned and the software in the Arduino compares the values of the scan with the values stored in the database. A simple software algorithm identifies the liquid by making a best guess.  The guess is displayed on the serial Liquid Crystal Display (LCD).  I was impressed by its accuracy. I spent less than $100 on this project and it took just a few days to design, fabricate and test the hardware and two days to write, fine tune and debug the source code.  Collecting the liquids and building the database took one evening and it was fun.  
 
 
Here is a wiring diagram. Link to PDF file.
 
 
 
I have included hooks in the source code so that you can add a reflection mode to identify gems, semi precious stones or swatches of colored paper or cloth or any thing else that you think can be detected by color.  You can add a self calibration routine to improve the long term stability of the spectrometer.  You might try adding an ultraviolet light emitting diode to extend the spectral range of the spectrometer.
 
 
 
 
Eric Rosenthal is President of Creative Technology, LLC (CTech), a company specializing in new and advanced imaging technology consulting and development.
 
Mr. Rosenthal was Vice President of Advanced Technology Research at Walt Disney Imagineering Research and Development, Inc.  In 1999, he successfully completed the construction of Disney/ABC's Times Square Studios at 1500 Broadway.
 
During his 26-year tenure with ABC Television he was general manager of A/V systems engineering at the ABC TV network.  He received an Emmy award for his work as technical project manager for the audio-video systems engineering of ABC's coverage of the 1980 Winter Olympics in Lake Placid, New York.
 
Mr. Rosenthal is an Adjunct Professor at New York University (NYU) Tisch School of the Arts Interactive Telecommunications Program (ITP). He has been awarded 3 patents and has 4 patents pending.
 
 
 
 
 
Make: Liquid ID Spectrometer
Designed, developed and fabricated by Eric Rosenthal