# Ambient light rejection from photodetecting circuit

I've built a photodetecting circuit as below:

simulate this circuit – Schematic created using CircuitLab

And with this circuit, I'd like to measure brightness of a blinking LED:

From the left, light pass through 500 nm shortpass filter and hit the photodiode.

A problem is, ambient light reading is too high no matter when the LED is turned on or not (yellow line) as drawn with the blue line:

I have to limit a range of brightness reading from -1.5 to 1.5 V to feed it into another equipment which have a such input range. Thus, I can't replace R1 with a larger one to get a larger voltage difference between LED-ON and LED-OFF state until ambient light is filtered out.

With my little knowledge, it seems that it can be done by placing a pF-capacitor at some point in the circuit.

When I searched for ambient light rejecting circuit, however, they seem very complicated than what I expected.

Is there a way to eliminate DC component of brightness reading and amplify non-DC component of brightness reading?

• The simple solution is an optically dark box around the reciever .. – pjc50 Jul 18 '15 at 14:22
• Yes... that's right.... – Jeon Jul 18 '15 at 14:23

Basically you need a high pass filter. The frequency rolloff depends on what the slowest valid frequency in your signal is.

Since the DC offset can be large relative to the amplitude of the AC component you are trying to detect, you don't want too much gain before the filter. Your circuit is a transimpedance amplifier with R1 being the gain. Find what the maximum current thru D1 will be under any conditions, then size R1 so that this stage does not clip with that current.

You are running the opamp from a 5 V supply, with the output voltage going up from 0. Even if that amp can swing its output all the way to the positive rail (I haven't looked up that specific amp), then the output can go to 5 V at most. That means this circuit works with D1 currents up to (5 V)/(200 kΩ) = 25 µA. If that is too low for all conditions D1 will be exposed to, then R1 is too high.

Basically, lower the gain of this first stage by lowering R1. You can get whatever gain you really want by adding a second stage, but insert a high pass filter between the two stages. That way, the second stage won't amplify the ambient level, only the desired AC signal. The purpose of the first stage is to create a nice buffered voltage signal with reasonable range from the raw detector, not to produce the final output.

I'm assuming that you are running your LED at about a 90% on/10% off ratio. Your biggest single problem is not the ambient (although that might wind up the case), it's C3 (1 uF). This will combine with R1 to give a response time constant of 0.2 seconds. Since your LED is only off for about 2 msec, you have no faint idea what the ambient level is.

Try reducing C3 to 1000 pF, or even 100 pF, checking to make sure the circuit doesn't start oscillating. Even with your layout, I suspect 100 pF will work.

I would also decrease your timebase to a 20 msec scan - you don't need all those extra pulses.

I recommend that you change your grounding strategy. Use a short jumper to connect both sides of row 31 together, jumping just below pins 4 and 5. Make all your signal and decoupling connections to this strip, along with the ground point connections for your scope probes. Also change your decoupling capacitors to 0.1 uF ceramic capacitors.

Finally, whatever your final determination of ambient is, you can compensate by adding a resistor from power to the inverting input via a large resistor (500k to 100k) without affecting the dynamic performance of the circuit.