Design Resources

Design & Integration Files

  • Schematic
  • Bill of Materials
  • Gerber Files
  • PADS Files
  • Assembly Drawing
Download Design Files 780 kB

Evaluation Hardware

Part Numbers with "Z" indicate RoHS Compliance. Boards checked are needed to evaluate this circuit.

  • EVAL-CN0312-SDPZ ($288.37) Dual-Channel Colorimeter
  • EVAL-SDP-CB1Z ($116.52) Eval Control Board
Check Inventory & Purchase

Device Drivers

Software such as C code and/or FPGA code, used to communicate with component's digital interface.

AD7799 - Microcontroller No-OS Driver

AD7793 IIO Low Power Sigma-Delta ADC Linux Driver

Features & Benefits

  • Dual channel RGB colorimeter
  • High sensitivity low noise transimpedance amplifier
  • Programmable gain TIA

Circuit Function & Benefits

The circuit shown in Figure 1 is a dual-channel colorimeter that features a modulated light source transmitter and a synchronous detector receiver. The circuit measures the ratio of light absorbed by the sample and reference containers at three different wavelengths.

The circuit provides an efficient solution for many chemical analysis and environmental monitoring instruments used to measure concentrations and characterize materials through absorption spectroscopy.

The photodiode receiver conditioning path includes a programmable gain transimpedance amplifier for converting the diode current into a voltage and for allowing analysis of different liquids having wide variations in light absorption. The 16-bit sigma delta (Σ-Δ) analog-to-digital converter (ADC) provides additional dynamic range and ensures sufficient resolution for a wide range of photodiode output currents.

Using the modulated source and synchronous detector rather than a constant (dc) source, eliminates measurement errors due to ambient light and low frequency noise and provides higher accuracy.

Figure 1. Dual-Channel Colorimeter with Programmable Gain Transimpedance Amplifiers and Lock-In Amplifiers (Simplified Schematic: All Connections and Decoupling Not Shown)

Circuit Description

The AD8618 quad op amp forms three simple current sources to drive the LEDs with a constant current. The EVAL-SDP-CB1Z generates a 5 kHz clock that modulates one LED by using the ADG633 single pole, double throw (SPDT) switch to turn its current source’s reference voltage on and off. Setting the current sources for the other two LEDs to 0 V keeps them off while not in use.

The beam splitter sends half the light through the sample container and half the light through the reference container. The containers absorb different amounts of light depending on the type and concentration of material in each container. The photodiode on the opposite side of each container generates a small current proportional to the amount of light received.

The first stage of each channel consists of an AD8615 op amp configured as a transimpedance amplifier to convert the photodiode output current to a voltage. The AD8615 makes a good choice for a photodiode amplifier because of its very low input bias current (1 pA), input offset voltage (100 μV), and noise (8 nV/√Hz). Although the signal is later ac-coupled, it is still important to minimize dc errors in this stage to avoid losing dynamic range. The op amp input bias current multiplied by the feedback resistor value appears at the output as an offset voltage. The op amp input offset voltage appears at the output with a gain dependent on the feedback resistor and the photodiode shunt resistance. In addition, any op amp input voltage offset appears across the photodiode, causing the photodiode dark current to increase.

Figure 2 shows a typical transimpedance amplifier with a single feedback resistor and its ideal transfer function.

Figure 2. Transimpedance Amplifier Transfer Function


Because some solutions under test may have very strong absorption characteristics, it is sometimes necessary to use large feedback resistors to measure the very small currents generated by the photodiode, while at the same time being able to measure the large currents corresponding to the highly diluted solutions. To address this challenge, the photodiode amplifiers in Figure 1 include two different selectable gains. One gain is set at 33 kΩ, while the other is set at 1 MΩ. When a single SPDT switch is connected to the output of the op amp to switch the feedback resistors, it can result in a transimpedance gain error due to the on resistance of the ADG633.

To avoid this problem, Figure 3 displays a better configuration where the ADG633 inside the feedback loop selects the desired resistor, while a second switch connects the next stage of the system to the selected feedback loop. The voltage at the output of the amplifier is


instead of


which represents a gain error. However, because one of the ADG633s is outside the feedback loop, the output impedance of this stage is the on resistance of the ADG633 (typically 52 Ω), rather than the very low output impedance associated with the output of an op amp in closed-loop operation.

Note that the feedback capacitor, CFx, is required for stability to compensate for the pole introduced by the total input capacitance (diode capacitance plus op amp input capacitance) and the feedback resistor, RFx. For details of this analysis, see Section 5 of Practical Design Techniques for Sensor Signal Conditioning.

Even the best rail-to-rail output amplifiers like the AD8615 cannot swing their output completely to the rails. In addition, the input offset voltage on the AD8615, although very small, can be negative. Rather than including a negative power supply to guarantee that the amplifier never clips, and so that it can drive to 0 V, the ADR4525 reference biases the photodiode and amplifier at 2.5 V. A 5 V linear regulator provides power to the analog and digital sections of the board.

Figure 3. Programmable Gain Transimpedance Amplifier


The output voltage of the photodiode amplifier swings between 2.5 V and 5.0 V. For the 33 kΩ range, this 2.5 V output span corresponds to a full-scale photodiode current of 75.8 μA. For the 1 MΩ range, it corresponds to a full-scale photodiode current of 2.5 μA. When operating in the 1 MΩ gain setting, it is important to shield the photodiode from external light to prevent the amplifier from saturating. Although the synchronous rectifier described in the following paragraphs strongly attenuates any frequencies that are not synchronous with the LED clock, it cannot function properly if the previous stages are saturated.The gain setting for each channel is independently selectable through the EVAL-SDP-CB1Z board.

The next stage is a simple buffered ac-coupled filter. The cutoff frequency of the filter is set at 7.2 Hz; it removes any output offset voltage, and attenuates low frequency light pollution from incandescent and fluorescent lights and any other stray light entering the photodiodes. The output of the ADR4525 also biases this circuit at 2.5 V; therefore, the output signal swing of this stage is nominally from 1.25 V to 3.75 V.

The circuit that follows the ac-coupled filter is a synchronous rectifier built with an AD8271 difference amplifier and an ADG733 triple SPDT switch. The switches within the ADG733 are in series with the internal 10 kΩ gain setting resistors of the AD8271; therefore, the 4.5 Ω maximum on resistance of the ADG733 results in only a 0.05% gain error and less than 1 ppm/°C of temperature drift.

The rest of the system uses ADG633 switches because of their very low leakage currents and low parasitic capacitance.

When the clock driving the LEDs is in a high state, the switches within the ADG733 configure the AD8271 for a transfer function of simply



VO is the output of the synchronous detector.

VIN is the input to the synchronous detector, and it ranges from 2.5 V to 3.75 V.

With this configuration, the synchronous rectifier acts as a unity-gain amplifier.

When the clock driving the LED is in a low state, the switches within the ADG733 configure the AD8271 for a transfer function of



VREF is the 2.5 V output from the ADR4525.

VIN ranges from 1.25 V to 2.5 V.

In this case, the output of the synchronous rectifier is 3.75 V when the input is 1.25 V (the smallest output voltage possible from the ac-coupled stage) and 2.5 V when the input is 2.5 V (midscale out of the ac-coupled stage). In this configuration, the synchronous rectifier has essentially a gain of −1, biased around the +2.5 V reference voltage.

Figure 4. System Block Diagram and Time-Domain Waveforms at Each Step


Figure 4 shows a block diagram of the system with the voltage range at each stage. The result of the synchronous rectifier circuit is a dc voltage that varies from 2.5 V when no light arrives at the photodiode to 3.75 V for a full-scale light input. This output voltage corresponds to a full-scale output swing of 1.25 V.

The circuit filters out signals at frequencies that are not synchronous to the LED clock (or its odd harmonics, because the clock is a square wave). In the frequency domain, the low-pass filter on the output of the AD8271 looks like a band-pass filter around the LED clock frequency. The lower the bandwidth of this filter, the more the synchronous rectifier rejects the out-of-band noise. The cutoff frequency of this filter is set to 16 Hz as a compromise between noise rejection and settling time. It is important to note that the bandwidth of this filter is around the LED clock. For example, if the LED is modulated at 5 kHz, the 3 dB pass band of the synchronous detector is from 4.984 kHz to 5.016 kHz.

The final stage of the system is the AD7798 low noise 16-bit Σ-Δ ADC. This ADC has a built in programmable gain amplifier (PGA) with a differential input. Connecting the 2.5 V reference voltage to the AIN− terminal and setting the PGA gain to ×2 allows it to map the 2.5 V to 3.75 V output of the synchronous rectifier to a full-scale 16-bit output. In addition, the output filter of the AD7798 provides a minimum of 65 dB of rejection at 50 Hz and 60 Hz, further attenuating any noise from the synchronous detector.

To verify that the front-end circuitry does not contribute significant noise to the system, data was acquired with the LEDs disabled. The synchronous detector still operates at the LED clock frequency; however, no light synchronous to this clock is detected. Therefore, it removes all dc and ac signals except for the errors from the AD8271 and the ADC. Figure 5 shows the noise in this configuration, which is less than 1 LSB for one of the channels (ADC input centered between two codes) and 1 LSB peak-to-peak for the other channel (ADC input in transition region between adjacent codes). In addition, notice that the measured voltages are negative by a few microvolts, which is the expected behavior described in the AD8271’s typical distribution of the offset error.

Figure 5. ADC Voltage with LED Sourced Disabled

Common Variations

Changing the values of the feedback resistors on the photodiode amplifiers changes the amplifier gains. This is an easy way to customize the circuit for a specific application with different light levels. However, the compensation capacitor must also be changed to maintain the same bandwidth and guarantee the amplifier is stable.

For systems measuring extremely low levels of light, the cutoff frequency of the synchronous detector’s output low-pass filter can be set to a much lower frequency for the highest performance at the expense of long measurement cycle times.

Because the light output of the LEDs changes with temperature, the system makes measurements as a ratio of the sample and the reference channels. The photodiodes have a gain tolerance of up to ±11%; therefore, even ratiometric variations include some drift as the LED output changes with time and temperature. Adding an optical feedback loop to control the amplitude, the LEDs greatly reduce light variations with temperature and may even make it possible to make accurate single-channel measurements. Figure 7 shows the ratio of readings from the reference channel to the sample channel during a typical 200 sample acquisition time window.

Figure 6. Ratio Readings After Calibration (Red LED Enabled and Distilled Water in Sample and Reference Containers)

Circuit Evaluation & Test

This circuit uses the EVAL-CN0312-SDPZ evaluation board and the EVAL-SDP-CB1Z system demonstration platform (SDP) evaluation board.

The CN-0312 Evaluation Software communicates with the EVAL-SDP-CB1Z to capture data from the EVAL-CN0312-SDPZ.

Equipment Needed

The following equipment is needed:

  • A PC with an USB port and Windows® XP or Windows Vista (32-bit), or Windows 7 (32-bit)
  • The EVAL-CN0312-SDPZ.
  • The EVAL-SDP-CB1Z evaluation board (SDP)
  • A 6 V dc to 12 V dc, 500 mA power supply
  • The CN-0312 Evaluation Software
  • Distilled water and test liquid samples

Getting Started

Load the evaluation software by placing the CN-0312 Evaluation Software into the CD drive of the PC. UsingMy Computer, locate the drive that contains the evaluation software and open the Readme file. Follow the instructions contained in the Readme file for installing and using the evaluation software.

Functional Diagram

A functional block diagram of the test setup is shown in Figure 8. The EVAL-CN0312-SDPZ-SCH pdf file gives the complete circuit schematic. This file is contained in the CN0312 Design Support Package.

Figure 7. Test System Functional Diagram



Bend the leads on the photodiodes at 90° and insert them into D2 and D3. Refer to Figure 8 for the correct orientation of the anode terminal on each photodiode.

Once installed, ensure that the photodiodes stand approximately 15 mm from the printed circuit board (PCB).

Connect the 120-pin connector on the EVAL-CN0312-SDPZ to the CON A connector on the EVAL-SDP-CB1Z. Connect an external 6 V dc to 12 V dc power supply to J2 on the EVAL-CN0312-SDPZ and connect the USB cable supplied with the EVAL-SDP-CB1Z. between the USB port on the PC and the EVAL-SDP-CB1Z. The EVAL-SDP-CB1Z derives its power from the USB port on the PC.


Turn on the power to the external power supply and launch the evaluation software. The software is able to communicate to the EVAL-SDP-CB1Z if the Analog Devices, Inc., System Development Platform driver appears in the Device Manager. Once USB communications are established, the EVAL-SDP-CB1Z can send, receive, and capture serial data from the EVAL-CN0312-SDPZ.

The CN-0312 Evaluation Software Readme file contains information and details regarding how to use the evaluation software for data capture. The SDP user guide (UG-277) contains information regarding the EVAL-SDP-CB1Z.

The system requires an initial calibration to compensate for misalignment between the LEDs, beam splitter, and photodiodes, as well as to compensate for any mismatch in the response of the photodiodes. To calibrate the system, fill the two containers with distilled water and insert them into the square holes in the PCB. Select the 33 kΩ gain for both channels and select Initiate Calibration Sequence within the Calibration pull-down menu. The software turns on each of the three LEDs one at a time and measures the received light reaching the reference and sample photodiodes. The software calculates a multiplier for each LED color, so that 


where K is the calculated calibration constant. After performing a calibration, the software uses the calibration constants in all subsequent measurements.

In the field of spectroscopy, absorbance is defined as the logarithmic ratio of the light reaching the material under test to the light transmitted through the material. The Beer-Lambert law states that the amount of light transmitted through a material decreases exponentially with increasing path length and concentration. By defining absorbance as a logarithm, it is directly proportional to the concentration of the material (given a constant path length)

Figure 8. Absorbance Line for Yellow Number 5 Dye Under 470 nm Light


For a simple way to verify this theory without resorting to harmful chemicals, measure the concentration of dye used for food coloring. Figure 9 shows experimental results from different concentrations of yellow Number 5 dye when measured with the EVAL-CN0312-SDPZ. Yellow solutions strongly absorb blue light; therefore, the measurements were taken using the blue (470 nm) LED as the source. The x-axis shows the volume concentration (which is in terms of milliliters of dye per milliliter of water; therefore, it is unit less), and the y-axis shows the absorbance. As predicted by the Beer-Lambert law, the absorbance varies linearly with concentration.

In addition to concentration measurements, this board can also characterize and identify materials based on their light absorption at different wavelengths. Select Analyze Sample within the Automated Data Collection pull-down menu, to measure each color and display the results on the front panel. It is possible to build a database of known substances and then match unknown samples to the substances in the database. For example, it is common to use pH measurement solutions that change color according to their pH. By building a database of known pH levels, the system can identify the color of a sample and match it to the correct pH level.

Figure 9. Photo of EVAL-CN0312-SDPZ and EVAL-SDP-CB1Z

Sample Products

Evaluation Boards

Pricing displayed is based on 1-piece.

Up to two boards can be purchased through Analog.com. To order more than two, please purchase through one of our listed distributors.

Pricing displayed is based on 1-piece. The USA list pricing shown is for budgetary use only, shown in United States dollars (FOB USA per unit), and is subject to change. International prices may vary due to local duties, taxes, fees and exchange rates.