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.
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:
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.
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:
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).