Simple Ambient Light Sensor Circuit

Ambient light is increasingly considered as a source for harvesting energy to power heartbeat monitors, bathroom fixtures, remote weather sensors, and other low-power devices. At the heart of an energy-harvesting system is the ability to measure ambient light accurately. This design idea describes a simple, cost-effective circuit that provides a voltage proportional to the intensity of ambient light.

The sensor is a light-dependent resistor (LDR)—photoresistor Model 276-1657 from RadioShack—which has a resistance that varies with ambient light intensity, as shown in Figure 1. Its resistance decreases from millions of ohms in darkness to a few hundred ohms in bright light. Able to detect large or small fluctuations in light levels, it can distinguish between one or two light bulbs, direct sunlight, total darkness, or anything in between. Each application requires an appropriate circuit and physical setup, and some calibration may be required for the exact lighting scenario encountered. The sensor can be mounted in a clear, waterproof enclosure and, thus, deployed in any field of operation under all weather conditions.

Figure 1
Figure 1. Sensor resistance vs. light intensity.
Figure 2
Figure 2. Simple circuit measures light intensity.

The circuit shown in Figure 2 provides an output voltage that responds to both the input voltage and the light intensity, with the photoresistor serving as the gain resistor for the AD8226 instrumentation amplifier (in-amp). The transfer function of the AD8226 is:

Equation 1

Where G is the circuit gain, VIN+ and VIN– are the voltages at the positive and  negative inputs, respectively, and VREF is the voltage at the REF pin. With the negative input and REF pin grounded, and VIN+ applied to the positive input, the gain is:

Equation 2


Equation 3

When the value of LDR is known, it can be translated to the illumination level. Thus, the task becomes one of monitoring the output of the in-amp with a known applied input voltage. VIN+ can be an ac voltage, a dc voltage, or a scaled version of the power supply. Note that the gain accuracy depends on the accuracy of two internally trimmed thin-film resistors.

This circuit offers a cost-effective way to measure ambient light by converting the resistance of the photoresistor to a voltage that can be measured at a remote location. The AD8226 was chosen because of its wide power supply operating range (2.7 V to 36 V), low quiescent current (less than 500 µA over the full power supply range), rail-to-rail output, and functional completeness. The circuit can handle any gain resistor from a few ohms to infinity. As instrumentation amplifiers become less expensive, their improved performance makes them ideal replacements for operational amplifiers.

Figure 3 shows the typical response of this circuit using a 100-mV p-p, 900-Hz sine wave as VIN+. The light and dark values of LDR can be seen as ~840 Ω and ~5500 Ω. These resistance values can be translated into light levels, using the calibration of the LDR.

Figure 3
Figure 3. The performance of the circuit in a room with light and dark ambient conditions.


Chau Tran

Chau Tran

Chau Tran joined Analog Devices in 1984, where he works in the Instrumentation Amplifier Products (IAP) Group in Wilmington, MA. In 1990, he graduated with an M.S.E.E. degree from Tufts University. Tran holds more than 10 patents and has authored more than 10 technical articles.


Paul Mullins

Paul Mullins is a product/test engineer for the Integrated Amplifier Products Group at Analog Devices, in Wilmington, MA. He joined the company in 1994 and is responsible for product characterization and test development of precision signal-processing components. Paul holds a BSEE from the University of Massachusetts, Lowell.