Help with transimpedance amplifier for IR receiver

Thread Starter

skyjive

Joined Jul 9, 2011
11
Hi all,

I am working on a project where I need to transmit a series of pulses at 50% duty cycle by IR. The transmitter is composed of a 555 astable oscillator which sends its output through an IR LED, and that works just fine. The receiver is giving me no end of trouble, however. Using an unamplified photodiode or phototransistor the signal is getting through but so weakly the range is only a few inches (unsurprising w/o amplification). So I tried using a transimpedance amplifier set up as follows:



At up to about a foot range, I can measure the appropriate signal (which varies between 2.5 and 50 kHz) across the 91k resistor, but with an amplitude of only a few millivolts. I can't measure any voltage signal being generated at Vout with respect to ground. My understanding is that the amplifier is supposed to produce a voltage at Vout that is the product of the photodiode current and the 91k resistance, but this does not appear to be happening. Also, why is my range so limited? I have four decent sized IR LEDs in series so I thought I would get decent range. Can anyone tell me what I'm doing wrong, or recommend another way of amplifying an IR signal? Thanks very much.
 

Adjuster

Joined Dec 26, 2010
2,148
There are a bunch of possibilities. First the 741 is a slow device, and may not be up to responding at whatever pulse rate you are using.

Then the power supplies may be wrong, in that you would need both positive and negative rails to bring a 0V-returned input within the common-mode input voltage range of a non rail-to-rail input device like the 741.

Next, your diode gets zero bias in this circuit. That's OK with some devices, not for others, and in any case generally maximises junction capacitance. Applying a negative bias to the diode may give better results, although dark (leakage) current may become apparent.
 

Thread Starter

skyjive

Joined Jul 9, 2011
11
Thanks for your input. Since I'm seeing a signal (albeit a clipped one) across the resistor, I assume that the 741 is adequately fast. My power supply uses 2 9-volt batteries such that +9 volts goes to the positive supply of the op amp and -9 volts goes to the negative supply.

As for the diode bias, that's a good point that its zero biased. How would I reverse bias it in this circuit?

And more generally, am I on the right track here? Does this sort of amplifier generally work well for this application?
 

Adjuster

Joined Dec 26, 2010
2,148
Thanks for your input. Since I'm seeing a signal (albeit a clipped one) across the resistor, I assume that the 741 is adequately fast. My power supply uses 2 9-volt batteries such that +9 volts goes to the positive supply of the op amp and -9 volts goes to the negative supply.

As for the diode bias, that's a good point that its zero biased. How would I reverse bias it in this circuit?

And more generally, am I on the right track here? Does this sort of amplifier generally work well for this application?
No, if (as you said in your initial post) there is no output, you have no evidence that the 741 is working at all, let alone being fast enough. The fact that there is a little signal at the input only proves that the photodiode is working.

For reverse bias, instead of returning the photo-diode anode to ground, take it to a negative supply - but be careful not to exceed its maximum working voltage. To reduce possible noise pick-up from the supply, a small series resistor between the anode and the supply and a decoupling capacitor from the anode to ground may help. The resistor should be chosen not to drop too much voltage at the expected photo-current, 1kΩ say? The decoupling cap. could be 100nF.
 

Thread Starter

skyjive

Joined Jul 9, 2011
11
Well I tried reverse biasing the photodiode and still no signal whatsoever, so I guess I'll just try a better op amp. Thanks for the help.
 

Thread Starter

skyjive

Joined Jul 9, 2011
11
CDDrive: Im afraid I dont know what PN stands for. The photodiode is digi-key part #751-1500-1-ND if that helps.

joeyd: With the photodiode zero biased, I measure a dc voltage at the output of 8.75V wrt ground. With reverse bias, this becomes -7.85V.
 

joeyd999

Joined Jun 6, 2011
5,283
joeyd: With the photodiode zero biased, I measure a dc voltage at the output of 8.75V wrt ground. With reverse bias, this becomes -7.85V.
I think your output is being saturated by ambient light. There is no more room to "swing".

Generally, what I do is modulate the the source at a much higher (carrier) frequency than the bit rate of the IR data I am trying to send. Then, I use a bandpass (centered on the carrier frequency) on the receiver side, followed by an AGC (auto-gain amp), followed by an envelope detector (or lock-in amplifier) to recover the original data. This is similar to Amplitude Modulation/Demodulation.

This is a bit more complex than you are currently doing, but unless you expect your IR channel to operate at very close range or total darkness, I don't have another solution for you.
 

Thread Starter

skyjive

Joined Jul 9, 2011
11
That sounds very plausible, so I did some tests to see if I could confirm it. However, the exact same dc voltage (which is of course roughly equal to the 9-volt supply) persists even in a completely dark room or if I cover the PD with my thumb. I don't understand the mechanics of the circuit 100%, but wouldn't this argue against ambient light saturation? Also, if the diode was saturated wouldn't I not be able to see my signal getting through across the resistor? If it not the case that the diode is saturated, then it must be either 1) my circuit is wrong, which I think is also not the case, or 2) I have a bad component (probably the op amp)
 

joeyd999

Joined Jun 6, 2011
5,283
The circuit itself is quite simple:

When operating closed-loop, the op-amp tries to maintain a 0 voltage differential between the + and - inputs. Exposing the PD to light causes it to generate a small current (from cathode to anode). The amp supplies this current through the feedback resistor, therefore, the output should equal the photodiode current times the value of the feedback resistor.

In perfect darkness, with the "zero biased" circuit, the output should be exactly 0 volts (neglecting the input offset voltage).

With negative bias, you will get a small non-zero value due to "dark current", which is a current generated by thermal effects, and increases at higher temperatures.

If the loop is not closed (for instance, if the output is saturated), the photodiode will continue to be light sensitive, and its terminal voltage will be non-zero and change with respect to modulated light. The output of the amp will be stuck on a rail, and therefore, constant. So, you will see an AC signal across the resistor, corresponding to changes in light amplitude. Unfortunately, this signal information will be useless to you.

PD circuits operate much better with low input bias current amps. Input offset voltage is not that big of a deal (excessive input offset voltage will cause higher dark current). If you need speed, choose a good JFET amp. Otherwise, a decent CMOS amp will suffice (watch the bandwidth!).

When you get it sort of working, remember that the PD has a parasitic parallel capacitance across it. This acts like a high-pass filter (with respect to noise), causing noise in your output, especially at high gain. Generally, a cap is placed across the feedback resistor to cut some of this noise. This generally helps a great deal, but then you will meet the phenomena of "noise peaking" at a particular frequency, as you have now two caps, an input cap and a feedback cap, and there will be a high gain at some frequency proportional to Xcf/Xci.

These circuits look simple, but if not designed carefully, you can get a lot of unexpected results.

Most of all, have fun!



Good Luck!
 

joeyd999

Joined Jun 6, 2011
5,283
Also, if you choose a single supply amp with an input voltage range of less than 0V (i.e. -0.3V). Then you can run your circuit off a single positive supply.
 

Adjuster

Joined Dec 26, 2010
2,148
That sounds very plausible, so I did some tests to see if I could confirm it. However, the exact same dc voltage (which is of course roughly equal to the 9-volt supply) persists even in a completely dark room or if I cover the PD with my thumb. I don't understand the mechanics of the circuit 100%, but wouldn't this argue against ambient light saturation? Also, if the diode was saturated wouldn't I not be able to see my signal getting through across the resistor? If it not the case that the diode is saturated, then it must be either 1) my circuit is wrong, which I think is also not the case, or 2) I have a bad component (probably the op amp)
The suspicion would be that the amplifier had saturated, which indeed it does when its output gets too near the supply voltages. If this condition persists with the photo-diode covered, then something other than excess photo-current may be causing it. I wonder for instance if you may have swapped the inverting and non-inverting inputs? Of course, the IC may be a dud.

It also seems very odd that the output went so far negative when you put the photo-diode under reverse bias. Perhaps you could post the circuit modified to show just how you did that.

If you are a student with access to a tutor or instructor, it may be a good idea to ask them for help. failing that, disconnect the photodiode and check the output voltage. It should be small, and you can estimate what it might be from the input offset voltage, plus the input bias current multiplied by the 91kΩ feedback resistor.

Now add a 1MΩ resistor from the inverting input to -9V: the output should shift positively by about 0.82V. If you don't get that basic functionality, investigate until you do.
 

CDRIVE

Joined Jul 1, 2008
2,219
CDDrive: Im afraid I dont know what PN stands for. The photodiode is digi-key part #751-1500-1-ND if that helps.

joeyd: With the photodiode zero biased, I measure a dc voltage at the output of 8.75V wrt ground. With reverse bias, this becomes -7.85V.
PN means "part number" but not the Digikey part number. More specifically, I should have said "manufacturer's model number", just like your opamp is a model 741.

BTW, if it's not ambient light that's giving you odd opamp output readings then you must have something wired wrong. I simulated your circuit (as you drew it) and produced an output from 35mV to 8V.
 

Thread Starter

skyjive

Joined Jul 9, 2011
11
Last two posters are correct, I did indeed wire something wrong, namely I swapped the invert and non-invert inputs (doh!). Having fixed this, things began looking up, I now observed the following voltage waveform at the output with respect to ground:



The total period is about 400 uS, so since my IR LED is transmitting pulses as 2.5 kHz this is clearly the correct signal. However, what's going on with the jagged oscillations? Is that the op amp oscillating about the supply voltage? Is there a way to clean that up? As I move farther away or rotate the PD away from the LEDs, the signal loses amplitude and the high voltage goes from flat to a jagged oscillation like the low voltage.

This was with a zero biased PD btw. I observed the same waveform with it reverse biased, but with smaller oscillations.

Edit: And also in my original post I misquoted the resistor as 91k when it is in fact 910k.
 
Last edited:

joeyd999

Joined Jun 6, 2011
5,283
Last two posters are correct, I did indeed wire something wrong, namely I swapped the invert and non-invert inputs (doh!). Having fixed this, things began looking up, I now observed the following voltage waveform at the output with respect to ground:



The total period is about 400 uS, so since my IR LED is transmitting pulses as 2.5 kHz this is clearly the correct signal. However, what's going on with the jagged oscillations? Is that the op amp oscillating about the supply voltage? Is there a way to clean that up? As I move farther away or rotate the PD away from the LEDs, the signal loses amplitude and the high voltage goes from flat to a jagged oscillation like the low voltage.

This was with a zero biased PD btw. I observed the same waveform with it reverse biased, but with smaller oscillations.

Edit: And also in my original post I misquoted the resistor as 91k when it is in fact 910k.
That's the noise gain I was talking about (due to the parasitic capacitance of the photodiode). You need to create a low pass filter by putting a cap across your 910K resistor.

Also, remember the intensity of the received light is going to drop off with the square of the distance. That's why a AGC block is sometimes used.
 

Adjuster

Joined Dec 26, 2010
2,148
The capacitance of the photo-diode will tend to introduce an additional lag into the amplifier feedback loop, which may lead to instability. Long wires connecting the photo-diode may make this worse, as may the dreaded solder less breadboard, if you are using one. Try to keep the wiring short and tidy.

There will of course also be noise from the amplifier (the 741 is not great in that department), and perhaps more noise caused by electric lights flickering.

The reduction in oscillation with negative bias may be due to the photo-diode capacitance reducing when biased. You may be able to get rid of it by adding a small capacitor in parallel with the feedback resistor - value probably from 1pF to some tens of pF, depending on the photo-diode's capacitance. This will tend to slow down the response, so the capacitor should not be made too big.

You should also have a capacitor of maybe 100nF from each of the supplies to ground, close to the IC - this will be more critical if you decide to use faster ICs than the venerable 741.
 
Top