I have had this article unpublished for two years. The original draft got very complicated, and I never used that myself. It was a voltage controlled current source where the voltage represent the optical power with 1V/W. An example is available for download below for anyone who want to work on that. It does allow inclusion of noise and dark current.

The more practical way of modeling a photodiode is to represent it as a SPICE current source.

 

PD_sim.svg
Figure 1. Simple photodiode arrangement. The PD D1 is reverse biased and the anode terminated with 50ohm. R1 is inserted in preparation of simulation, it allows probing to current.

 

The reverse biased photodiode is a common circuit for measurement of fast varying optical signals. 

The aim is to run a SPICE simulation of the circuit, for example for an optical pulse on the photodiode. For that we need to replace D1, the PD with a simulation element which represent the optical to electrical conversion. The suggestion above is that a SPICE current source can represent a photodiode.

A SPICE current source is specified with following.

 

PULSE(V1 V2 TD TR TF PW PER NP)

 

Where the parameters are defined in the table.

 

ngspice-manual_p95.svg
Figure 2. Table defining the PULSE parameters in ngspice pulse sources. PULSE(V1 V2 TD TR TF PW PER NP).

Since we want to model the response to an optical pulse we use a current pulse source. For continuous wave (CW) we would use a DC source. In either case we have to fill in the source parameter that describe the optical to electrical conversion. Here I will go through the pulse case.

The timing values are just the same as for the received optical pulse. Initial value and Pulse value relate to the optical power. Photodiode datasheets give responsivity with the SI unit A/W. This is the linear conversion coefficient from optical power in W to photodiode current in Ampere. It can be difficult to estimate the optical power hitting the photodiode active area. Often we will work backwards from the minimum detected optical power to what optical power is needed. For example in TV remote control we can calculate how much power the receiver in the TV needs and then determine what power the remote control has to emit.

To get a rough idea of the photodiode current some photodiode datasheets give a standard test conditions, typically EE = 1 mW/cm2 and the reverse light current for that optical light intensity.

The order of magnitude of the light current is tens of μA. The responsivity depends mostly on the photodiode material Si, InGaAs, Ge (0.6, 0.75, 0.85) A/W each at their peak response wavelength. The larger variation in light current comes from different active area size. A larger area capture more power.

To simulate for a particular photodiode and knows optical power and wavelength use the datasheet values. For the purpose of this example we can take values from some datasheet. 

We see values for Reverse Light Current from 8 to 18 μA for OP950, OP955 models. This gives a good idea of the order of magnitude, Light Current ~10 μA. The datasheet also gives Dark Current. That is the current with no light on the photodiode and a given reverse voltage. Dark current tend to increase with larger reverse current.

For this photodiode they state 1 nA typically at the very large reverse voltage of 30 V. We can include that since we need to specify Initial value anyway.

For the SPICE current source that will substitute for the photodiode in the simulation we can set;

Initial value : 1 nA and Pulse value 10uA.

 

Note that SPICE use Suffix for exponential notation, they vary on some exponents from the SI unit prefix. The SPICE number suffix is not case sensitive, that is why we have Meg = meg for Mega so it can not be confused with milli.

 

ngspice-45-manual_p48.svg
Figure 3. Table with ngspice suffixes.

The Kicad IPULSE symbol Sim.Params y1=1n y2=10u td=0.5u tr=2n tf=2n tw=500n per=5u are passed as I1 /Cathode /Anode PULSE( 1n 10u 0.5u 2n 2n 500n 5u ) in the simulation netlist.

reverseBiased_PD_sim_sch.png
Figure 4. Kicad simulation schematic with current source modeling a PD.

The reverse bias voltage of +5V will in the real circuit set the compliance of the current source which in the simulation is an ideal current source with infinite compliance. For an unbiased photodiode the max voltage is set by the bandgap. You can measure that with a DMM in diode mode. It is around 0.7V for Si photodiode.

reverseBiased_PD_simulation_output.png
Figure 5. Kicad simulation output.

The output Vout is the expected 500uV (10uA * 50R).

Another example with make the current source aspect more clear. In fig. 6 the photodiode anode is connected to the anode of a standard diode. A capacitor C1 accumulate the charge.

PD-D_sim_sch.png
Figure 6. Kicad simulation output.

 

PD-D_sim_output.png
Figure 7. Kicad simulation output.

The simulation output is shown in fig. 7. Since the photodiode is a current source it will drive current through the standard diode during the current pulses. The voltage across the capacitor increase with each current pulse. The resistor R2 of 1 M ohm represent a high impedance of an oscilloscope. The light current is increased to 500uA. With laser sources it is possible to focus a lot of power on the photodiode active area. When power increase light current increase, first linearly with the responsivity as slope, but at some point it will saturate and increase at a slower rate. Datasheets are not so clear on the linear range. From experience for ~1mm2 photodiode 100mV in 50 ohm is still in the linear range. That is 2mA light current. Some datasheets do specify Max. Reverse Current, e.g. 2mA for 300 μm Active Area Diameter.

With the simulation approach lets try a SPICE simulation of an amplified PD circuit. The figure is taken from a Hamamatsu technical note. They are the manufacturer of photodiodes like the S5971 for which they suggest that circuit.

 

High-speed_light_detection_circuit(1).svg
Figure 8. High-speed light detection circuit (1) from Hamamatsu Technical note: “Si photodiodes”.

After some experimentation to get the simulation to run the simulation circuit is as in fig. 9.

PD_OPA.svg
Figure 9. Kicad schematic for SPICE simulation of the PD circuit in fig. 8.

The capacitors in fig. 8 are for decoupling, they don’t change the SPICE simulation but should be used in a real circuit, likewise the 10K series resistor on PD cathode is over current protection to protect the PD. The simulation was at first unstable with the AD745.cir model for U1. The capacitors in fig. 8 are for decoupling, they don’t change the SPICE simulation but should be used in a real circuit, likewise the 10K series resistor on PD cathode is over current protection to protect the PD. The simulation was at first unstable with the AD745.cir model. The convergence options .options abstol=1e-10 .options reltol=0.05, helped in some case, but the real stability trick was the resistor R2 between IN+ and IN-. Some high speed OPAMP datasheets suggest such resistor for reduced overshoot.

PD_OPA_sim
Figure 10. SPICE simulation output of the OPA PD circuit in fig. 9 Light current is blue dotted line, right axis and Vout is in red referred to right axis.

The conversion gain is -500mV/100uA = -5000 V/A. The feedback resistor is Rf=10 k ohm. The reason why we don’t get a gain os 10k is the 51 R series resistor and the 50 R termination resistor. The series output resistor helps with matching to a 50 ohm line and isolated the OPAMP. The 50 ohm termination resistor is the oscilloscope input termination. We also note that the output is inverted. In many applications that does not matter but it is counter intuitive to get a negative signal for increasing optical power. I have a PCB project for a high gain moderate speed under electronics projects.

Anyway let's try to improve on the circuit in fig. 8. The status of AD745 is NOT RECOMMENDED FOR NEW DESIGNS. The stability was a problem, maybe the simulation model, or it is real. First step is to find another OPAMP. The Texas Instruments OPA818 is an interesting candidate. It has high gain bandwidth product (GBWP = 2.7GHz). With that we can get high gain and maintain fast temporal response. The photodiode (IPULSE) is reverse biased, but now by connecting anode to the negative supply rail (-5V).

PD_OPA818.svg
Figure 11. 

Non-inverting transimpedance photodiode amplifier with OPA818.

T

The simulation output fig. 12 show an order of magnitude higher gain (50k V/A) and now the output is positive. The capacitor (C1) in the feedback path is suggested in the datasheet and is needed for stability in the simulation. The value 0.1pF is very small, and it tells us the parasitic capacitance for the PCB implementation can have a significant impact on performance.

 

PD_OPA818_sim_output.png
Figure 12. Simulation output the light current is 10uA, right axis and the output voltage in 50 ohm is 500mV.

These examples show how we can simulate the behavior of circuits with photodiodes. The representation of the optical to electrical conversion by a SPICE current source capture enough of the photodiode characteristics for qualitative understanding of the circuit and for quantitative simulations.

 

Files for download

Description File name Download

Reverse biased PD

KiCad SPICE simulation, ZIP
PD_sim.zip Download

PD with diode integrator

KiCad SPICE simulation, ZIP
PD_D_sim.zip Download

Inverting transimpedance amplifier

KiCad SPICE simulation, ZIP
PD_OPA.zip Download

Non-inverting transimpedance amplifier

KiCad SPICE simulation, ZIP

PD_OPA818.zip Download

Voltage controlled current source PD model 1V/W

KiCad SPICE simulation, ZIP

Kicad_PD_SPICE_model_v4.zip Download

Contact us!

engineering@thorlase.com