Chameleon - Technical Description
Our instrument uses a high brightness light emitting diode (LED) for the light source. LED’s producing virtually any wavelength from 350nm out to beyond 1μm are inexpensive and readily available – the LED’s peak emission wavelength is specified in the middle of a Chameleon instrument’s designator.
An LM317L three terminal regulator is wired in a current source configuration to drive constant current through the LED.
In normal operation the LM317L has an internal reference that maintains a voltage difference of 1.25V between its ADJ and OUT pins. By connecting a resistor Radj between these pins, the LED current is accurately set to 1.25V/Radj. Most common LED’s have a maximum continuous current rating of 20-30 mA and Radj must be chosen to obey this constraint. Importantly, use of this regulator configuration allows source drift to be minimized.
The TSL230 Light-to-Frequency Converter
The detector in a Chameleon colorimeter is a TSL230 light-to-frequency converter, manufactured by AMS. Available for around $5, the TSL230 comes in a standard 8 pin DIP package and integrates a photodiode and a current-to-frequency converter on a silicon wafer.
The TSL230 produces a square wave output whose frequency is directly proportional to light intensity. The great advantage of this chip is that all its analog electronics are internal. Consequently, one needs only deal with external digital signals and circuit noise is not an issue when constructing the instrument.
The spectral response of the TSL230 peaks at 770 nm, with useful performance from 300 nm to 1000 nm. Using curves provided in the manufacturer's data sheets a measured frequency can be easily converted into an absolute irradiance in μW/cm2.
The light sensitive area of the TSL230 is a 10 x 10 pixel grid (total area of 1.36 mm2) and by activating either the whole area or various sub-regions of it a programmable sensitivity control can be implemented. The device also features a digitally programmable internal scaler that can divide the output frequency down by factors of 2, 10 and 100.
To operate the TSL230, power needs to be applied on pin 5 and pin 4 is grounded. Use of a capacitor is recommended on the positive supply rail to improve the stability of measurements. An on-board voltage regulator generates the necessary 5V from a DC input on the motherboard (see later).
Once powered, the TSL230 produces a TTL level square wave output signal on pin 6 (OUT), up to a maximum output frequency of 1.1 MHz. With a stated dark signal (frequency) of only 0.4 Hz on it's most sensitive range, this detector is capable of exceptional performance in terms of the dynamic range of absorbance measurements that are possible.
Pins S1 and S0 are used to control the TSL230 sensitivity. By setting (S1,S0) to 00 the TSL230 enters a power-down mode. The other three possible bit patterns are 01=1, 10 =2 and 11=3; these correspond to sensitivity settings of 1x, 10x and 100x, respectively.
Pins S3 and S2 control the TSL230’s internal scaler. When control codes of 00, 01, 10 and 11 are applied on these pins the output frequency is divided by 1, 2, 10 and 100, respectively. For a scaler setting of 00 the TSL230's output is a fixed-pulse-width (500 ns) pulse train while on each of the other settings, a 50% duty cycle square wave is produced.).
Colorimetric Detection PCB
A low cost 8-pin microprocessor (12F683) is used to control the TSL230’s sensitivity and scaler parameters. The chip's ROM is programmed according to which output mode (USB-serial or LCD interface) is required.
The 12F683 microprocessor has 6 I/O pins – two of these are reserved for external communications (Rx and Tx - labelled from the perspective of the PC end) and a third is dedicated to measurement of the TSL230 output frequency – leaving 3 I/O pins free. We use two of these I/O pins (P2 and P0) to set the sensitivity (S1,S0) as described above while the third I/O pin (P4) controls S2, with S3 on the TSL230 being connected to GND.
One pin on the microprocessor is used to output data from the detection system (P1) and another (P3) serves as an input to receive data controlling how the microprocessor sets the TSL230 mode.
In a computer-enabled Chameleon, digital data on both I/O pins is communicated as a serial data stream. When connected to a PC the USB-serial interface is provided by a TTL-232R cable (FTDI) that has a built-in FT232 chip that manages all the USB-serial conversion protocols.
In a stand-alone instrument the serial output directly drives a serial-enabled LCD display via the LCD pin P1.
Fluorometric Detection PCB
The detector PCB can be populated with an alternative detector when low light levels are to be measured. A photodiode generates a tiny photocurrent whose response is linear over many orders of magnitude of incident light intensity. This photocurrent needs to be greatly amplified and converted into a voltage before measurement by an analog-to-digital converter (ADC). This requires a current-to-voltage conversion step that is usually performed by a FET op-amp configured as a trans-impedance amplifier.
A second optical detector that makes this easy to implement is the TSL257 (AMS), a component in a 3 lead package that incorporates the photodiode and current amplifier circuitry on a single wafer.
The TSL257 is one of a family of light-to-voltage converters that require just a single rail power supply. It is extremely easy to use - the output signal varies linearly with light intensity up to a maximum value of ~4 volts. The TSL257 has an internal 320MΩ resistor in the feedback loop of its current amplifier stage, yielding a very high sensitivity - while its dark voltage is quoted as a modest 15 mV. This equates to a dark current of ~ 50 pA. Other members of the TSL25x family are available with lower fixed-current gains. The response curve peaks at 700 nm but the detector can be used over the 300 to 1100 nm spectral range.
Interfacing to the TSL257 is straightforward as it has only three external connections. Pin 1 of this chip is grounded and pin 2 is connected to 5V. The analog output signal (proportional to light intensity) appears on pin 3. For fluorometric detection exactly the same detector PCB is used but now with a TSL257 detector mounted in place of the TSL230 as shown in the schematic opposite.
With this detector option use is made of one of the 12F683’s four internal 10 bit analog-to-digital converters. As shown in the schematic, the output signal from the TSL257 is connected to P0, which is configured in software to be an analog input.
The source and detector PCB’s described above are mounted via 2 and 4-way right-angle style, single row PCB headers, respectively, to a circular PCB in positions that allow interposing a standard 1 cm cuvette.
There are two different locations at which the detector PCB can be placed, affording the possibility of either an in-line or a 900 source-detector geometry. The former arrangement is used for colorimetric experiments while the latter configuration is employed for fluorometry and nephelometry.
The final PCB assembly is secured by 4 nylon screws into the base of a delrin housing. A square cut-out in the top of this housing allows for insertion of a cuvette. In order to ensure accurate and repeatable cuvette alignment, a ball plunger mounted through the wall of the delrin housing pushes against one corner of the cuvette.
A mini DIN connector that mounts to the underside of the motherboard PCB brings in power, ground and input/output signals for connection either to an LCD display or via a USB to TTL cable for connection to a computer
Software for the different versions of Chameleon was developed in C using the CCS C compiler. This compiler generates hex files that can be used to program the various PIC microprocessors as required for each type of instrument. Only a brief description of the software is given here as potential builders of the instrument without such tools would just use pre-programmed chips. if you are interested email me directly (email@example.com).
When operating with a detector PCB placed at 900 to the source direction (ie in fluorescence or light scattering mode) we are only interested in the optical signal (as represented by either the analog voltage or digital counts) and no additional processing is required (apart from possible summation averaging). When performing colorimetric measurements in stand-alone mode with a fixed LED output current, the TSL230 sensitivity parameter is optimised according to the following algorithm.
On power-up the system first enters a calibration mode in which it loops over the range of sensitivity values (1x-10x-100x), setting the TSL230 sensitivity, counting pulses for a 50 msec period and storing each result into a “counts” table. Next, count ratios 10x/1x and 100x/10x are computed and stored into a separate “ratio” table.
A loop is next performed over the three possible sensitivity settings (1x, 10x and 100x) and if either (i) the count stored in the table exceeds 35000 in 50 msec (ie the output frequency is in excess of 700 kHz) or (ii) the ratio lies outside the range 8-12 the optimization is finished. Otherwise we move to the next sensitivity setting and continue the process since both the count rate and ratio are both acceptable at this sensitivity setting. All subsequent measurements are then performed with the final optimised sensitivity setting. Since the 12F683 internal counter has 16 bit resolution the choice of a 50 msec measurement interval ensures that the counter cannot overflow even at the TSL230’s maximum output frequency. Typical experiments use a total 1 sec measurement interval that is the sum of 20 such accumulations.
In the stand-alone instrument the user can toggle between blank (I0) and sample (I) measurements via use of an externally connected pushbutton switch (connected at P3 with a pull-up resistor to 5V); the readings are then used to compute the sample absorbance via Beer’s law. It was necessary to develop a custom log10 routine in order to squeeze the compiled program into the tight flash memory space of the 12F683 and for the same reason the absorbance was also computed in the form of a floating point subtraction A=log10(I0)-log10(I) rather than in the traditional form requiring floating point division. The final compiled code is a tight fit – using 97% of the ROM space of the 12F683.
As previously explained there are many occasions when a stand-alone instrument is preferred over a computer-controlled one but the design presented here offers the best of both worlds. Using the on-board mini DIN connector the user’s custom instrument can be connected directly to a serial LCD panel.
Recognizing that there are potential applications of this instrumentation (such as kinetics and flow-injection analysis) that require a source/detector pair with an additional data logging capability, a USB-to-TTL cable (FTDI) can also be connected to the mini DIN connector on the motherboard as described earlier so that the instrument becomes PC-enabled.
To make this possible a user-friendly LabVIEWTM graphical interface has been developed, allowing data to be recorded, displayed and saved into a file on a PC with minimal effort. The LabVIEWTM vi that controls the instrument is shown opposite.
After setting the TSL230 sensitivity, scaler and integration time, a blank is inserted and the ZERO SET button is turned on. This sets the absorbance to zero. After turning ZERO SET off, measurements can commence, with the absorbance displayed in the red text field, while raw intensity data is logged into a graph window.
In the run shown, an I0 value of ~ 750000 falls to 3000 when a sample is inserted, resulting in an absorbance reading of ~2.5. The process has then been repeated twice.
In summary, the instrument described here can be a colorimeter, a fluorometer or a nephelometer with or without a computer connection depending on how it has been configured and how the 12F683 control microprocessor has been pre-programmed. Small PCB’s have been developed to ease the assembly task and greatly reduce the chance of errors in doing so. With the appropriate pre-programmed microprocessor, LED and detector, a complete custom instrument takes less than an hour to build. In any of the configurations mentioned the total cost of a complete system is likely to be less than $100.