Photodiode op amp circuit trouble

Go To Last Post
38 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello Internet

 

I am trying to amplify the voltage signal from a photodiode. The signal ranges from 0.150 V to 0.3 V. I am using an LM358N op amp. When i read the voltage straight off the photodiode i get the range of 0.150 to 0.3v.

 

When i connect the photodiode to the op amp the signal is half of the range and i confirm this with a mutimeter. The output of the op amp is 0.003v and does not change as the photodiode varies its voltage. 

 

This is the amplification circuit i am using:

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi calvingloster

 

You have tied the non-inverting input of the opamp to ground. That will not work, because your ground is also the negative supply rail. Your opamp will turn into a comparator, and since the inverting input always have higher potential compared to the non-inverting input, the opamp will output lowest possible voltage permanently.

 

Opamps as amplifiers must have same potential on both inputs, otherwise they turn into comparators.

 

Try to read a Little here: https://www.electronics-tutorials.ws/opamp/opamp_8.html

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You probably need to use a non-inverting op-amp configuration:

Non Inverting Opamp Amplifier

where Vin is connected to the cathode of the photodiode, GND is connected to the anode, and Rf = (9 x Rg) for a gain of 10.

 

 

David (aka frog_jr)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The lm358 is a bipolar input opamp. The input currents may cause errors. I’d suggest a fet input opamp.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
I’d suggest a fet input opamp.

 

Yes, and rail-to-rail on both inputs and output, since supply is just 5V.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Kartman. looking into my parts i found a TL 074 CD quad op amp. The data sheet says its a JFET op amp is this more suitable? 

 

In what arrangement should i use it? The classical non inverting method as described by frog_jr?

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Google photodiode circuits. Note - i have no idea what photodiode you are using or what you want to achieve.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

calvingloster wrote:
Thanks Kartman. looking into my parts i found a TL 074 CD quad op amp. The data sheet says its a JFET op amp is this more suitable? 

 

No, its not suitable. Common mode input range does not include negative rail. And datasheet specifies working voltage of +/-15V, 30V total.

 

You need an opamp rail-to-rail input and output at 5V single supply.

 

Try to search one at digikey.com, you can specify your demands in a scheme.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

peteralarsen wrote:
No, its not suitable. Common mode input range does not include negative rail. And datasheet specifies working voltage of +/-15V, 30V total.   You need an opamp rail-to-rail input and output at 5V single supply.   Try to search one at digikey.com, you can specify your demands in a scheme.

 

Thanks. There must be an underlying concept that i don't understand about op amps then? if i measure 0.3v as my signal  and input the signal into a non inverting op amp configuration where the op amp is supplied with GND and 12v why does it not amplify the signal?

 

 

I anyways tried the TL 074 CD in a non inverting configuration and what confuses me is once i connect my signal to the op amp i measure it as 0.4v but when its disconnected i measure 0.1v. Even with the 0.4v input signal the op amp output goes to the upper rail.

 

 

i tried connecting the photodiode both ways and it does not work. Once connected the input signal does not even change according to light intensity.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

calvingloster wrote:
There must be an underlying concept that i don't understand about op amps then?

 

You need to understand that all opamps have a somehow limited input range. Your ground is also the negative rail, and many opamps will not work as expected when input voltage goes near positive or negative rail.

 

Your circuit absolutely needs an opamp that will function when inputs goes to the negative rail (ground). You also need that output can go very close to the negative rail. Such an opamp is generally called a rail-to-rail input and output opamp. Some of them allows input in excess of the rails. Most older opamps will not go rail-to-rail, and will be useless in your circuit.

 

TL074 will not function in the circuit specified. It will behave unpredictably.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

peteralarsen wrote:
Such an opamp is generally called a rail-to-rail input and output opamp

 

An LM358N is a rail to rail op amp correct? Why does this not work then. If i google it seems it can be successfully used to amplify the photodiode signal but it does not.

 

Why does the input signal voltage change once it is connected to the op amp?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There’s a couple of fundamental items you’ve missed. If you do the math, the output of the opamp needs to go negative, but it physically can’t because the negative rail is at 0V. To get around this, a ‘virtual’ earth is used where your earth symbol is at , say, half your vcc. So when the output is ‘zero’ it’s actually half way.

As well, the tl074 and many other opamps output cannot swing to the power rails - more like to within 1 or 2 volts. So at 5V, you don’t have much output swing to play with. Similarly, many opamp inputs don’t like being close to the rails - weird things can happen like the output inverting. All this is hidden in the datasheet. Peter mentions rail to rail input and output - there are specific opamps that do this.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

calvingloster wrote:
An LM358N is a rail to rail op amp correct?

 

No. According to datasheet it can go to the negative rail, but not to the positive rail. In the answer #3 diagram that could be sufficient.

 

In your original diagram, one input is tied to ground. That will render any opamp useless.

Last Edited: Wed. Feb 21, 2018 - 12:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

peteralarsen wrote:
In the answer #3 diagram that could be sufficient.

 

This does not work. I dont understand what you saying actually. you say it wont work but then say #3 is sufficient?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

calvingloster wrote:
This does not work. I dont understand what you saying actually. you say it wont work but then say #3 is sufficient?

 

Look at the right side of the screen. All answers are numbered. Try to read answer #3, check the diagram in answer #3. It will likely work with LM358, provided that the photodiode can supply the nessesary current for the input.

 

Your original diagram in #1 will definitely never work for reasons given above.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

peteralarsen wrote:
Look at the right side of the screen. All answers are numbered. Try to read answer #3, check the diagram in answer #3. It will likely work with LM358

 

Yes i know this. As i said it does not work. i used an LM358 in this configuration and it does not work.

 

I am guessing the current from the photo diode is not enough? I thought no current flows into an op amps inputs?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

calvingloster wrote:
I thought no current flows into an op amps inputs?

 

No current flows into the inputs of an ideal opamp. But ideal opamps does not exist in real world. All opamps have non-ideal limitations.

 

LM358 is a bipolar design, and fairly much current goes into the inputs. But its a quite robust opamp.

 

A FET opamp like TL074 will have much less current in the inputs.

 

A CMOS or MOSFET opamp takes so little input current that it may safely be ignored in most cases. At the expence of being easily destroyed by overvoltage.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An opamp that may suit your demands is LMC6582, CMOS rail-to-rail. Its not in production anymore, but its inexpensive, and you may find old stock. Maybe from ebay.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The goal of the kind of circuit in #1 is that the photodiode becomes a current source with (nearly) zero volts across it, maintained by feedback. THAT is a legitimate  configuration.

 

However, what you have done with that op-amp is NOT legitimate. As several have pointed out, few op-amps work properly with the input AT the negative supply rail. I suggest that you simply bias the positive input up to Vcc/2. Then, the output is measured relative to the input bias point. This arrangement biases the diode in the reverse direction at Vcc/2 but, due to the feedback, the apparent "load resistance" (seen by the diode) is zero and it still functions like a current source.

 

Op-amp bias currents ARE important in this circuit as they are indistinguishable from the diode current. If you can tolerate the noise, an op-amp with FET inputs would probably be useful. 

 

Jim

 

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is actually a circuit that many people use but have no clue how it works. Here are some explanation attempts: https://electronics.stackexchang...

 

My personal interpretation is as follows:

 

 

So you actually need an opamp that not only has inputs that go to ground, but actually must support inputs slightly bellow ground. Either that, or use a dual power source:

 

 

edit: actually, this just gave me an idea. This photodiode current must be very small, but maybe it's possible to charge a small capacitor with it, including the gate of an MCU input. Timing how long it takes for an input to go from 0 to 1 might allow measurement of light intensity.

Last Edited: Wed. Feb 21, 2018 - 08:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A photo-voltaic cell generates well volts but a photo-diode "generates" current and a tiny one at that.

 

Years ago we built an Infra-red to RS232 interface using a similar circuit to the OP circuit but using CA3140 amplifier instead.

https://www.intersil.com/content/dam/Intersil/documents/ca31/ca3140-a.pdf

This amplifier has PMOS II/P transistors which allow the input common mode to go slightly below the -VE supply.  We didn't design it - it was found in the applications section of a yellowing Intersil data book. Ha ! the data-sheet I linked to is old-school and is crammed full of applications info.

 

Does it work ? Yes as long as you have plenty of volts to make the CA3140 work. IIRC in our RS232 application ±5V was only just about enough.

 

YMMV with more modern amplifiers.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your first sentence is suspicious:

 am trying to amplify the voltage signal from a photodiode

You should be amplifying the current...since a photodiode is a very linear light-to-current sensor.  While, of course, a voltage is required for current flow, you should orient your first stage thinking, in terms of current. Jim mentioned this in #19,as did several others. "forget"  (somewhat) about photodiode voltage.

 

Opamp inputs need a DC path (no cap-only path) to gnd, (so the bias currents can flow!!  Gerald Graeme has many good photodiode articles & a book too.

 

ELTangas---Not to confuse future readers, but your photodiode currents are shown reversed.  Light causes current to flow in the opposite direction of the photodiode arrow (downward)...The only way for this to occur is for the output voltage to be positive and  flow through R & the photodiode down to gnd.  The + & - input pins are always the same level when the loop is functioning, here zero (gnd).

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's just that a current with no voltage is confusing me... But I guess it happens because the energy of the light is propelling the charge carriers instead of an electric field.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Take a look at any "solar cell". You have open circuit voltage and short circuit current. What is short circuit current if it is not current at zero voltage?

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@calvingloster:

 

Depending on your opamp, you may need a -5V supply. You can use a charge a coupled voltage converter to generate -5V from +5V. TL074 will probably benefit from a -5V supply.

 

An example: LTC660, http://www.linear.com/product/LT...

 

1 IC + 2 capacitors do the job.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I got it working with the LM358. This is what i done: Rail voltage is 0V and 12V

 

I believe this is a form of a transimpedance amplifier? I do not understand how this converts current to voltage though. the op amp will always try make the inverting input the same voltage as the non inverting input by changing its output. In this case the inverting input must be 0V because the non inverting input is tied to ground. 

 

How do you calculate the output voltage if you dont know anything about the photodiode? Does the photodiode act like a variable resistor?

Last Edited: Fri. Feb 23, 2018 - 02:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The resistance across the photo diode will need to be 0 ohms for the voltage at the inverting input to be 0V?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The apparent resistance that the diode "sees" is indeed very close to zero, exactly because of feedback. Here is the rule that I use:

 

A negative feedback amplifier will generate an output voltage in such a way so as to keep the input voltage DIFFERENCE zero. The sum of all currents at the negative input must be zero.

 This assumes several things, of course. Those things include:

 

1) The inputs are within the acceptable common mode range for the amplifier.

 

2) The output is not saturated in either direction (e.g. has not "run into" the supply rails).

 

3) The amplifier has an appropriate power supply.

 

The LM358 common mode input range includes the negative rail, so you are OK, there. With Vcc = 12V, the output can swing almost to +12V. When that has happened, one end of the feedback resistor is close to 12V and the other end is close to zero (because of the negative feedback). Thus the feedback current will be 12V/2M = 6uA. Thus, in order to reach this condition, the photo diode MUST be generating 6uA of photo-current. In this mode, the output voltage will be linearly proportional to light intensity (as long as the output is not too close to zero volts or too close to 12V); there MAY be some zero offset because of op-amp input bias current.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This brings me back to the days at the Fiber optics place.

 

The LM358 is a lousy choice for this type of application.  We used to use LM6365 and LM6361 op amps for this sort of thing.  But you can use a jfet with a single supply and get by as long as you remember that teh output will be a little skewed.

 

Teh simplest thing to do is put the cathode of the photodiode to the V+ rail, connect the anode to the inverting(-) input of teh op amp, connect a 1 meg ohm resistor from the output of the op amp to the inverting (-) input.  Ground the non inverting (+) input.  Place your multimeter on the output and watch what happens when you vary the light striking the photodiode.  It should move in response to the light.  You may have to increase the feedback resistor, and maybe add a capacitor in parallel with  the resistor, but to get you going just omit the capacitor.

 

The circuit will work.  It's the gain capabilities of the op amp that make the difference

 

JIm

 

EDIT

What is the application by the way?

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

Last Edited: Fri. Feb 23, 2018 - 06:22 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When you shine light on the diode, it propels current through itself. I did a test: connecting a red LED to a 100nF capacitor. If you illuminate the diode with a strong light, in a few seconds a voltage of about 1.5V§ develops along the diode (depends on light intensity). At this point, the electric field balances the light energy, so current ceases to flow to outside the diode.

 

The opamp will try to compensate this charge difference by making a current flow, until the cathode (negative end) is brought to ground potential. This means the opamp is injecting in the diode exactly the same amount of current that the light is forcing through. The current will be proportional to light intensity, I believe (depends on light frequency, because my red LED doesn't care about blue light, for example, only red). This current will develop a voltage on the feedback resistor, which you measure.

 

§ edit: the energy of red photons is about 1.8 eV so it all makes sense, I guess.

Last Edited: Fri. Feb 23, 2018 - 06:51 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If it is a "DC" application (simple light intensity), that circuit will work OK. It will fall down if the light is modulated at any significant frequency (say, more than a few KHz, maybe even less).

 

When I wrote that "the sum of all currents at the negative input must be zero", it would have been more clear if I wrote "As a result of the negative feedback, the output voltage will adjust so that the sum of all currents at the negative input will be zero". This is actually a simple corollary to the statement that, with negative feedback, the input voltage difference will be (close to) zero.

 

Jim

 

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Fri. Feb 23, 2018 - 07:20 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Which circuit Jim?

East coast Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

#27, I think.

 

West Coast Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

calvingloster wrote:

I got it working with the LM358. This is what i done: Rail voltage is 0V and 12V

 

I believe this is a form of a transimpedance amplifier? I do not understand how this converts current to voltage though. the op amp will always try make the inverting input the same voltage as the non inverting input by changing its output. In this case the inverting input must be 0V because the non inverting input is tied to ground. 

 

How do you calculate the output voltage if you dont know anything about the photodiode? Does the photodiode act like a variable resistor?

 

This is sort of what I described with the exception that I would connect the cathode of the Photodiode to +12, and the anode to the (-) input instead of how you have it.  As West Coast Jim mentions this will work for intensity detection, but not for any high speed stuff mostly because of the LM358's limited bandwidth.

 

East Coast Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The connection East Coast Jim describes is "better" because the larger DC voltage across the diode leads to lower diode capacitance and faster speed. HOWEVER, the real speed  limiter is still the op-amp.

 

There is a really big surprise in this change. By changing the anode from ground to Vcc, the direction of the current DOES NOT CHANGE. The current will still flow  through the feedback resistor in the same direction and the output signal polarity will remain unchanged.

 

West Coast Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Fri. Feb 23, 2018 - 09:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
By changing the anode from ground to Vcc, the direction of the current DOES NOT CHANGE.

I did not suggest connecting the anode to Vcc, and IIRC connecting the Anode to Vcc will forward bias the diode.

 

East Coast Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ooops, you are correct. 

 

Reversing the  diode THAT way then requires that the summing junction be biased up from ground OR add a negative supply.

 

West Coast Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Fri. Feb 23, 2018 - 09:13 PM