# Opamp outputs high DC finite voltage when input signal is low

I have in the past asked the same question, but it has not been resolved yet. Here I will try to describe it in a better way:

We have a signal coming from a optical receptor (SFH250V broadcom). When we measure the "dark signal"(when it receives no light) it produces a mere 2-3mV. When a full light PWM light beam is produced, it emits a PWM of about 230mV of amplitude. (I measured that and checked the datasheet, everything till now is fine).

That same output signal is sent to a classic op-amp lm358. That op-amp is powered with 5VDC on pin 8. Pin 4 is grounded. Here is a schematic:

simulate this circuit – Schematic created using CircuitLab

The problem is the following: When we plug it that way, but we don't send a signal, the output signal of the op-amp is 420mV. When we send the signal (which was approx. 220mV) it rises up to 680mV.

How I expected it to behave: 1- the 20mV noize would double because the G = 2. so when no signal would be sent a mere 50mV should appear. 2 - The amplified signal would be of 440mV approx.

I tried to change the gain. With a gain of G = 10, the background DC becomes 2.4V and when the signal is sent is rises to 3.2V.

Anyone knows what is going on?

EDIT#1: Here are some scope traces as asked.

EDIT #2: I've listen to @Entrepreneur and i've put a resistor, but on the ground as the "art of electronics" suggested. Now, I get a square signal with the right duty cycle, which wasn't the case before. Plus I don't have a super high voltage noise, but this comes to the cost of a lower output signal than expected.

simulate this circuit

Here are my measures on the scope now:

WITHOUT SIGNAL INPUT

WITH SIGNAL INPUT

• Let's see some scope traces. Aug 16, 2017 at 1:14
• Is there a resistor other than R3 connected to the SFH250V output? R3 will have no effect since the LM358 (+) input is high impedance. Aug 16, 2017 at 1:59
• Insert a 1K pull-up resistor between the SFH250V output and +5v. When no light signal is present the new 1K resistor will provide a default signal of 5v to the op-amp. Without it your input signal voltage is undefined, basically noise. Aug 16, 2017 at 2:21
• @Marc-AndréVigneault try 0.9M to +in and 9M:1M to -in to balance input bias current to reduce offset, with a gain of 10 Diode V is a current source *R ( 0.5mA/mW?guess?) nope 0.3mA/mW red and 0.4mA/mW IR Aug 16, 2017 at 3:33
• Or try 10M probe on PD ONly to gnd No OA. then 10M on In+ with unity gain, then gain of 23 using 22M:1M. Make sure dark current is with all light blocked or you are using matched wavelengths with filter. e.g. IR with 8 deg lens or laser diode from far. or modulated carrier with BPF high Q or IR using TIA amplifier. etc etc. this test you are doing is primitive Aug 16, 2017 at 17:02

In my opinion neither circuit shown above is appropriate. Let's start again with an observation: The SFH250V is only characterized (in its data sheet) for reverse bias (photoconductive) operation. From previous discussion (above) it seems that you wish to use this device in photovoltaic mode. Unfortunately the device data sheet provides no insight into performance in that mode. Nevertheless...

In photovoltaic mode--with sufficient illumination and with a load resistor connecting anode and cathode--a current will flow from the anode, through the resistor, to the cathode. With a very high resistance and enough illumination, up to 1V (anode positive) will be generated across the resistor; with no illumination, the resistor voltage will be 0V. (More info here: https://www.thorlabs.com/tutorials.cfm?tabID=31760 ) For most applications a larger output voltage is desired, requiring use of an op-amp.

A circuit such as this is appropriate:

Note that when illuminated, the SFH250V would drive the inverting input of the op-amp to a negative value. A (negative) feedback resistor from the output of the op-amp provides a compensating current sufficient to hold the inverting input at the same voltage as the non-inverting op-amp input; that is, 0V. The voltage at the output of the op-amp indicates the amount of compensating current and the amount of illumination. The voltages at both the inverting and non-inverting inputs of the op-amp must be within the common-mode range of the op-amp for normal operation. In this case, the common-mode range must include 0V. Likewise, the output range of the op-amp must cover 0V to whatever maximum is desired; this will set a minimum limit for the op-amp's supply voltage. For our example, let's target a maximum output of 3V.

Note that the input bias current of the op-amp adds (or subtracts) to the current from the photodiode; thus a very low bias current is desirable (since the photodiode current is very small). So, we must choose an op-amp that meets our requirements. Specifically, the op-amp must have very low input bias current, the op-amp must contain 0V in its common-mode input range, the op-amp output must swing from (approx) 0V to 3V. With these specs, there are many dozens of op-amp models that could work, with the best choice depending on other factors including (but not limited to) speed, power dissipation, operating voltage range, cost, package, and availability. As an example, I will suggest the Microchip Technology MCP6001 as a low-cost, widely available op-amp. This may or may not be the best choice when all factors are considered. I also suggest that the power supply voltage be 5V.

Let's look a bit at operation in the circuit I have provided. With no illumination of the photodiode, the + input of the op-amp will show 0V; the - input will show 0V; the output will show 0V. With sufficient illumination of the photodiode, the + input will show 0V; the - input will show 0V; the output will show 3V. Now, the missing value of the feedback resistor becomes a problem. The SFH250V data sheet gives no help, nor do we know the actual illumination value that is available. So, we will have to experiment a bit, trying different feedback resistor values until we find an acceptable value. I can only guess that the acceptable value will be somewhere between 100Kohms and 10Mohms--a very wide range. Start at either the low or high end of that range and try successive values until the performance is acceptable to you; a lower value will produce lower output. A bypass capacitor from the power supply voltage to common, located very close to the op-amp is highly recommended.

Let me give you a strong caution. The currents at the inverting input of the op-amp will be very small. That means that any current leakage in your actual circuit (e.g. a breadboard or a PCB layout) must be even smaller. That is usually not a trivial goal. If you choose a package that allows you to do so, I suggest that all connections to the op-amp inverting input be made with no contact to the breadboard or PCB; i.e. make those connections "in the air." Cleaning PCBs after soldering is an art and science about which whole books have been written; I will not write one here.

Insert your 100K pull-up resistor between the SFH250V output and +5v. When no light signal is present the new 100K resistor will provide a default signal of 5v to the op-amp. Without it your input signal voltage is undefined, basically noise.

When the photo diode is properly biased you should get a voltage swing of over 2 volts, much more than 200mV. The photo diode is like a simple switch, it cannot provide a voltage without a pull-up to +5V.

• not quite..... The diode not a switch, rather 'tis a current source in Photovoltaic mode at zero bias like a solar array. It's called Photoconductive mode when reverse biased which give faster rise times. Aug 16, 2017 at 3:28
• I understand. His input is 220Hz. And he is expecting a greater output swing, which the part could deliver. Aug 16, 2017 at 11:41
• You explanation is faulty. The probe impedance or Op Amp load impedance or R defines the voltage for a constant current out and constant light input at 0V reference but 1k is too small for gain setting for input bias current offset. try 1~10M matched input impedance. 100k is too small for load compared to before. try 1~10M Aug 16, 2017 at 16:55
• If you believe that your proclamations will help rather than confuse the original question poster then you should address your suggestions to him/her. Aug 18, 2017 at 18:02
• I did and it resolved his issue. I just wanted to help correct your errors Aug 19, 2017 at 3:32