A strange photodiode behavior  - Page 1
Forum section: electronics / beginners

author: Phil Smith
author_rank: Regular Contributor
timestamp: April 12, 2025, 10:08:13 pm
content: Hi guys,I've got a photodiode assembly (see pics attached) which is a part of Tornado GR4 HUD module I'd like to utilize in my project to control brightness (constant current circuit using 3no parallel N-FETs) of a COB led depending on intensity of ambient light.Control voltages required for N-FET's gates as follows - 3v - min brightness, 7vdc - full brightness.The original module is built around HUV-1100BG photodiode which seems to have integrated op-amp circuitry as well. The only datasheet I've found is just a single page from some Chinese source.. (see attached), but, at least it gave me some basic data and the pinout.I've reverse-engineered the board (see schematic attached) and it requires +/- 15V power supply.After applying the power to the PCB I've hooked a multimeter up to the output, switched it to VDC and started experimenting with different light sources. Results are as follows:Closed "pupil" (no light) - neg 0.035 VDC.Ambient room light - neg 0.09 VDCLooking at workbench lights - neg 0.8 VDCLooking into the window (daytime, overcast sky) - ~ neg 1V.Cellphone's torch at ~100mm distance away from the pupil - ~neg 5V.It all seemed fine and logical (except those values being negative) until I've connected the scope to the output..On the output I saw a quite clean sinewave ~25Vp-p @ ~88kHz. And all those DC values I've measured with the multimeter were negative offsets of that wave (see pics attached) (basically that sinewave drags down proportionally to amount of light entering the diode).On a breadboard I've managed to get some results by using 2no op-amp stages- first one being in inverting configuration with gain of 10 and second one being non-inverting confg. with gain of 101. Output is +0.1V with no light and ~ +1.2V while Looking at workbench lights. Only downside is, the voltage is quite unstable jumping +/-50mV which is not good to be a control signal.I'll appreciate any help on why it has such behavior and how to deal with it to have a smooth DC output.TIA.

author: TC
author_rank: Contributor
timestamp: April 13, 2025, 02:04:17 am
content: Have you tried adding some load resistance?Is your scope set to 1Mohm and thus the opamp is driving the capacitance of cabling + scope input?Is that causing oscillation?

author: Kleinstein
author_rank: Super Contributor
timestamp: April 13, 2025, 07:50:02 am
content: There should be no oscillation. Chances are that one would need some extra capacitance (e.g. 3-100 pF range) in parallel to the feedback resistor.The larger the capacitors the slower the response. This could be OK for a slow control loop.The amplifier type may not be ideal for near DC operation. FET amplifiers tend to have relatively high low freuquency noise and drift.Ideally one would want a rather large resistor in the feedback directly at the photodiode and less gain after that. This way the amplifiers voltage noise gets less critical.

author: Phil Smith
author_rank: Regular Contributor
timestamp: April 13, 2025, 11:00:09 am
content: Quote from: TC on April 13, 2025, 02:04:17 amIt indeed did help a bit!I've started with a quite conservative value of 1k resistor across the output and it did nothing, so I've ended up lowering it down to 50R and amplitude decreased significantly (see pics attached).It decreased even more when I've set my scope to 50R. Putting a 1u85 cap (a random value from my components bin) cleaned the signal quite a bit further as well. Now it's a kind of a triangular waveform with f=~9.5 kHz and amplitude of ~300 mV. (measured with 1M scope input impedance).I have almost clean DC signal now at the output of my external 2no stage opamp circuit with following voltage values:- no light - neg 0.035VDC at the output of photodiode assy and +0.005VDC at the output of my amp.- looking at workbench lights - neg 0.8VDC at the output of photodiode assy and +0.5VDC at the output of my amp.Quote from: Kleinstein on April 13, 2025, 07:50:02 amGood shout, I might play with feedback caps as well

author: Kleinstein
author_rank: Super Contributor
timestamp: April 13, 2025, 11:14:43 am
content: One should avoid capacitive load to the amplifier output. The amplifier may also not be able to drive 50 Ohms load. Some amplifier may even want some 50 or 100 ohms as series resistor to drive the scope input (and cable) capacitance. The diode and capacitor at the output would make a crude peak detector, but it is not very accurate.

author: TC
author_rank: Contributor
timestamp: April 13, 2025, 12:45:19 pm
content: Quote from: Kleinstein on April 13, 2025, 11:14:43 amExactly what I should have said. When I suggested adding load resistance I really meant series R. Try Kleinstein's suggestions.

author: TC
author_rank: Contributor
timestamp: April 13, 2025, 01:22:25 pm
content: If you still have oscillation after adding series R that doesn't mean you don''t need it. It is most likely that you do.Instead, there is likely some other source of your oscillation. One possibility is self-resonance of the avalanche photodiode (due to lead inductance and diode capacitance?). Another is an external source such as power supply noise, etc.You can reduce the bandwidth of your amplifier by adding parallel capacitance across the feedback network as Kleinstein suggested. Again, try his suggestions.

author: rbarris
author_rank: Newbie
timestamp: April 13, 2025, 09:52:43 pm
content: how does it respond to bright sunlight?A lot of the light sources you might pick up (cell phone, LED flashlight, LED bulb in a desk lamp) have PWM in them already.I like a red/white power LED driven by a DC supply through a power resistor for a "mostly DC" light source.

author: Phil Smith
author_rank: Regular Contributor
timestamp: April 16, 2025, 06:26:49 am
content: Quote from: Kleinstein on April 13, 2025, 11:14:43 amQuote from: TC on April 13, 2025, 01:22:25 pmQuote from: rbarris on April 13, 2025, 09:52:43 pmThank you very much guys!The cap placed across photodiode amp's output is removed.The photodiode assy DC output caused by the sunlight is the same as it is from the pwm controlled led lights. with AC component being little bit smaller with the sunlight.I've managed to get nice control DC signal by introducing negative peak detector following by inverting op-amp and following by positive peak detector and following by a buffer, as it's shown on the schematic attached.Signals look fine on the scope, there is some notice with ~200mV p-p, but most of it comes from the circuit being modeled on the breadboard and other surrounding devices, such as pwm lights, smps, etc.

author: Kleinstein
author_rank: Super Contributor
timestamp: April 16, 2025, 06:54:03 am
content: Using a peak detector to get a DC output is an odd way. The more normal way is low pass filtering as this also reduces the noise.There can be a background AC part from mains powered light, especially at 2 x mains frequency. Some LED lights can also have a ligher frequency part.

author: Phil Smith
author_rank: Regular Contributor
timestamp: April 16, 2025, 07:27:26 am
content: Quote from: Kleinstein on April 16, 2025, 06:54:03 amSo basically to replace 2nd peak detector (around U2A) with a low pass filter, e.g. similar to this one?https://k7mem.com/Fil_2nd_Active_LP_HP.htmlor this:https://www.electronics-tutorials.ws/filter/second-order-filters.html

author: Kleinstein
author_rank: Super Contributor
timestamp: April 16, 2025, 08:36:59 am
content: The easy low pass fitlering is a capacitor prallel to the FB resistor at the first amplifier. How much additional LP filtering is needed depends on the use case and light sources. If the signal goes to an ADC, one could use digital filtering. A 2nd order LP filter as shown would be OK too.

author: Phil Smith
author_rank: Regular Contributor
timestamp: April 16, 2025, 08:40:35 am
content: Quote from: Kleinstein on April 16, 2025, 08:36:59 amGot you, thank you.The output signal is going to be used to drive gates of 3no parallel N-FETS controlling brightness of COB led.

author: Kleinstein
author_rank: Super Contributor
timestamp: April 16, 2025, 09:29:18 am
content: For a control loop one has to be a bit careful with fitlering, not to introduce too much phase shift in the critical frequency range. So one has to plan / simulate the filtering together with the control loop.With light from the LEDs there should not be much AC part in the light and thus not much filtering needed.Chance are that the intensity is quite high and thus not that much gain needed.