Tuesday, 12 July 2016

DIY fluorometer for detecting oil pollution in water

The citizen scientist community, which in the United States has its roots in the gulf oil crisis, has been interested in measuring the amount of oil in water to track pollution like oil spills. One test kit that has been developed by the organisation Public Lab uses a laser and a webcam spectrometer to measure the fluorescence of different oils in order to identify the type of oil (https://publiclab.org/wiki/oil-testing-kit).
This is useful for identifying different types of oils but quantifying the amount of oil in a sample is also needed to track its spread and quantify the degree of pollution. However, detecting oil in water is difficult as the two separate. The standard method in the lab is to use a solvent (tetrachloroethylene ASTM D7066-4) to extract the oil from the water. Once extracted, either fluorescence (where the oil is illuminated with UV light and glows green/red) or infrared absorption of the C-H bond can be used to measure the amount of oil in the sample.

Figure 1 - Infrared transmission spectra of solvent without (left) and with (right) oil added. The band at 3000 cm-1 corresponds to vibrations in the C-H bonds which the solvent doesn't have and is used to quantify the amount of oil in the sample. (source: patent US4164653-2)

Figure 2 - Fluorescence spectrum from different oils excited with UV light (308 nm). (source)

The problem with these methods is that the equipment needed to perform the measurement costs a considerable amount, 500-1000 USD for a second-hand Fourier transform infrared spectrometer or a second-hand fluorometer on Ebay. I had done some work on making low-cost colourimeters using LEDs before and so I thought building my own fluorometer would be a good place to start.

I started by taking my multimeter colourimeter and measuring the voltage of a green LED, using it as a photodiode. There was a signal for highly fluorescent compounds such as vitamin B12, but it was very weak and would not be sensitive to small amounts of oil. One option was to construct an amplifier circuit, however this incurs a high assembly cost. I stumbled across this instructable on how to construct a very sensitive light sensor from a TSL237 light to frequency converter, which has a photodiode along with a built-in amplifier and voltage to frequency converter: (http://www.instructables.com/id/Highly-sensitive-Arduino-light-sensor/). This light sensor is very sensitive but what is more helpful is the conversion of the light intensity into frequency - a microcontroller like the Arduino is much better at measuring a frequency than a voltage. This means you can plug the sensor directly into an Arduino and take very accurate readings by converting the frequency to an illuminance value. The sensor only costs about 3.33 USD and is probably the most accurate sensor you can buy for that price.

After finding an accurate sensor, the other problem is the use of solvents. These are hard to source, require fume cupboards and are not safe for use at home. I found a solvent-free method online to extract oil from water, from the company Turner Designs, which makes fluorometers. The procedure consists of adding a solution to the oil and water mixture, heating it until it became cloudy and then cooling it down until it became clear and the oil is dispersed throughout. Certain detergents will drop out of solution when their temperature is raised. This only works for detergents that are not charged; heating an uncharged detergent interrupts the detergent-water interactions and causes them to no longer be soluble in water, the opposite of what you would expect. We had some Triton X-100 in the lab which is a non-ionic surfactant (detergent) with a cloud point of ~65 degrees C. Triton X-100 is safe to use and very cheap to buy. I prepared a 0.1% solution of Triton X-100 and added a small amount of olive oil, which has a good light emission at the wavelength where crude oil emits light. As such, this oil could be used as a standard for crude oil measurements.

Figure 3 - Drops of olive oil floating on 0.1% Triton X-100 in water (left). Heating above the cloud point (70 degrees) (right) it becomes opaque; upon cooling it becomes completely clear.

I bought some TSL237 light-to-frequency converters from RS and used some Veraboard to solder one to some wires to attach to the Arduino. I also attached a 405 nm LED with a resistor (220 Ohms) between 0 and 5V of the Arduino. I used four layers of green cellophane which allow through ~500 nm, the peak of the emission, and block out the UV light from the LED. I found that four layers were necessary to block the UV LED to the point where it was not picked up and without any sample added the reading was the same whether the LED was on or off.
Figure 4 - Veraboard circuit which connected the light sensor and LED to wires, which plugged into the Arduino. It is attached to a laser cut colourimeter, and to my laptop.

I made use of the great Freqperiod library to measure the frequency, a software library for Arduino that is designed to measure frequencies below 20 kHz. It measures frequency in Hertz to six decimal places. There are other libraries to measure above 20kHz that means that by changing the software you can measure a huge dynamic range of light intensities. (http://interface.khm.de/index.php/lab/interfaces-advanced/frequency-measurement-library/) Most of the readings were in the hundreds of Hz. Full room lights were 20kHz while the maximum reading the sensor can do is 1000kHz (see Figure 5).
Figure 5 - Frequency vs. light irradiance (left) and response curve (right) taken from the datasheet for the TSL237 light-to-frequency converter. 

Below are the readings for different samples. The filter attenuated a lot of the light. The next improvement is to buy a better filter. In fluorescence measurements large lenses are often used to collect as much light as possible. So integrating a lens could also help, however all of these additions increase the cost of the unit. 

SampleFrequency (Hz)
Triton X-10045.0±0.2
100 ppm olive oil55.1±0.2
1000 ppm olive oil62.3±0.2
Pure olive oil5985
Room lights20,000

Figure 5 - Olive oil excited with 405 nm LED emitting red light. The decay of the red emission into the olive oil indicates it is saturating and absorbing all of the light before it can reach the other side of the cuvette. This leads to incorrect readings; for an accurate reading the olive oil would need to be diluted. 

Measuring the stability of the reading over time gives a fairly narrow band of frequencies with a deviation of only ~0.2 Hz. The readings are stable enough to compare samples ranging from 100 - 1000 ppm. With a better filter, there is potential to detect samples of under 100 ppm. 
Figure 6 - Measurement over a few minutes (inset top) with the histogram of frequency readings (top) and fitting to a normal distribution (perhaps log-normal would've been better) giving a width of 0.2 Hz.

The next step is to integrate it into an Arduino shield. The cost of something like this would come down to the price of the Arduino but because you only really need one pin to measure the frequency you could use something like the Adafruit trinket (6.95 USD) and make the whole thing for under $20. Any interest in helping to do this would be greatly appreciated as I have left all of my soldering supplies in New Zealand (I now live in Cambridge, UK). 

Figure 7 - Diagram of a shield for an Arduino Micro, with an added RGB LED for optical absorption measurements on the same device. In order to take a reading, a box would be needed to put over the device, or a 3D printed holder for the cuvette could be designed.

Another interesting application is in water testing. Turbidity is an important measure of water health and my biology friends tell me it is very important as fish can't see their prey if the water is cloudy. This accurate light sensor could be used to measure turbidity. A student and I have also been working on using milk as a standard for preparing turbidity standards to calibrate the measurement. Anyway, there is more to come on this. If anyone is interested in helping out or if you have any questions, please let me know in the comments.