Make a device that identifies dangerous liquids by analyzing light – By Eric Rosenthal…
After air travel security banned bottled water and baby formula, I began wondering why they didn’t use a device to determine the contents of liquids. If a liquid was detected to be safe, security could allow it on the plane. Spectrometers can identify the chemical makeup of a material by shining light on it and analyzing the precise mix of colors that bounce back.
These devices are usually very expensive, but I’ve designed a simple and inexpensive one that can identify liquids. You can also adapt it to determine the color of a swatch of paper or cloth or to identify a gem or semiprecious stone.
I spent less than $100 on this project and it took just a few days to design, fabricate, and test the hardware, plus another two days to write and debug the source code. Collecting the liquids and building the database took one evening, and it was fun!
MATERIALS
Arduino board from sparkfun.com. Use the Arduino NG or the latest USB version, the Arduino Diecimila.
LEDs (5) blue, green, yellow, red, and infrared Infrared
(IR) phototransistor
¼-watt resistors: 220 Ω (5), 1KΩ (2), 2.2KΩ, 18KΩ
Serial display I used a Crystalfontz 634 Serial LCD; you could also use the Matrix Orbital LK 204-25, or similar products from seetron.com.
Power supply 6V–12V DC, 1A– 1.5A
7805 5V voltage regulator and heat sink to drop the 12V to 5V for the display’s backlight
Case from vellemanusa.com
Push-button switches (2) momentary, normally open
Soldering iron and solder
Wiring diagram Download from makezine.com/14/diyscience_spectrometer or follow the one in this article.
SCHEMATIC DIAGRAM OF SPECTROMETER
An all-controlling Arduino board drives 5 colored LEDs from output pins, along with a serial LCD display. Digital inputs from buttons switch between “learn” and “identify” modes, and analog input from the phototransistor is analyzed to identify the sample. A 7805 voltage regulator powers the LCD backlight.
A Little Science Background
A spectrometer measures the properties of light over a specific portion of the electromagnetic spectrum. Because all materials have a unique spectral signature, spectroscopic analysis can identify materials from the light that they reflect or emit. Mixtures of materials produce combined spectra, and by measuring the intensity of light at each wavelength, a spectrometer can determine the overall chemical makeup of a material under investigation.
When material burns, a spectrometer can detect and analyze the light it emits to determine the material’s composition. In astronomy, highly specialized spectrometers are used to determine the composition of the gases that are ionizing and emitted as light energy from a star.
How It’s Done
- 1. An Arduino board sequentially illuminates 5 different colored LEDs (light emitting diodes): blue, green, yellow, red, and infrared.
- 2. As each LED’s light passes through a vial of liquid, we measure the intensity of the light detected by a phototransistor. See the wiring diagram above to wire together this part of the spectrometer.
- 3. Our 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 emitted by the LEDs. The sampled values are stored 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.
- 4. A simple algorithm makes a best guess to identify the liquid, which is then displayed on a serial LCD. I think you’ll be impressed by its accuracy.
- Go online to get the wiring diagram, source code for the Arduino, parts list, and other info at creative-technology.net/MAKE.html.
- See the spectrometer in action and get a peek under the hood at makezine.com/14/diyscience_spectrometer.
- More photos at makezine.com/go/spectrometer.
Eric Rosenthal is president of Creative Technology, LLC (CTech), a company specializing in new and advanced imaging technology consulting and development.
References:
Make: Arduino
Arduino Starter Kit
Getting Started with Arduino
http://creative-technology.net/MAKE.html
http://www.make-digital.com/make/vol14?pg=136
https://makezine.com/14/diyscience_spectrometer
https://makezine.com/go/spectrometer
From MAKE 14 – Page 134. To get MAKE, subscribe or purchase single volumes.
ADVERTISEMENT