From Noisebridge
Jump to navigation Jump to search

Introduction to dissolved oxygen

Why is oxygen important? For us humans, if we have oxygen, we survive...yay! If not, we don' So, superficially, this may not seem like a very important parameter to know - you either have oxygen, or you don't. However, for many microorganisms, there are a lot of shades of gray.

For a bacteria or a yeast, different amounts of oxygen produce different results. For instance, starving a yeast cell of oxygen produces ethanol as a metabolite product instead of carbon dioxide. Starving a lake of oxygen not only prevents fishies from living in it, but also promotes the formation of large algae surfaces. Cool, right?

The biggest problem with measuring dissolved oxygen currently is the cost of the equipment available to do it. Typically, dissolved oxygen probes run well into the $400+ range, thus placing them well out of the realm of hobbyists. The cost is not wholly unwarranted - dissolved oxygen meters used a platinum catalyzed reaction with very specific membranes to measure oxygen response. By cutting out the platinum catalyst and the specialized membrane, the cost of a DO meter could drop considerably...enter the optode!

Building a dissolved oxygen probe

How an optode works

In order to reduce cost, we'll be building a dissolved oxygen optode instead of the more common dissolved oxygen electrode.

In an electrode, a small change in a voltage or current is used to detect a change in oxygen concentration. In an optode, a small change in reflected light intensity is used to detect changes in oxygen concentration:

DO Electrodes.jpg

There are advantages and disadvantages to each system.

Properties of commercial dissolved oxygen electrodes:

  • Very robust - easily waterproofed
  • Very accurate
  • Need to recalibrate is rare due to non-reactive nature of the membrane and platinum
  • Very small amperages are produced - an amplifier circuit must be built at the amp meter position
  • Very, very expensive - $400 and up

Properties of commercial dissolved oxygen optodes:

  • Film must be intact for proper sensing - not as robust
  • Film must be permeable to oxygen, but impermeable to media (i.e. water)
  • Calibration is difficult - more frequent recalibration necessary due to film degradation
  • Chemicals in sensing foil respond at visual wavelengths, so background light can interfere with accuracy and precision
  • Very cheap components needed
  • No need for an amplifier circuit!
  • Commercial probes are very, very expensive - $400 and up as well, but based on the design components, could it be made for cheap?

Although the optode has several drawbacks that make it impractical for some uses, there are enough benefits in its simplistic design to make it a potential probe that can handle many situations for $20 or less!

Background & plans to overcome technical hurdles

Flourescent Film Material

Tris(4,7-diphenyl-1,10-phenanthroline)ruthenium(II) dichloride complex which changes color based on amount of oxygen present

The sensor film material must not only fluoresce when exposed to light, but it must also fluoresce at different intensity levels depending on the amount of oxygen in contact with the film. Thankfully, some really smart chemists have already thought of a material to do this...get ready...its a mouthful! The chemical is formally named Tris(4,7-diphenyl-1,10-phenanthroline)ruthenium(II). Since this is such a mouthful, we'll be referring to this chemical in the rest of the document as Ru(dppf) which is chemistry-speak for the above name.

Because ruthenium is a metal missing 2 valence electrons (that's the II in the full name for Ru(dppf)), you can only purchase this chemical in one of many complexes. A complex in chemistry is when ions of an opposite charge are associated to an already charged, but unstable molecule. This creates a bond that stabilizes the unstable molecule making it safe and/or easy to handle. Typically, the complexing agent doesn't change the properties of the molecule its bonded to - it just holds on for the ride.

For our application, choice of a complexing molecule isn't very important, so we found the cheapest complex of Ru(dppf) that we could, and ordered some! It happens to be the Ru(dppf) complex (shown to the right).

Our particular part is product number 76886 from Sigma-Aldrich, which at the time of this writing was selling for $59/mg. Yes. You read that correctly - per milligram! If this material is so expensive? How do we expect to make a dO sensor for cheap? Thankfully, we don't need much of it...1mg was enough for us to make 5-6 films to test, thus bringing the price of this chemical to only $10 - $12 per film. Not too bad when you consider a commercial probe costs in the $400 range!

Detecting Film Fluorescence

Now that we have identified a film material which we know will change color when exposed to varying oxygen levels, how will we be able to detect its change in color? Thankfully, the optical properties of Ru(dppf) are very well known and the manufacturer is very happy to provide technical information on their data sheet:

Emission spectra.jpg

The graph to the left is showing us two very valuable pieces of information. The curve near the left part of the graph is the absorbance curve. The higher this curve travels on the y-axis, the more light is absorbed by the Ru(dppf). When Ru(dppf) absorbs light, it immediately re-radiates it at a different color. The color that the Ru(dppf) emits is given in the right hand part of the graph known as the emission curve. Note that it does not emit a single wavelength of light - instead it is a range starting at ~550nm, and extending into the infrared spectrum.

What does it all mean? What this graph means is that if we can illuminate our Ru(dppf) film with a bright light which has a wavelength near 455nm, our film will respond by emitting quite a bit of light ranging from 550nm (orange) - infrared. Cool! If we take a quick peek into our electronics catalogue, we quickly find several high intensity blue LEDs with 470nm wavelengths for $1.40/each. Additionally, because infrared is such a popular frequency for use in remote controls, it is very simple to find phototransistors that are very sensitive to light near 940nm for only $0.35!

A phototransistor varies the amount of current flowing through the collector/emitter junction based on the amount of light impacting on the phototransistor's light sensing surface. The amount of current produced can very simply, and reliably be read by a using a voltage divider circuit plugged into one of our Arduino's A-D converters. Additionally, if we take a quick peek at the datasheet for the mentioned phototransistor, we can see that the listed phototransistor is extremely insensitive to light emitting at wavelengths lower than 500nm. Therefore, with a proper LED mount design, it may be possible to detect the orange light given off by the Ru(dppf) film without having to implement an optical filter...neato!

Film Permeability to Atmosphere

We need to ensure that the Ru(dppf) complex only senses oxygen change from the side of the film that our experiment is on, not the side of the film that the LEDs are on. Although this may seem to be a difficult problem at first, thankfully there are many polymers which have vastly differing oxygen diffusion properties. Additionally, it is very common that polymers list a number known as an oxygen diffusion coefficient. For super extra credit, and if you wanna be a chemistry geek, you can figure out what this means mathematically by studying Fick's law of diffusion. However, a short explanation of this will suffice for our needs.

The higher the value of the diffusion coefficient, the faster oxygen will move a certain distance. So, in order to block oxygen from getting to one side of the film, you want to use a film with a very small diffusion coefficient, and/or a thick layer of film. If you want to allow oxygen to easily transport through a film, use a thin film with a very high diffusion coefficient...simple as that!

For our project, we ended up using a 0.002" thick layer of mylar film ($1.90/foot) as the oxygen permeable film, and sandwiched our Ru(dppf) film between the mylar film and a ~0.5cm thick layer of clear vinyl adhesive ($3/tube...but you don't need much) as an oxygen barrier layer. Details on the construction of this film can be found below.

Water & Light Sealing

Since this device operates in the visual light spectrum, it must be sealed from ambient light in order to ensure low signal noise. Additionally, since the sensor is designed to measure dissolved oxygen, it must also be able to be submerged in a fluid. Although both these goals could be easily accomplished by building a custom mount on a mill or lathe, it would also make the overall device much less transferable to those without access to these expensive pieces of machinery.

Instead, I turned to the plumbing aisle of my local hardware store, and found enough elbows, o-rings, and PVC cement to make a water and light tight mounting structure for under $10 that can be assembled without any special tools or training! See details below in the build section.

How to build it

List of Supplies and links for purchase

Below is a list of links to the suppliers needed to get all the parts to build your own! Cost is listed on a per sensor basis, although you may have to buy more than the listed amount of cash from one supplier to get started.

Optode Film

Electronics and Control

Mount and Housing

Total Projected Cost: $22.07 (oh yeah...did I mention commercial probes cost in excess of $400?!

Safety and Hazard Stuff

  • Acetone (nail polish remover) is a solvent. Don't play with it around fire. Try to play with it in a ventilated area.
  • The Ru(dppf) complex doesn't have any specific hazards associated with it, so you can throw it away in small quantities at home. It will stain everything it touches bright orange like crazy though - gloves and/or bad clothes are handy.

Build the Mount

Step 1: When you are done, these need to fit inside the 3/4" CPVC compression coupling. These parts hold the LED and phototransistor needed to illuminate/measure the optode film. I decided to cut these pieces out of 3/4" thick scrap wood on a scroll saw. I traced 0.875" diameter circles onto a piece of wood, then got to work on a scroll saw:

2011-04-17 18.22.36.jpg

After sawing, I sanded down the edges to make the pieces pretty circles that fit snugly inside the 3/4" compression coupling. At this point, you should have 2x 3/4" diameter circles that fit snugly inside the 3/4" compression coupling. Check to make sure this is true!

Step 2: Using a drill press, I cut 1/16" holes for the LED and phototransistor leads. Additionally, I cut a 1/4" diameter hole to expose the phototransistor (which will sit below the blue LED). Note that holes do need to line up between layers, so using a drill press will make life easier. At this point, you should have something that looks like this:

2011-04-19 21.45.47.jpg

Step 3: Insert the LED and phototransistor into the holes to makes sure there is a good fit, and all the leads stick out the bottom of your mount. If this all checks out, wood glue the two layers together, fixing the position of the blue LED and phototransistor. It is important that the phototransistor be attached on the bottom layer to filter out excess light coming from the blue LED.

2011-04-19 21.47.13.jpg

Step 4: Get out your CPVC fittings and cut 2x ~3" length from your 1/2" CPVC pipe. Prime, then cement these fittings together in a zigzag shape (think tetris) to act as a light trap. Cement one side to a coupler. The below drawing should help with the description:

Pipe Diagram.jpg

Step 5: Attach the remaining 1/2" coupler to one side of the 1/2" CPVC pipe

Make the Film

Step 1: Dissolve your Ru(dppf) complex in ~1mL acetone (nail polish remover). Do not attempt to take the Ru(dppf) complex out of the bottle!! There is such a tiny amount in the bottle that you will surely lose a fair amount due to handling. Instead, add the acetone directly to the bottle the compound was shipped in, and confirm it dissolves. You should have a very bright orange solution without any particles in it. Using an eyedropper or something similar for this step will help immensely.

Step 2: Cut a ~1.5"x1.5" square of mylar filmfrom your stock mylar sheet using scissors.

Step 3: Using a hot glue gun, lay down a hot glue "circle" that is approximately 0.5" in diameter. This will act as a dam to prevent your acetone/Ru(dppf) mixture from spreading all over the film.

Step 4: Using an eyedropper, deposit ~1/5th of the amount of solution made in step 1 into the center of the circle. Allow this to dry uncovered until you can't see any solvent remaining. Overnight is not a bad idea. Do not use heat. Heat will not only cause the mylar film to distort, but it will also destroy the Ru(dppf) complex thus making it non-fluorescent! Do like your mom always told you and be patient. When you are done, you should have a film that looks something like the film on the right. The other films show what happens if you try to rush things. Note the hazy centers! You want a bright, non-hazy layer ideally:

2011-04-19 20.30.33.jpg

Learning and Important Information: This part of the project did not go so well. Trying to creating a uniform film in this manner is not a good idea as you can see in the pictures. In fact, due to the non-uniformity of the film, no reliable sensor measurement could be obtained :(. Several other ways of producing a thin film were attempted including:

  • Using a galvanized washer as a barrier instead so it could be removed (surface tension pulled the solution under the washer instead)
  • Using no barrier at all (the film became too thin to fluoresce)
  • Using 2 aluminum plates pressed on both sides to produce a thin film (the film became too thin to fluoresce in this situation too)
  • Constantly moving the mylar sheet to prevent movement of the solvent to the outside (there is no overcoming surface tension! This just didn't work)
  • Suggestions on solving this difficult problem would be desired! Knife coating, or some other de-facto coating mechanism is an option I considered here, but it would also require some specialized equipment that isn't available to everyone.

Step 5: After you are convinced the nail polish remover has evaporated, seal the top of the film (non-mylar side) with the vinyl glue. This prevents oxygen from reaching the reverse side of the optode film.

Step 6: Lastly, mount the film in the 3/4" compression housing. The film should sit over a coupler, with the mylar side facing the experiment. Pull the o-ring down over the sides of the film to create a waterproof barrier for the circuitry, then insert the coupler into the 3/4" compression housing (even though the sizes are mismatched, these fit together quite nicely, and are waterproof due to the rubber o-rings.

2011-04-19 20.29.22.jpg

Build the Circuit

Design the following circuit on a breadboard or a protoboard of your choice (note: arduino pin assignments can be changed, but the code is setup to use those listed by default):

Circuit diagram.jpg

Arduino code to blink the LED and read from the phototransistor is available here. A-D values are printed to the serial monitor in this implementation.

Assemble Everything

Make sure everything is working like it is supposed to - does the LED turn on? Does it illuminate the film? If it is all working, slide it into the the compression fitting (see the orange?? COOOOL!)

2011-04-19 20.37.33.jpg

After the mount is in place, screw both ends of the compression fitting on, and you've got a light proof, waterproof mount!


Making it cooler

So, I do need to bring this up one more time: This optode did not work. I'm 90% sure it had to do with not being able to produce a film of uniform coverage in a reliable manner. Suggestions here are welcomed! So, undoubtedly, this would be the way to make it waaaaay cooler.

In addition, this probe was not made with any type of calibration, so it would only be useful for tracking relative changes in dissolved oxygen in a single system. Adding a calibrated system to the arduino code would make results transferable probe to probe.

Geeking out

There is more than 1 way to use fluorescence to measure oxygen. Instead of using intensity of light produced (easiest to implement, but hardest to calibrate), you could instead measure the decay rate - i.e. the amount of time it takes for the film to go from illuminated to non-illuminated in the presence of no light. If you couple this with a red LED (which the film will not absorb), you have an internal standard that need not be calibrated for a very, very long time. Awesome! The problem is, this decay rate is very fast - on the nanosecond order, so the backend electronics would need to be more sophisticated. In addition, the red LED would likely not be properly filtered out by the phototransistor, thus requiring the need for a bandpass filter, raising complexity and cost.