Gas station without pumps

2014 March 2

Colorimeter design—weird behavior

In Colorimeter design—almost working, I talked about the prototype colorimeter made out of foamcore, and the non-linear behavior of its phototransistor circuit. I suggested some possible reasons for the non-linearity, and I tried experiments this weekend to try to remove the problems.

The first thing I did was to remake the dilution series, with one drop of blue food dye in 10ml of distilled water for the highest concentration, then twofold serial dilution to get 1/2, 1/4, 1/8, 1/16, 1/32, 1/64, and 1/128, each in its own cuvette.

The next thing I did was to make a transimpedance amplifier (current-to-voltage converter), so that I could have a constant voltage across the phototransistor, even as the current changed. I also made it so that I could swap out the phototransistor and use a photodiode instead, to see if that gave me more linear behavior.

LED circuits and transimpedance amplifiers for phototransistor and photodiode. The phototransistor amplifier has a gain of 100kΩ, and the photodiode one a gain of 22.4MΩ.  Only the 627nm LED has been tested so far. Both are intended for differential (E20–E21) analog-to-digital conversion.

LED circuits and transimpedance amplifiers for phototransistor and photodiode. The phototransistor amplifier has a gain of 100kΩ, and the photodiode one a gain of 22.4MΩ. Only the 627nm LED has been tested so far.
Both are intended for differential (E20–E21) analog-to-digital conversion.

I have not yet managed to get full-scale range with the phototransistor—the 1/64 and 1/128 dilutions often come out having lower absorbance than the blank! I did manage to get some decent series with the photodiode:

I began and ended with a blank (distilled water only) cuvette.  The difference between the beginning and the ending values is fairly large (an absorbance of about 0.02), and probably reflects changes in alignment of the optical components, which are not very rigidly held by the foamcore.

I began and ended with a blank (distilled water only) cuvette. The difference between the beginning and the ending values is fairly large (an absorbance of about 0.02), and probably reflects changes in alignment of the optical components, which are not very rigidly held by the foamcore.

The high gain on the photodiode transimpedance amplifier causes another problem: 60Hz pickup from capacitive coupling. I get a 60Hz signal that is quite large compared to the DC signal I’m interested in. Adding a 0.022µF capacitor in parallel with the 5.9MΩ resistor got rid of most of the 60Hz noise (a corner frequency of about 1.2Hz). It may be better to use 0.01µF, for a corner frequency of 2.7Hz—that seems to work fairly well also, and may give a bit better time-domain response to changing absorbance.

My first calculation of the desired capacitor size was way off (what I get for doing it in my head instead of with a calculator).  Using only a 100pF capacitor did not reduce the 60Hz noise.

My first calculation of the desired capacitor size was way off (what I get for doing it in my head instead of with a calculator). Using only a 100pF capacitor did not reduce the 60Hz noise.

Adding a 0.022µF capacitor in parallel with the 5.6MΩ resistor did clean up the 60Hz noise.

Adding a 0.022µF capacitor in parallel with the 5.6MΩ resistor did clean up the 60Hz noise.

The values from three runs (no capacitor, 100pF, and 0.022µF) were monotonic (except for one or two measurements of 1/64 and 1/128), fairly consistent, and substantially larger than the error in the re-reading of the blank cuvette, so I tried plotting them against the relative concentration:

 Three different sets of measurements with the photodiode colorimeter. Ideally , the measured absorbance should be linear with the concentration, but I am getting a relationship that looks more like the square root of concentration!

Three different sets of measurements with the photodiode colorimeter. Ideally , the measured absorbance should be linear with the concentration, but I am getting a relationship that looks more like the square root of concentration!

I’ve been getting pretty frustrated with this design, as I have no idea where the non-linearity is coming from.  I’ve checked that both Beer’s Law and the current from a photodiode refer to the same measure of light intensity (W/cm2).

The non-repeatability of the measurements (which is probably due to changes in the light path from movement of the LED and photodiode) also limits the usefulness of this colorimeter.  If I could figure out was going wrong with the light measurement and conversion to absorbance, I could probably fix the changing light path by making a new holder out of sturdier materials—drilling 3mm holes in wood or aluminum is pretty simple.

I did try to do some debugging—the problem is not in the Freedom board or the software, as the voltages reported by the Freedom board are consistent with ones measured with a multimeter, and calculating absorbance from the multimeter measurements gives me the same numbers as the program on the Freedom board (within measurement errors).  The dilution series looks good—if I stack cuvettes,  1/2+1/4+1/8 is almost as dark as 1/1 (and similarly for other combinations).  That leaves only my understanding of how photodiode currents are generated and how transimpedance amplifiers convert current to voltage as potential failures (unless I’m missing something obvious).

About these ads

3 Comments »

  1. […] the idea some more last week, using a transimpedance amplifier to convert current to voltage (as in Colorimeter design—weird behavior). I can easily get enough gain to see pulse for a 700nm LED shining through a finger, but I listed […]

    Pingback by New phototransistor lab | Gas station without pumps — 2014 March 16 @ 00:56 | Reply

  2. Here is an interesting article that I came upon while looking for information about LED-based colorimeters…

    That same search brought me to your blog…

    http://koreascience.or.kr/search/articlepdf_ocean.jsp?url=http://ocean.kisti.re.kr/downfile/volume/chemical/JCGMCS/2013/v34n10/JCGMCS_2013_v34n10_3150.pdf

    Comment by Richard Hardenstein — 2014 March 29 @ 18:40 | Reply

    • That is a very similar design to what I was trying, but using an LED as a photodiode, instead of using a phototransistor. I’m still trying to figure out why my results were non-linear. I’ll probably try with a photodiode when I have some spare time.

      Comment by gasstationwithoutpumps — 2014 March 29 @ 18:48 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 268 other followers

%d bloggers like this: