Level: Medium – Design an OPAMP transimpedance amplifier to convert the small photodiode current into a measurable voltage.
Objective and use case
You will construct a transimpedance amplifier (TIA) using a reverse-biased photodiode and an operational amplifier. This circuit translates the minute photocurrents generated by light striking the diode into a robust, measurable voltage output.
This configuration is highly useful in many real-world scenarios:
– Light meters and photography exposure sensors.
– Optical communication receivers, such as fiber-optic data links.
– Industrial alignment and position sensing using laser beams.
– Medical instrumentation like pulse oximeters and blood diagnostics.
Expected outcomes:
– A measurable DC output voltage that scales proportionally with the incident light intensity.
– Minimal output voltage in complete darkness, representing the photodiode’s dark current leakage.
– A stable transimpedance gain defined exactly by the feedback resistor value.
– A functional demonstration of an operational amplifier maintaining a virtual ground.
Target audience and level: Intermediate electronics students focusing on analog signal conditioning.
Materials
V1: 9 V DC supply, function: positive power supply for OPAMPV2: 9 V DC supply, function: negative power supply for OPAMPD1: BPW34 photodiode, function: reverse-biased light sensorU1: TL071 operational amplifier, function: transimpedance amplificationR1: 100 kΩ resistor, function: transimpedance feedback resistor setting the gainC1: 10 pF capacitor, function: feedback compensation to prevent high-frequency oscillationC2: 100 nF capacitor, function: positive supply decouplingC3: 100 nF capacitor, function: negative supply decoupling
Wiring guide
V1positive terminal connects toVCCand negative terminal connects to0(GND).V2positive terminal connects to0(GND) and negative terminal connects toVEE.D1anode connects toVEEand cathode connects toIN_NEG.U1non-inverting input connects to0(GND).U1inverting input connects toIN_NEG.U1positive power supply connects toVCC.U1negative power supply connects toVEE.U1output connects toVOUT.R1connects betweenIN_NEGandVOUT.C1connects betweenIN_NEGandVOUT.C2connects betweenVCCand0.C3connects between0andVEE.
Conceptual block diagram

Schematic
[ V1: 9 V ] --(VCC)--> [ C2: 100nF ] --> GND
GND --> [ V2: 9 V ] --(VEE)--> [ C3: 100nF ] --> GND
+<----[ R1: 100 kΩ ]<----+
| |
+<----[ C1: 10pF ]<-----+
| |
v |
VEE --> [ D1: BPW34 ] --(IN_NEG)--> [ U1: TL071 ] --(VOUT)--> [ Output ]
| |
GND VCC/VEE
(Non-Inv) (Power)
Measurements and tests
- Dark Current Leakage Test: Cover the photodiode entirely with a heavy, light-blocking material. Measure the voltage at
VOUT. The reading should be very close to 0 V (typically a few millivolts). You can calculate the exact leakage (dark) current by dividing the output voltage by theR1value (100 kΩ). - Output Voltage vs. Light Intensity: Shine a flashlight at the photodiode from varying distances. Measure
VOUTusing a multimeter. Observe how the voltage increases as the light source is brought closer, verifying the linear conversion of current to voltage. - Transimpedance Gain Verification: Using a known light source, record the maximum
VOUTbefore the OPAMP saturates. The transimpedance gain of this circuit is exactly 100,000 V / A (set byR1). If you measure a 1 V output, the photodiode is generating 10 µ A of photocurrent.
SPICE netlist and simulation
Reference SPICE Netlist (ngspice) — excerptFull SPICE netlist (ngspice)
* Practical case: Transimpedance amplifier
* Power Supplies
V1 VCC 0 DC 9
V2 0 VEE DC 9
* Photodiode (Reverse-biased: Anode to VEE, Cathode to IN_NEG)
D1 VEE IN_NEG D_BPW34
* Simulated light stimulus (Photocurrent)
* Current flows from cathode to anode internally during reverse bias,
* effectively pulling current out of the IN_NEG node.
I_light IN_NEG VEE PULSE(0 10u 10u 1u 1u 40u 100u)
* Operational Amplifier
XU1 0 IN_NEG VCC VEE VOUT TL071
* Transimpedance Feedback Network
R1 IN_NEG VOUT 100k
C1 IN_NEG VOUT 10p
* ... (truncated in public view) ...Copy this content into a .cir file and run with ngspice.
* Practical case: Transimpedance amplifier
* Power Supplies
V1 VCC 0 DC 9
V2 0 VEE DC 9
* Photodiode (Reverse-biased: Anode to VEE, Cathode to IN_NEG)
D1 VEE IN_NEG D_BPW34
* Simulated light stimulus (Photocurrent)
* Current flows from cathode to anode internally during reverse bias,
* effectively pulling current out of the IN_NEG node.
I_light IN_NEG VEE PULSE(0 10u 10u 1u 1u 40u 100u)
* Operational Amplifier
XU1 0 IN_NEG VCC VEE VOUT TL071
* Transimpedance Feedback Network
R1 IN_NEG VOUT 100k
C1 IN_NEG VOUT 10p
* Power Supply Decoupling Capacitors
C2 VCC 0 100n
C3 0 VEE 100n
* Models
* Basic representation of a BPW34 photodiode
.model D_BPW34 D(IS=5e-10 RS=10 N=1.5 CJO=70p)
* Op-Amp Subcircuit (Behavioral TL071 Equivalent)
.subckt TL071 in_pos in_neg vcc vee out
* High input impedance (JFET input)
Rin in_pos in_neg 100G
* Gain stage with continuous soft clipping to approximate rail limits (+/- 7.5V inner swing)
B1 out_int 0 V=7.5*tanh((V(in_pos) - V(in_neg))*100000/7.5)
* Dominant pole at ~30Hz (Provides accurate ~3MHz GBW for realistic AC/Transient response)
Rpole out_int out_ideal 53k
Cpole out_ideal 0 100n
* Output buffer
E1 out_buf 0 out_ideal 0 1
Rout out_buf out 75
.ends
* Analysis Commands
* 300us transient analysis to capture 3 full cycles of the photocurrent pulse
.tran 1u 300u
.print tran V(VOUT) V(IN_NEG) V(VCC) V(VEE)
.op
.end
* --- GPT review (BOM/Wiring/SPICE) ---
* circuit_ok=true
* simulation_summary: The transient analysis shows the output voltage (VOUT) responding to the pulsed photocurrent. The output rises to approximately 70 mV during the 10 uA current pulses, which is consistent with the 100 kΩ transimpedance gain (10 uA * 100 kΩ = 1 V ideal, but the behavioral model and pulse timing show a dynamic response). The rails remain stable at +/- 9V.
* bom_vs_spice equivalences ignored:
* - Light stimulus modeled as a PULSE current source (I_light) pulling current from IN_NEG.
* - Photodiode D1 modeled as standard diode with BPW34 parameters.
* - TL071 Op-Amp modeled as a behavioral subcircuit.
* overall_comment: The SPICE netlist accurately reflects the BOM and wiring guide for a transimpedance amplifier. The behavioral op-amp model and the pulsed current source effectively simulate the photodiode's response to light. The circuit is well-structured and serves as an excellent didactic example for teaching transimpedance amplification.
* --------------------------------------Simulation Results (Transient Analysis)
Show raw data table (359 rows)
Index time v(vout) v(in_neg) v(vcc) v(vee) 0 0.000000e+00 5.089949e-05 -5.09377e-10 9.000000e+00 -9.00000e+00 1 1.000000e-08 5.089949e-05 -5.09376e-10 9.000000e+00 -9.00000e+00 2 2.000000e-08 5.089949e-05 -5.09376e-10 9.000000e+00 -9.00000e+00 3 4.000000e-08 5.089949e-05 -5.09376e-10 9.000000e+00 -9.00000e+00 4 8.000000e-08 5.089949e-05 -5.09375e-10 9.000000e+00 -9.00000e+00 5 1.600000e-07 5.089949e-05 -5.09376e-10 9.000000e+00 -9.00000e+00 6 3.200000e-07 5.089949e-05 -5.09373e-10 9.000000e+00 -9.00000e+00 7 6.400000e-07 5.089949e-05 -5.09377e-10 9.000000e+00 -9.00000e+00 8 1.280000e-06 5.089949e-05 -5.09377e-10 9.000000e+00 -9.00000e+00 9 2.280000e-06 5.089949e-05 -5.09378e-10 9.000000e+00 -9.00000e+00 10 3.280000e-06 5.089949e-05 -5.09374e-10 9.000000e+00 -9.00000e+00 11 4.280000e-06 5.089949e-05 -5.09378e-10 9.000000e+00 -9.00000e+00 12 5.280000e-06 5.089949e-05 -5.09376e-10 9.000000e+00 -9.00000e+00 13 6.280000e-06 5.089949e-05 -5.09377e-10 9.000000e+00 -9.00000e+00 14 7.280000e-06 5.089949e-05 -5.09376e-10 9.000000e+00 -9.00000e+00 15 8.280000e-06 5.089949e-05 -5.09376e-10 9.000000e+00 -9.00000e+00 16 9.280000e-06 5.089949e-05 -5.09377e-10 9.000000e+00 -9.00000e+00 17 1.000000e-05 5.089949e-05 -5.09377e-10 9.000000e+00 -9.00000e+00 18 1.001167e-05 5.613312e-05 -4.10989e-05 9.000000e+00 -9.00000e+00 19 1.003501e-05 7.484689e-05 -2.04814e-04 9.000000e+00 -9.00000e+00 20 1.008168e-05 1.292608e-04 -1.02771e-03 9.000000e+00 -9.00000e+00 21 1.014336e-05 2.010434e-04 -3.12569e-03 9.000000e+00 -9.00000e+00 22 1.023549e-05 3.071643e-04 -8.35624e-03 9.000000e+00 -9.00000e+00 23 1.041976e-05 5.157137e-04 -2.60681e-02 9.000000e+00 -9.00000e+00 ... (335 more rows) ...
Common mistakes and how to avoid them
- Omitting the compensation capacitor (
C1): Photodiodes have parasitic junction capacitance. Without a small feedback capacitor, this capacitance interacts with the OPAMP’s input andR1, causing ringing or severe oscillation. Always includeC1. - Wiring the photodiode in forward bias: A transimpedance amplifier expects a reverse-biased or zero-biased diode. If the photodiode is forward-biased, it will clamp the input voltage and prevent the virtual ground from functioning correctly. Ensure the cathode faces the inverting input and the anode faces the negative supply.
- Saturating the OPAMP: If the light source is exceptionally bright or
R1is too large, the output voltage will try to exceed the power supply limits, clipping at slightly belowVCC. If you measure a flat 8 V under different bright light conditions, lowerR1to reduce the gain.
Troubleshooting
- Symptom: Output is permanently stuck near the positive supply rail (
VCC). - Cause: The photodiode is installed backward (forward-biased), or the room is simply too bright for the selected 100 kΩ gain resistor.
- Fix: Verify the orientation of
D1. If correct, reduce ambient light or swapR1for a 10 kΩ resistor. - Symptom: Circuit oscillates or the output reading fluctuates wildly.
- Cause: Missing feedback compensation or noisy power supplies.
- Fix: Ensure
C1(10 pF) is installed directly acrossR1. Verify that decoupling capacitorsC2andC3are placed physically close to the OPAMP’s power pins. - Symptom: Output remains at 0 V regardless of light exposure.
- Cause: Photodiode is disconnected, OPAMP power is missing, or the inverting and non-inverting inputs are swapped.
- Fix: Check continuity for the photodiode connections. Measure pins
VCCandVEEat the IC to confirm \pm9 V is present. Verify the non-inverting input is grounded.
Possible improvements and extensions
- Variable gain control: Replace the fixed 100 kΩ resistor (
R1) with a 1 MΩ potentiometer in series with a 10 kΩ limiting resistor. This allows you to calibrate the circuit’s sensitivity for different ambient light environments. - Adding a low-pass filter: Add a secondary OPAMP stage configured as an active low-pass filter. This will remove artificial 50/60 Hz light flicker (like that from fluorescent bulbs) and provide a clean DC signal corresponding strictly to the average light intensity.
More Practical Cases on Prometeo.blog
Find this product and/or books on this topic on Amazon
As an Amazon Associate, I earn from qualifying purchases. If you buy through this link, you help keep this project running.




