Photodiodes saturating in ambient light - Page 1
Forum section: electronics / projects

author: aussie_laser_dude
author_rank: Contributor
timestamp: May 10, 2020, 11:37:39 am
content: Hi guys! I've made a photodiode array that works in the shade but not in the sun.The photodiodes are ~2mm silicon photoconductive sensors. The goal is to measure brief light source pulses of 1mW power lasting 10 microseconds.I've connected in a 3.3V power supply to a 13komhm resistor in series with the photodiodes (when light hits the sensors, the resistance falls from 15kohm to low ohms and voltage across the series resistors goes high, which i measure on a scope).The oscilloscope shows beautiful curves, everything is perfect! But then i try it in sunlight... The signal is too small to measure. Hmmm i'm a bit unsure how to proceed?Here's my guesses:1. Optically filter out the ambient sunlight using a bandpass filter2. Use a 1 nF capacitor to remove ambient signal since it's dc. Attach an amplifier of some sort to each photodiode in the array. I have no experience at this? FET? Op'amps?3. Don't apply an external voltage to the sensors. Let them generate their own voltage when light hits them. Amplify the voltage somehow?To explain the issue another way, the sensors change in resistance is easily measurable in the shade, going from high to low kohm when struck by pulsed light. When in sunlight it's resistance drops to nearly complete zero, <0.01 ohms. Any pulsed light added on top of the sunlight causes only a tiny change in resistance that i can't measure on my scope.Any ideas appreciated.

author: KMoffett
author_rank: Regular Contributor
timestamp: May 10, 2020, 11:50:01 am
content: Is the pulsed light source and the photo detector in fixed positions?

author: Gyro
author_rank: Super Contributor
timestamp: May 10, 2020, 12:17:30 pm
content: Optical filtering would probably be the most effective - that would be tackling the problem at source rather than trying to sticking plaster around it. It's also the approach taken by standard IR receivers (that and AGC).

author: aussie_laser_dude
author_rank: Contributor
timestamp: May 10, 2020, 12:19:59 pm
content: They'll be moving all over the place. Ambient light hitting the detector will change constantly as the detector is moved in and out of shadows and turned around etc. A simple 1nF capacitor does a nice job fixing the dc offset to 0 volts, but the signal strength of the pulsed light in sunlight is horrible. Look at the photos i've attached, there's an oscilloscope curve measured in an "indoors ambient light environment" which is perfect, outside in the sun it's a very flat line, no noticeable voltage peaks.

author: aussie_laser_dude
author_rank: Contributor
timestamp: May 10, 2020, 12:44:00 pm
content: Thanks Gyro, yes optical filter sounds like the best thing, i've ordered a $100 optical bandpass filter (ouch, this approach isn't cheap). I'd like to be able to understand the electronic approaches too, i like learning this stuff. A 50nm bandpass filter will make it so the ambient light and pulsed light have similar power levels, so there'll still be a reduction in amplitude of the peaks, but just being able to measure at all would be awesome!I'm looking into the Automatic Gain control you suggested, that's kinda what i'm after. I'm not good enough at EE to know if a simple FET /opamp would fix everything?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 10, 2020, 12:53:17 pm
content: Well yeah, sunlight is comparable irradiance to that puny laser.If it's a red laser, note that filtering only gets you so much. Or IR. Plenty of both in sunlight.One defining characteristic of your problem would seem to be the pulse width. Perhaps the laser diodes can be AC coupled, i.e. supplied by an inductance from a CV supply, and the signal coupled out with a capacitor, removing DC offset. (The inductor would most likely be emulated with a transistor gyrator circuit, giving a modest and controllable impedance, even to low frequencies if needed, and implementing current limiting protection for instance.) Any correlation between signals (e.g., one pulse is detected so another pulse follows on the next, and so on) would be valuable information, and can be incorporated into the detection circuit (or analyzed wholesale by digitizing everything and doing statistics on a PC or whatever).Tim

author: tggzzz
author_rank: Super Contributor
timestamp: May 10, 2020, 01:02:51 pm
content: Firstly show us a schematic; there's little point in us playing "20 questions" trying to figure out how we might help.Secondly don't think in terms of a photodiode's resistance. Do think in terms of the current. That will help you understand what you can do to minimise the problem.

author: David Hess
author_rank: Super Contributor
timestamp: May 10, 2020, 01:40:14 pm
content: AC coupling the photodiode amplifier to remove ambient light is the common solution. The best way to do this is with a DC restoration loop around the photodiode amplifier.

author: Siwastaja
author_rank: Super Contributor
timestamp: May 10, 2020, 02:00:13 pm
content: Note that sunlight has a smooth spectrum (some minor spiking is there, but irrelevant here).Laser, OTOH, is extremely narrow bandwidth, and very repeatable i.e. the band does not drift.Hence, using tight optical bandpass filters, thing about FWHM=10..20nm or so, is an easy way to decrease the sunlight contribution by maybe two orders of magnitude.It isn't very low-cost, though; proper filters cost some serious money, they are of dichroic (interference) type. First try to deal with it electrically, which is OK with the following limitations:* Sunlight contribution needs to be in the linear range of the sensor to be removed (if thesensoritself saturates, there is no difference if you hit it with more light, nothing AC coupling can help),* Shot noise in the sunlight is passed through the DC removal. The more light there is, the more noise.If you can't achieve good enough results electronically, then the next step is consider optical filtering, additionally.In any case, we need the part number for the photodiode (or a very similar one if you can't disclose the actual part), and a schematic of your current sensing circuitry.

author: aussie_laser_dude
author_rank: Contributor
timestamp: May 10, 2020, 02:28:29 pm
content: Thanks guys,I've attached a circuit diagram for a single diode (photodiode is BPW34S high speed silicon PIN photodiode).Thanks Tim and David, I've tried ac coupling via a simple 1nf capacitor, it's working well to remove the slow changing offset caused by ambient light. The fast changing signal is all that's wanted here. Unfortunately the signal amplitude drops to near zero with ambient sunlighta dc restoration loop? I'll investigate that.Thanks tggzzz, i'm trying to solve in terms of current, doing the math is proving challenging. Intuitively i expect eithera) the photodiode actually saturates from too much sunlight and the current is a flat dc curve even with the extra pulsed light. ORb) it doesn't actually saturate, there's a big dc current with tiny periodic spikes from the pulsed light. The capacitor in my circuit should remove the dc offset and keep the spikes... I don't see the ac spikes when measuring with ambient sunlight so i guess that means it's case a, the photodiode can't create anymore free electrons? ie. It's optically saturated!?

author: ejeffrey
author_rank: Super Contributor
timestamp: May 10, 2020, 03:08:09 pm
content: Increase your bias voltage or decrease the shunt resistor. You aren't saturating the photodiode you are saturating the battery+resistor. Drop the resistor to 1k and add an extra gain stage and should be fine.

author: ejeffrey
author_rank: Super Contributor
timestamp: May 10, 2020, 03:26:10 pm
content: Also, always draw a photodiode as a diode not just a circle.

author: ejeffrey
author_rank: Super Contributor
timestamp: May 10, 2020, 03:30:23 pm
content: Wait: is your sensor a photodiode reverse biased (ie in photoconductive mode) or a photoconductive sensor or LDR?

author: TimFox
author_rank: Super Contributor
timestamp: May 10, 2020, 03:31:24 pm
content: Your circuit will "saturate" when the DC photocurrent through the 13k resistor produces a voltage that overcomes your bias battery voltage and the parasitic diode of the photodiode forward biases, shorting out the photocurrent and preventing it from reaching your output meter.

author: tggzzz
author_rank: Super Contributor
timestamp: May 10, 2020, 03:38:16 pm
content: Quote from: aussie_laser_dude on May 10, 2020, 02:28:29 pmThat's half a circuit diagram: it doesn't indicate which way round the photodiode is connected. Yes, it matters!Assuming it is reverse biassed, then the arithmetic is simple. If you have x watts of light falling on the PD then it will have a current of i=x/2 amps. The voltage drop across the resistor will then be 13000*i. If we assume that we want >1V reverse bias across the PD, then the max voltage across the resistor can be 2.3V, and from that you can work out the maximum allowable light before saturation.You should also do research on opamp transimpedance amplifiers. That will help you improve the sensitivity and frequency response.You would also benefit from removing the 1nF cap in series with the resistor (why aren't you using AC coupling?). Then monitor the voltage while the 10us light pulses are there. Then gradually increase the ambient light (torch?) and observe the voltage. That should help you understand what is happening.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 10, 2020, 06:15:17 pm
content: That's why I said use an inductance, or something emulating it -- the resistor allows the photodiode to saturate and the gain drops towards zero.Tim

author: twospoons
author_rank: Frequent Contributor
timestamp: May 10, 2020, 11:04:09 pm
content: In a previous job I built an IR laser receiver using BPW34s that could detect a 1pJ pulse in full sun. Your pulse is ~10nJ, so it should be fairly easy. The circuit used the BPW34s in photovoltaic mode (no bias) and fed the photocurrent through a small pulse transformer to remove the DC current produced by ambient light. There was a fairly high gain pulse amplifier after that, built using BFT92 BJTs.If you dont want to use photovoltaic mode, which can be a bit slower, then you might want to try using a gyrator as the bias load (one BJT, one cap, one resistor).Both methods shown below, but ignore the component values - they're just the schematic editor defaults.

author: David Hess
author_rank: Super Contributor
timestamp: May 11, 2020, 09:22:22 am
content: Quote from: aussie_laser_dude on May 10, 2020, 02:28:29 pmIf the photodiode amplifier is inverting, then an integrator which is also inverting can compare the output to zero and subtract a current from the input to stabilize the output. This produces a high pass response from the integrator's low pass response.https://e2e.ti.com/support/amplifiers/f/14/t/300533?AC-Coupled-PhotodiodeThis integrator trick also works with instrumentation amplifiers to produce a high pass response.

author: aussie_laser_dude
author_rank: Contributor
timestamp: May 11, 2020, 10:02:04 pm
content: Thanks for the messages guys, lots of info to take in. Sorry i messed up my terminology, i've used reverse bias mode and also photovoltaic mode (not photoconductive). Both circuits have similar outputs in sunlight, but the reverse bias circuit has a much stronger signal in the shade. Should fully understand the battery/resistor saturation theory later today after a few more tests, also nearly got a bjt pnp amplifier ready to test and op amps are in the mail so this is exciting!Twospoons, was the IR wavelength of your device above 800nm? It's got quite impressive specs for being bathed in sunlight, i'm guessing the design had an optical low pass / bandpass filter?

author: StillTrying
author_rank: Super Contributor
timestamp: May 11, 2020, 10:57:40 pm
content: All you've got to do to prevent saturating is to lower the 13k to about 2k2.Start simple to find out what the photo diode's outputcurrentis.https://www.eevblog.com/forum/beginners/more-help-with-ir-photo-diodes-please/msg3035868/#msg3035868

author: twospoons
author_rank: Frequent Contributor
timestamp: May 12, 2020, 01:35:14 am
content: It was around the 800nm wavelength. This was a while ago so some details are a little hazy . The version of BPW34 we were using had a built-in longpass daylight filter. Just a dye incorporated in the package.Running reverse bias does usually yield more signal - we were using photovoltaic mode to save power in a battery operated system. We would have needed to supply over 30mA otherwise (lots of photodiodes).Attached is one trick to getting good signal in photovoltaic mode. The transformer takes care of the DC current, and the transistor acts as a trans-impedance amplifier.

author: aussie_laser_dude
author_rank: Contributor
timestamp: May 12, 2020, 02:17:19 am
content: Quoteahhh haha, numbers make a lot more sense to me now.Thanks guys, figured out most of the details, using a 1 kohm resistor in reverse bias mode does actually work quite well. The signal is very low (~5mV100mV), definitely needs amplification, but now the AC signal remains a constant amplitude when the ambient sunlight changes. I've attached a pic of it operating in sunlight nicely and also a pic of my photodiode math/theory. Thanks tggzzz, ejeffrey, TimFox, T3sl4co1l & StillTrying for help on understanding this stuffSweet, that's half the problem solved!Now onto the amplification side of things, pretty hyped to try out some different amplification methods, I do also plan to save battery using the photovoltaic approach (but happy to try out reverse bias circuits in early prototypes, whatever gets the prototype working), thanks twospoons, will definitely look into the circuits you've given.Thanks once again guys, one step closer turning an idea into reality

author: aussie_laser_dude
author_rank: Contributor
timestamp: May 12, 2020, 10:21:46 am
content: Could I get some help with understanding twospoons small pulse transformer photovoltaic circuit in "reply 16". Transformers scare me, I don't understand transformer details very well.My understanding is the transformer will have a limited bandwidth, I have no idea how to calculate transformer properties and load resistor R1 that will give a bandwidth of say >3 MHz for the photovoltaic photodiode.Could R1 be changed from 1 Kohm to 10 Kohm without ruining the circuit bandwidth? My reasoning is that the large DC current from the photodiode won't be passing through the R1 resistor, so we can use a higher value resistor to get a higher potential difference. I'm worried this will sacrifice the bandwidth of the transformer or photovoltaic photodiode, but I'm too dumb to understand how to figure this out. I have no idea of the math. If anyone has a good link that explains these properties of transformers I'd love to have a look.Also, could a 1:4 transformer be used, ie. 1mV AC in and 4mV ac out on other side? Would a transformer like this ruin the bandwidth somehow? Is it better to stick to 1:1 transformers?Thanks for any help

author: SparkyFX
author_rank: Frequent Contributor
timestamp: May 12, 2020, 12:44:38 pm
content: You could try a polarizing filter in front of the receiver, those filter out ambient stray light very efficient. I can't tell if all lasers are polarized in general or you need to arrange the laser in a specific orientation, could you work with that?

author: TimFox
author_rank: Super Contributor
timestamp: May 12, 2020, 01:14:44 pm
content: Be careful with Polaroid-type (absorptive) polarizing filters and lasers. As a young graduate student, I burned a hole in a Polaroid by sending a low-power laser beam through it: the polarizer works by absorbing the power with the wrong polarization.

author: tggzzz
author_rank: Super Contributor
timestamp: May 12, 2020, 01:19:06 pm
content: Quote from: SparkyFX on May 12, 2020, 12:44:38 pmA neutral density filter with an attenuation of 10dB will filter out exactly as much ambient light as a 10dB polarising filter. It will only make a large difference if the ambient light is polarised in one appropriately - which is unlikely.

author: aussie_laser_dude
author_rank: Contributor
timestamp: May 12, 2020, 08:28:01 pm
content: QuotePolarisers are a nice idea, yes lasers are highly polarised and ambient light usually is not. Unfortunately it's not easy to implement in this particular design where polarisation angle and detector orientation are constantly changing. No big loss though, an optical bandpass filter and a high pass ac filter will give pretty impressive results. Simple photodiodes with an ac filter without optical filtering is already giving very clean waveforms as seen in the pics, they're just too small (~5mV100mV) for the adc to read, needs amplification.I'm a noob at circuit design, can get my head around bjt / op amp part selection but can't understand mathematically or intuitively how to select the right transformer and load resistor?

author: twospoons
author_rank: Frequent Contributor
timestamp: May 13, 2020, 12:11:07 am
content: Quote from: aussie_laser_dude on May 12, 2020, 10:21:46 amThis is a great opportunity for self-learning, and those should never be passed by1. Think about this as a current transformer and everything becomes much clearer. In fact its really important to think of this whole thing in terms of a signalcurrent.2. 1:1 will work just fine. Construction should be done using bifilar winding for best coupling. The core can be very small - but should ideally have an airgap to avoid saturation. The core I used was a 6mm potcore - really tiny.3. You really want to feed into a low impedance to get the bandwidth up, think about amplifying current, rather than voltage. The conversion to a voltage signal can be done later. The transimpedance circuit I posted does this.4. Driving into a low impedance means the voltage across the the diode changes very little, which is good because you are then not trying to charge the self capacitance of the diode, which would otherwise reduce the signal.5. Choose a reasonably high frequency ferrite for the core. Something intended for pulse transformers, or RF inductors or filters. Something like 4C65 or 4B2 would probably work well (Ferroxcube types - there will be equivalents from other manufacturersAs I mentioned in the first post - ignore the resistor values posted, they are just placeholder values and are not correct.If you haven't already, its worth studying the photodiode equivalent circuit:

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 13, 2020, 12:19:45 am
content: Quote from: aussie_laser_dude on May 12, 2020, 10:21:46 amNo, actually you probably want a lower impedance to keep bandwidth higher.Transformers also have a characteristic impedance, which should be matched for best results. It may notneedto be -- say if you have enough excess bandwidth that you're limited by other constraints in the circuit, like PD capacitance.Roughly speaking, you can calculate the bandwidth of the photodiode by its capacitance, and the load resistance:F_H = 1 / (2 pi R C)This is a lowpass cutoff, so that you can't expect to get much gain at frequencies above this (indeed, the gain will be dropping ~asymptotically with rising frequency, i.e. -20dB/dec), and gain will be flat below.This is a good reason to employ PD bias: the capacitance drops maybe 3x or more under bias, therefore increasing bandwidth by as much. (Again, if you don't need it, it's okay not to, as in twospoons's case.)The transformer, conversely, has a highpass cutoff:F_L = R / (2 pi L)F_H and F_L seem to be named backwards, huh? Well, H is the higher (upper) cutoff, and L the lower. F_H > F_L. The upper cutoff has a lowpass characteristic, and the lower has a highpass characteristic. "Pass" vs. "cut" terminology I guess.The transformer also has another kind of cutoff: the series attenuating effect of leakage inductance (LL), and the parallel shunting effect of parasitic capacitance (Cp). More generally, it has impedance and length -- it's wound from wire, after all, and wire has impedance and  length -- delay. This too is a lowpass characteristic, so manifests as another F_H in the system. You generally want this higher than needed; and, this shouldn't be hard to achieve at these modest frequencies.Example: suppose your system resistance is 1k as shown (note that he just put in default values to show the connection, with no intent of these being real values!). Suppose your photodiode is, oh I don't know, 100pF say. 100pF and 1kohm rolls off at F_H = 1.59MHz.To get a bandwidth from say 10kHz to 1.59MHz, you need a transformer that gives F_L at most that, and that has small enough LL and Cp that its cutoff exceeds 1.59MHz. This needs,L = 15.9mHLL << 100uHCp << 100pFAs it turns out, LL will be the easy one; more likely ~1uH will be seen. Cp however is easily taken up by a few meters of wire windings, so you will prefer a hi-mu core (typically ferrite or nanocrystalline) with a fairly thick cross section, so as to maximize winding inductance (L) while minimizing wire length (which corresponds to LL and Cp). Thick toroids, pot cores and other shapes are typical options. Twisted pair wire is probably fine.Note that a transformer isn't needed at all, if you don't need isolation! You can simply use an inductor of, right about 15.9mH, in parallel with the photodiode, to set the high pass cutoff without needing a transformer at all.Step-up:Certainly, you can get ratios from a transformer! Or again, if isolation isn't necessary, it can be an autoformer, which is nice to save a few turns.We're still limited by the same resistance * capacitance at the photodiode. Transformers with high impedance secondaries also get much harder to construct -- impedance goes as turns ratio squared, but Cp doesn't drop, indeed it tends to keep going up (with wire length). So the transformer bandwidth gets worse as you go in this direction. More than a few kohms at this bandwidth is actuallychallenging.To what end, do you need the impedance matched, anyway? Surely if the impedance is simply low to begin with, you would use a lower impedance amplifier as well? Say, an op-amp with rather beefy inputs that gives refreshingly low e_n (nV/rtHz) but annoyingly high i_n (~pA/rtHz?), or a discrete low-noise amplifier or purchased module that is best suited to quite low impedances, say 50 ohms. Indeed you might get better performance (lower noise and higher bandwidth) this way, than with a transformer ratio up to a more jellybean (TL072??) amplifier.The gold standard for photodiodes of course is a low noise transimpedance amplifier; this is just an amplifier configuration that best suits the diode's properties. It's best used when placed as near to the diode as possible, i.e., with no transformer or connecting cables delaying its response.I guess that low noise isn't actually a high priority here, as your signal is fairly strong (a direct laser beam I guess?), and you don't seem to care about ambient noise sources; or maybe you just aren't to the stage where it matters yet. (Sunlight may be fairly stable, but is subject to fading*, and ambient sources (fluorescents, LEDs; even incandescents to a lesser degree!) often fluctuate at mains frequency.)*Fading is the radio-frequency effect of speckling or twinkling transmissions and reflections. In the shortwave band it manifests as ionospheric layers moving about, and what's fading is the signal, which comes and goes over time, sometimes pretty deeply (+/- 10dB or more). The same thing works optically with diffraction (twinkling stars!), speckle (coherent (laser) reflection from disorderly surfaces?) and so on. Plus the more obvious influences to sunlight: clouds casting shadows, cars shining reflections through windows, etc.Tim

author: twospoons
author_rank: Frequent Contributor
timestamp: May 13, 2020, 12:28:03 am
content: Quote from: aussie_laser_dude on May 12, 2020, 08:28:01 pmThe solution there is a circular polarizer, which should work well given the narrow linewidth of a typical laser. Just remember that reflection will reverse the handedness of the polarization.

author: aussie_laser_dude
author_rank: Contributor
timestamp: May 13, 2020, 08:34:15 am
content: QuoteF_H = 1/(2*pi*1kohm*25pF) = 6MHz (25pf capacitance @ 3V) vs 2MHz (70pF capacitance @ 0V photovoltaic mode).Looks like the ~1 kohm resistor that guys here have suggested is a pretty good value to use with this photodiode.Quotehmm, I think I understand things a little, for equal magnetic flux change between the two transformer coils you'll need an equal current change (for 1:1 case), so on secondary coil we'll have our standard V = IR resistor load electronics happening which we can amplify by whatever method.QuoteI've actually done something kind of similar in the past, pulsed laser + circular polarizer + wollaston prism with dual balanced photodetectors + lockin amplifier (and other stuff) for detecting incredibly small changes in light polarization. Was pretty good for measurement of sub ps electronics. It is a rare and pleasant surprise to now be measuring a raw signal that can be displayed on an oscilloscope and not be buried in the noise, this is a luxury indeed.It's going to take a few days for me to comprehend all of this stuff in detail, but decided to give a crack at a simple design with light/current/voltage calculations and stuff. Op amps sound like a good idea to me, the high input impedance makes them a bit easier to understand, an npn BJT amplifier design will take me another day to learn.If there's anyone out there who likes to criticize designs, here's a good opportunity. There's got to be a really obvious, really dumb and really wrong mistake in the attached photo...

author: Siwastaja
author_rank: Super Contributor
timestamp: May 13, 2020, 10:59:08 am
content: IMHO, don't waste time on polarizing filter, you may be able to get some (like maybe 2-3x?) of extra signal-to-ambient ratio out of it, but with a simple bandpass filter you easily get 20-30x!Yes, laser is heavily polarized and ambient light mostly isn't, but laser is also a small peak in wavelength, which ambient is not. The latter feature is easier to extract a lot of benefit out of it. If you want to use polarization to perform attenuation of ambient, the physical alignment of source and measurement becomes critical.

author: twospoons
author_rank: Frequent Contributor
timestamp: May 13, 2020, 11:23:00 pm
content: Quote from: aussie_laser_dude on May 13, 2020, 08:34:15 amAh, yeah. The 30M resistor is ridiculously high and will cause you nothing but trouble. Scale everything back by 100x, or use a T-network of more reasonable values.Also you can do this with just one opamp and one resistor. And this will get you your best bandwidth.- neg input is set up as a virtual earth, so any current in the secondary of the transformer will be forced (by the opamp) to flow in R1. So VOUT = I x R1 : thats your transimpedance gain equation.- The tfr secondary sees a very low impedance, which is what you want for best bandwidth.You will note this is the same as your circuit topology, but with R2 set to zero. R1 becomes unnecessary, as it is 'shorted' by the virtual earth. Remember this is acurrentsignal.You dont actually have to use a transformer - an inductor will do too.

author: StillTrying
author_rank: Super Contributor
timestamp: May 13, 2020, 11:47:02 pm
content: How much current does the laser produce from the photodiode, your 5mV with a 1k load suggests only a 5uA change, that seems very low, I'd expect (hope) for 10 to 20 times that.How much current does the ambient light produce from the photodiode.With a few numbers on the wanted and unwanted current values it's quite possible to simulate photodiode circuits reasonably accurately.https://www.eevblog.com/forum/projects/charge-sensitive-amplifier-for-photomultiplier/msg2871826/#msg2871826How is the timing of the 10us light pulse produced, by the laser crossing the PD, or a 10us electronic on-time.If it's a 10us 'laser turned on time', the 10us signal from the PD should be very square, because there's enough bandwidth.Why do the pulses have to be 10us wide, I'd probably go for a bit less to make it a bit easier to separate the pulses from fast unwanted ambient light changes such as reflections off a shiny object, but I'm only guessing what your final want is.

author: aussie_laser_dude
author_rank: Contributor
timestamp: May 14, 2020, 11:46:42 am
content: QuoteWell spotted! I've fixed the incorrect value, 5mV was due to forgetting the x10 scope probe attenuation. It's currently ~100mV for 0.2mW laser light for both experiment and theoretical calculations (only part of the 1mW beam will strike the 2mm wide array given laser beam width).QuoteSee my Reply #30 attachment. Even with a $100 optical bandpass filter sunlight is still ~3x higher than the laser, this is better than the 50x ratio without the filter. A UV laser would have been a good choice since sunlight photon flux is low at that wavelength but I suppose it's nice having a laser that can be seen. btw I'm impressed at the deductive skills of some individuals here, too many smart people hahaQuoteOMG... Witchcraft! I had no idea op amps could amplify a current directly. I'll need to study transimpedance amplifiers in detail. I would have thought the current in the secondary coil is being forced through a very high resistance load, but apparently it just goes around the op amp. My mind is blown.Didn't realize the complexity on op amp design, all kinds of noises and special circuitry tricks, could spend days learning the absolute basics (pretty interesting though!).Quote1. I need to get over my fear of transformers and grow as an individual2. I suspect that a slow changing background light source over ms will be filtered better by a transformer. My thoughts are that the inductor will take time to change from one DC current to another when a shadow passes the detector causing some "leaked dc" into the amplifier over milliseconds?Anyway, I think that's the two subgoals reached! Got a photodiode circuit that will work in the sun and got a pre-ADC amplifier. Cheers guys! Thanks heaps twospoons for the help with different designs! Will have to re-read some posts to understand everything.

author: tggzzz
author_rank: Super Contributor
timestamp: May 14, 2020, 12:28:07 pm
content: Quote from: aussie_laser_dude on May 14, 2020, 11:46:42 amThe way to think about voltage opamps (in the normal operating regime) is that the output will perform gymnastics to keep the two inputs at the same voltage, and that no current goes into the opamp.So if you have an inverting amp, all the current through the input resistor goes through the feedback resistor. If there is no input resistor, any current (e.g. from a photodiode) still goes through the feedback resistor. The gain is then measured in units of Vout/Iin.I would still consider reverse biassing your photodiode, to reduce capacitance and increase linearity (if that matters). If you can choose amplifier gain and power supply so that you get adequate signal output without the ambient light saturating the amplifier, I'd consider omitting the transformer and AC coupling the amplifier's output to the next stage.Current feedback opamps are a different kettle of fish, with differing advantages and disadvantages. They are not relevant to your problem.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 14, 2020, 01:37:47 pm
content: Quote from: twospoons on May 13, 2020, 11:23:00 pmThat configuration will magnify the offset voltage of the opamp. Easiest fix for that is to connect the photodiode directly. Then add an integrator and another resistor to cancel out DC.

author: David Hess
author_rank: Super Contributor
timestamp: May 14, 2020, 03:01:58 pm
content: Quote from: tggzzz on May 14, 2020, 12:28:07 pmThey might be relevant. Current feedback operational amplifiers are used for higher performance transimpedance amplifiers in photodiode applications.

author: tggzzz
author_rank: Super Contributor
timestamp: May 14, 2020, 04:14:40 pm
content: Quote from: David Hess on May 14, 2020, 03:01:58 pmI haven't seen that done, and Phil Hobb's book doesn't mention it. But that's a weak argumentI think that book will be sufficient for the OP, and give them more than enough to think about.

author: StillTrying
author_rank: Super Contributor
timestamp: May 14, 2020, 10:50:28 pm
content: Quote from: aussie_laser_dude on May 14, 2020, 11:46:42 amI thought you had only about 5mV of signal on top of 1.5V of ambient, but your signal to noise/ambient is 100 times better than that.50uA of photodiode current signal is quite a lot, even if the ambient is still higher.Do some simulation.TheGreenplot is simulated photodiode current, 50uA 5us wide pulses on top of 0 to 400uA of ambient changing at 1kHz.TheYellowplot is attempting to separate the pulses from the changing ambient by the AC coupled method.TheRedplot is using an inductor method.The last three are close ups of the first three.I don't know how to do simulated transformer versions.

author: twospoons
author_rank: Frequent Contributor
timestamp: May 15, 2020, 12:17:16 am
content: Quote from: NiHaoMike on May 14, 2020, 01:37:47 pmYes it will, but its fairly easy to pick a low offset opamp and/or add offset trimming. At least it will be fairly constant, unlike the ambient induced DC offset. Or simply live with it, by splitting the amplification into several AC coupled stages.Now we're heading into the 'art' side of engineering: one problem with multiple solutions.

author: aussie_laser_dude
author_rank: Contributor
timestamp: May 15, 2020, 03:21:46 am
content: oh snap....Yeah I didn't give much thought to the dc top of the square wave pulses being filtered out,(with hindsight)that's obviously going to be removed with a high pass filter. oops lol.Art hat on:Option A)Take two signals,1. raw photodiode signal2. a slow changing filtered signal made via a cap / inductor to measure ambient lightThen subtract them and amplify using an op amp to get square wave pulses with removed ambient DC current.Option B)Feed the highpass filtered signal into an amplifying & integrating op amp, that'll reconstruct the square waves with no dc offset i think? This approach sounds fun (oh, NiHaoMike already had a similar, probably better idea that I missed)

author: twospoons
author_rank: Frequent Contributor
timestamp: May 15, 2020, 05:54:36 am
content: Quote from: aussie_laser_dude on May 15, 2020, 03:21:46 amwait .. what?What squarewave pulses?If you want to pass a squarewave, and block DC, youwanta highpass filter - with a cutoff below the fundamental of the squarewave. Its all the higher harmonics that make it square and flat across the top.

author: nfmax
author_rank: Super Contributor
timestamp: May 15, 2020, 07:43:33 am
content: Quote from: Siwastaja on May 13, 2020, 10:59:08 amI suspect the OP is well aware, but others may not be, of the fact that a narrow-band dielectric optical filter will only give the desired response for light incidentnormallyon its surface. The sunlight may come from any direction, which may give problems. But it sounds like you have so many wanted photons, even the shot noise from the sunlight isn't a big issue. Luxury!P.S. Get a copy of Phill Hobbs' book. A third edition is in preparation and may be published this year, but I wouldn't wait

author: tggzzz
author_rank: Super Contributor
timestamp: May 15, 2020, 08:01:21 am
content: I realised nobody has posted a link to Phil Hobb's site onthisthread. 18 hours ago I posted the info below on another thread on the same topic...You should invest in Phil Hobbs' bookhttps://www.electrooptical.net/Building_ElectroOptical_Systems/Alternatively, if you can ask a good and interesting question which doesn't look like you are merely after free consultancy, he may respond on usenet group sci.electronics.design.

author: aussie_laser_dude
author_rank: Contributor
timestamp: May 15, 2020, 08:46:03 am
content: QuoteThat's pretty tempting, the contents convinced me to get it, then i saw the price. Still tempted though. I'm sure it's worth it.QuoteYeah it's crossed my mind, too many unknowns at this stage to know for sure if it'll work or not (maximum incidence angle, thickness and properties of dielectric layers etc) so might as well just buy it and see if it helps.[Edit: Might be getting a bit iffy past the 30 deg mark...QuoteI want to keep the squarewave pulses (well kinda squarish shaped pulses) and remove the slow changing ambient background. StillTrying's simulation shows that an inductor / capacitor can be used to make a high pass filter, but it "splits" the pulse into a positive and negative peak which is unwanted.I'll need to think about the harmonics twospoons mentioned. My op amps just arrived in the mail a few hours ago so I can start toying with them and try to figure this one out, should be fun.I really want that book...