← About PHYS 351

PHYS 351 · Advanced Instrumentation

Lecture 01 · LED drivers & light detectors

1 Where Lab 1 Sits

Lab 1 is entirely analog. The hardware decides everything: a resistor sets a current, a feedback loop sets a gain, a filter sets a bandwidth. There is no software, and that is on purpose. From Lab 3 on, a Raspberry Pi makes the decisions, and you will want a firm grip on what the analog circuitry is doing before you connect a computer to it.

The first two tasks are both about current. An LED must be fed a controlled current; a photodiode produces a small current that must be read. The first tool for each job is a resistor, and the second is an op-amp with negative feedback.

Lab 1 in three rows of blocks. Task 1, set a current: source limited to 5.0 V, current limit by resistor or op-amp, LED, light. Task 2, read a current: light, photodiode, resistor or TIA, DMM volts. Task 3, analyze a chain: sine in, biased inverting amplifier, RC low-pass, Va and Vb.
Figure 1. Lab 1 in three rows. Task 1 sets a current: a source limited to 5.0 V, a current limit made by a resistor or an op-amp, the LED, light. Task 2 reads a current: light, a photodiode, a resistor or a transimpedance amplifier (TIA), and a DMM reading. Task 3 analyses a signal chain: a sine wave into a biased inverting amplifier and an RC low-pass filter, giving Va and Vb.
The one idea to carry out of this lecture

A measurement chain is a sequence of deliberate conversions: voltage to current in the LED driver, light to current in the photodiode, current to voltage in the detector. At each step you choose a component value that makes the next step well behaved. Design from the quantity you want to end up with, and work backwards.

1.1 Task map

Lab 1 taskWhat you buildConcept & section
1.1Adjustable LED driver, at most 5.0 V applied, current limitedThe LED; series limiting; the capped divider (§2–4)
1.2The same driver built around an op-ampOp-amp rules; follower and current regulator (§5–6)
2.1Photodiode and resistor light detector; the current for a −3.0 V readingPhotodiode model, reverse bias, sign conventions (§7–8)
2.2Photodiode with an op-amp; the current for a −3.0 V readingTransimpedance amplifier (§9)
3Analyze the given op-amp circuit; find Va and Vb; sketch and simulateBiased inverting stage plus RC low-pass (§10)

The parts named in these notes (a Kingbright WP7113ID red LED, a TI LM741 op-amp, a Vishay BPW34 photodiode) are typical examples of each kind of part, and your kit may hold different ones. Look up the datasheet of each part you actually use, or measure it, and use those numbers in your report.

2 The LED

2.1 A diode that emits light

A light-emitting diode is a PN junction made from a semiconductor whose band gap matches the energy of a visible photon. Under forward bias, electrons from the N side and holes from the P side meet in the junction and recombine; each recombination can release the gap energy as one photon. The color is therefore set by the material: the WP7113ID is gallium arsenide phosphide on gallium phosphide, with a peak at 627 nm.

Adafruit photograph of a clear through-hole LED showing its lens and two unequal-length leads.
Figure 2. A through-hole LED. The longer lead is the anode (+); the shorter lead, beside a flat on the rim, is the cathode. Conventional current flows anode → cathode. Photograph: Adafruit.
Kingbright WP7113ID datasheet, relative intensity against wavelength: a single narrow peak labeled red near 627 nm, falling to zero by about 570 nm and 690 nm.
Figure 3. Relative intensity against wavelength for the WP7113ID: one narrow peak at 627 nm, about 45 nm wide at half height. Source: Kingbright WP7113ID datasheet (DSAF0012), p. 3.

2.2 Current rises exponentially with voltage

Like any diode, the LED obeys (approximately) the Shockley law,

I=IS(eV/nVT−1)I = I_S\left(e^{V/nV_T}-1\right)(1)

with VT=kT/q≈25.9V_T = kT/q \approx 25.9 mV at room temperature and an ideality factor nn between 1 and 3. The consequence is the whole reason for Task 1: near the forward voltage, a small change in voltage makes a large change in current.

Kingbright WP7113ID datasheet curves at 25 °C. Left: forward current against forward voltage, near zero below 1.6 V and rising steeply to 20 mA at about 2.0 V. Right: luminous intensity rises in proportion to forward current from 0 to 20 mA.
Figure 4. Left: forward current against forward voltage for the WP7113ID at 25 °C. Almost nothing flows below 1.6 V; about 4 mA flows at 1.7 V and 20 mA at 2.0 V. Right: luminous intensity is proportional to forward current. Source: Kingbright WP7113ID datasheet, p. 3.

Two conclusions follow from Figure 4. Brightness follows current, not voltage, so the quantity to control is current. And a voltage source cannot control it: between 1.7 and 2.0 V the current multiplies by five, and the forward voltage itself falls by about 1.9 mV for every degree the LED warms. Connect an LED straight across an adjustable voltage source and the current is at the mercy of millivolts. Worse, as the LED heats up its forward voltage drops, so the current climbs, so it heats up more. That loop is called thermal runaway, and it ends with a dead LED.

2.3 Read the limits before you design

Kingbright WP7113ID datasheet, absolute maximum ratings at 25 °C: power dissipation 75 mW, reverse voltage 5 V, junction temperature 125 °C, operating and storage temperature −40 to +85 °C, DC forward current 30 mA, peak forward current 160 mA at 1/10 duty cycle and 0.1 ms pulses.
Figure 5. WP7113ID absolute maximum ratings at 25 °C: 75 mW dissipation, 5 V reverse voltage, 30 mA DC forward current, 160 mA peak at 1/10 duty and 0.1 ms pulses. Source: Kingbright WP7113ID datasheet, p. 2.
Datasheet valueWP7113IDWhat it means for the driver
Forward voltage at 10 mA1.9 V typ, 2.3 V maxParts vary. No minimum is given, so for the current limit assume a little below typical (§3.2 uses 1.8 V)
DC forward current30 mA maxDesign for well below it, 10–20 mA
Power dissipation75 mW maxVF×IV_F \times I must stay below it
Reverse voltage5 V maxNever connect the LED backwards across a supply

3 The Series Resistor

3.1 The load line

Put a resistor RR in series with the LED and drive the pair from a source VsV_s. Kirchhoff's voltage law gives one equation, Vs=IR+VLEDV_s = IR + V_{LED}, which is a straight line in the LED's current–voltage plane: the load line I=(Vs−V)/RI = (V_s - V)/R. The LED's own curve is a second relation. The operating point is where they cross.

Left: the LED current–voltage curve, modeled on the WP7113ID datasheet, crossed by dashed load lines of a 390 Ω resistor from 3, 5 and 9 V sources; the crossings give 3.1, 8.0 and 18.0 mA at about 1.8 to 2.0 V. Right: LED current against source voltage rises steadily with the 390 Ω resistor, reaching 25 mA at 12 V, but without a resistor it passes the 30 mA maximum at about 2.1 V.
Figure 6. Left: the LED curve (a diode model fitted to the WP7113ID datasheet) crossed by the load lines of a 390 Ω resistor from 3, 5 and 9 V; the crossings are 3.1, 8.0 and 18.0 mA, all near 1.8–2.0 V. Right: LED current against source voltage. With the resistor it rises steadily; without it, it passes the 30 mA rating at about 2.1 V.

Because the LED voltage barely moves once it conducts, the current is set almost entirely by the resistor:

ILED=Vs−VFRI_{LED}=\dfrac{V_s-V_F}{R}(2)

3.2 Design for the worst case

Design from the current limit, at the worst case: the highest source voltage your adjustment allows and the lowest forward voltage the LED might have.

R ≥ Vs,max⁡−VF,min⁡Imax⁡R\ \ge\ \dfrac{V_{s,\max}-V_{F,\min}}{I_{\max}}(3)
Worked example: 9.0 V maximum, 20 mA limit

The datasheet gives only a typical (1.9 V) and a maximum forward voltage, so take VF,min⁡V_{F,\min} = 1.8 V, a little below typical. With Vs,max⁡V_{s,\max} = 9.0 V and Imax⁡I_{\max} = 20 mA, Equation (3) gives R≥7.2 V/0.020 A=360 ΩR \ge 7.2\ \text{V}/0.020\ \text{A} = 360\ \Omega. If your kit has no 360 Ω resistor, round up, never down. Here are the neighboring values, checked for current and for power in both parts:

RI at 9 VP in R = I²RP in LED
330 Ω21.8 mA (too high)0.16 W39 mW
390 Ω18.5 mA0.13 W33 mW
470 Ω15.3 mA0.11 W28 mW

330 Ω breaks the 20 mA limit, so it is out. 390 Ω keeps the current under 20 mA. It dissipates 0.13 W, so a ¼ W resistor runs at about half its rating, which is a comfortable margin. The LED dissipates 33 mW of its 75 mW allowance.

4 Adjustable and Capped: the Divider

4.1 Read the requirement carefully

Two requirements, two calculations

Task 1.1 asks you to limit the voltage applied to the LED to 5.0 V and to include current limiting. Those are separate requirements with separate reasoning: one about the largest node voltage your adjustment can produce, one about the largest current at that setting. A design that meets only one of them is incomplete.

What does "the voltage applied to the LED" mean? Once it conducts, the LED itself only ever has about 2 V across it, so the sensible reading is the adjustable drive voltage that feeds the LED and its series resistor (VsetV_{set} in Figure 7). Whatever you decide, name the node in your report and show that it cannot go above 5.0 V.

The simplest way to get an adjustable voltage with a hard ceiling is a potentiometer below a fixed resistor. The two form a divider, and the wiper picks off part of the pot's share. With the wiper at the top you get the most:

Vset,max⁡=Vs RpotRtop+RpotV_{set,\max} = V_s\,\dfrac{R_{pot}}{R_{top}+R_{pot}}(4)

No setting of the knob can exceed that value. For example, from a 12 V supply a 7 kΩ resistor above a 5 kΩ pot gives 12×5/12=5.012 \times 5/12 = 5.0 V at most.

4.2 A loaded divider sags

Equation (4) is true only when nothing draws current from the wiper. An LED branch draws milliamps, and the divider has its own source resistance. Seen from the wiper at the top of its travel, the divider is a Thévenin source of 5.0 V behind Rtop∥Rpot=7 kΩ∥5 kΩ=2.9R_{top}\parallel R_{pot} = 7\,\text{k}\Omega\parallel 5\,\text{k}\Omega = 2.9 kΩ. That 2.9 kΩ is in series with RsR_s and the LED. It is far larger than any sensible RsR_s, so it ends up setting the current.

Left: a divider from +12 V through 7 kΩ and a 5 kΩ potentiometer sets V_set at most 5.0 V; the wiper feeds R_s and the LED to ground. Right: V_set against wiper position rises to 5.0 V with no load, but with 220 Ω and the LED attached it flattens near 1.9 V and the LED gets only 1.1 mA.
Figure 7. Left: a divider from +12 V through 7 kΩ and a 5 kΩ pot sets Vset, which feeds Rs and the LED. Right: Vset against wiper position. Unloaded it rises to 5.0 V; with 220 Ω and the LED attached it flattens near 1.9 V, and the LED gets only 1.1 mA.

The fix is either a much stiffer divider (small resistors, wasting current and power in the divider) or a buffer that copies the divider's voltage without loading it. The second is Task 1.2.

Practice 4

(a) A supply adjusts from 0 to 12 V and the LED has VFV_F = 2.0 V. Choose a series resistor so the current never exceeds 15 mA, and state the current at the top of the range.

(b) For that same resistor, what is the current at 4 V? Comment on how linearly the brightness follows the knob.

(c) Redesign the 12 V divider of §4.1 with a 500 Ω pot. What fixed resistor keeps the maximum at 5.0 V unloaded, how much current does the divider waste, and roughly how far does it sag with a 20 mA load?

5 The Op-Amp

5.1 Huge gain, almost no input current

An op-amp amplifies the difference between its two inputs by an enormous factor:

Vout=A (V+−V−),A≈2×105 for the LM741V_{out} = A\,(V_+ - V_-),\qquad A \approx 2\times10^5\ \text{for the LM741}(5)

The output can swing only about ±14 V, so the input difference that keeps it off the rails is tiny: 14/200 000=7014/200\,000 = 70 µV. Without feedback, the op-amp simply slams to one rail or the other, like a comparator. With negative feedback, part of the output is returned to the inverting input; if the output rises, V−V_- rises and pulls it back. The loop settles where V−≈V+V_-\approx V_+. Together with the tiny input current, that gives the two working rules for every op-amp circuit in this lab:

  1. No current into the inputs. The LM741's input bias current is 80 nA typical, small next to the microamps and milliamps in this lab.
  2. With negative feedback, V−≈V+V_- \approx V_+.
Left: an op-amp symbol with inputs V minus and V plus, output V_out, and ±15 V supplies; V_out = A(V+ − V−) with A about 200 000; inputs draw almost no current (80 nA) and with negative feedback V− ≈ V+. Right: open-loop output against the input difference, linear only between about −70 and +70 µV and clipped at ±14 V.
Figure 8. Left: the op-amp symbol with ±15 V supplies, Vout=A(V+−V−)V_{out}=A(V_+-V_-) with AA about 200 000, and the two rules. Right: open-loop output against the input difference, linear only for about ±70 µV and clipped at the LM741's ±14 V swing.

5.2 The LM741

TI LM741 datasheet, NAB 8-pin CDIP or PDIP package, top view: pin 1 offset null, 2 inverting input, 3 non-inverting input, 4 V minus, 5 offset null, 6 output, 7 V plus, 8 no connection.
Figure 9. LM741 8-pin DIP, top view: pin 2 inverting input, 3 non-inverting input, 6 output, 7 V+, 4 V−, 1 and 5 offset null, 8 no connection. Source: TI LM741 datasheet (SNOSC25D), §5.
TI LM741 datasheet section 6.5, electrical characteristics: input offset voltage 1 mV typical, 5 mV maximum; input bias current 80 nA typical; large-signal voltage gain 200 V/mV typical at ±15 V; output voltage swing ±14 V typical into 10 kΩ and ±13 V into 2 kΩ; output short-circuit current 25 mA; common-mode rejection 95 dB; rise time 0.3 µs; slew rate 0.5 V/µs.
Figure 10. LM741 electrical characteristics at ±15 V and 25 °C: input offset 1 mV typ; bias current 80 nA typ; gain 200 V/mV typ; output swing ±14 V typ into 10 kΩ and ±13 V into 2 kΩ; short-circuit current 25 mA; rise time 0.3 µs; slew rate 0.5 V/µs. Source: TI LM741 datasheet, §6.5.
LM741 limitValue (±15 V)Where it bites in Lab 1
Output swing±13 to ±14 VLargest TIA output; largest drive voltage for an LED
Output current25 mA (short circuit)Largest LED current the op-amp can deliver
Bandwidth≈ 0.35/0.3 µs ≈ 1.2 MHzTIA speed and stability (§9.3)
Slew rate0.5 V/µsA 10 V step takes at least 20 µs

6 Op-Amp LED Drivers

6.1 The follower

Connect the output straight to the inverting input and feed VsetV_{set} to the non-inverting input. Rule 2 gives Vout=VsetV_{out} = V_{set}: a voltage follower. Rule 1 says the divider now supplies almost nothing, so it no longer sags; the LED current comes from the op-amp's supply instead.

Left: the 12 V divider's wiper drives the non-inverting input of an op-amp wired as a follower, whose output drives R_s and the LED. Right: LED current against wiper position reaches about 14 mA with the follower, compared with about 1 mA from the divider alone, below the LM741's 25 mA short-circuit limit.
Figure 11. Left: the 12 V divider drives an op-amp follower, which drives Rs and the LED. Right: LED current against wiper position. The follower reaches about 14 mA at the top; the divider alone gives about 1 mA. Both stay under the LM741's 25 mA limit.

With Vset,max⁡V_{set,\max} = 5.0 V, VFV_F = 1.9 V and RsR_s = 220 Ω the top current is (5.0−1.9)/220=14(5.0-1.9)/220 = 14 mA. The 5.0 V cap now holds at the op-amp output too, because the output follows VsetV_{set}.

6.2 The LED inside the loop

A follower still sets a voltage and lets Equation (2) decide the current, so the current still depends on VFV_F. Put the LED inside the feedback loop instead, with a sense resistor RsenseR_{sense} from the LED's cathode to ground, and feed the node between them back to the inverting input. Rule 2 forces V−=VrefV_-=V_{ref}, so the voltage across RsenseR_{sense} is fixed, and so is the current:

ILED=VrefRsenseI_{LED} = \dfrac{V_{ref}}{R_{sense}}(6)
Left: an op-amp current regulator: V_ref on the non-inverting input; the output drives the LED, whose cathode meets R_sense to ground and feeds back to the inverting input, so V− = V_ref and I = V_ref/R_sense. Right: LED current against forward voltage from 1.7 to 2.2 V: 5.0 V through 220 Ω falls from 15 to 12.7 mA, while a 1.0 V over 68 Ω loop holds 14.7 mA.
Figure 12. Left: the current regulator. Vref drives the non-inverting input; the output drives the LED; the LED current flows through Rsense to ground, and the top of Rsense feeds back to the inverting input. Right: LED current against forward voltage from 1.7 to 2.2 V. A 5.0 V source through 220 Ω falls from 15 to 12.7 mA; 1.0 V across 68 Ω holds 14.7 mA.

The op-amp output adjusts itself to Vref+VFV_{ref} + V_F, whatever VFV_F happens to be. When the LED warms and VFV_F drops, the output simply drops with it. Three limits bound the design and must all be checked:

  1. The output must stay inside its swing, even at the top of the knob: Vref,max⁡+VF,max⁡<14V_{ref,\max} + V_{F,\max} < 14 V.
  2. The LED current must stay within its rating (30 mA).
  3. The current must stay within the op-amp's own output limit (25 mA for the LM741), a common oversight.

For Task 1.2, the 5.0 V limit again applies to the node you call "the voltage applied to the LED" (§4.1). With the follower, that is the op-amp output. With the regulator, the output sits at Vref+VFV_{ref} + V_F, so bound both terms. Either way, name the node in your report and show that it cannot exceed 5.0 V.

Practice 6

(a) Explain in two sentences why the regulator of §6.2 holds its current steadier than a series resistor when the LED warms and VFV_F falls by 0.1 V. Estimate the change for a 12 V source and a 470 Ω resistor.

(b) With VrefV_{ref} from a pot between 0 and 2.0 V, choose RsenseR_{sense} so the LED current never exceeds 15 mA. What is the largest output voltage the op-amp must produce?

(c) A student uses RsenseR_{sense} = 22 Ω with VrefV_{ref} up to 1.0 V. What limits the current, and what happens at the output?

7 The Photodiode

7.1 Light in, current out

A photodiode is a PN (or PIN) junction built to let light into its depletion region. A photon with at least the band-gap energy creates an electron–hole pair; the junction's built-in field sweeps the electron to the N side and the hole to the P side. That flow of charge is a current, from cathode to anode inside the diode. This is the reverse of the direction current flows when a diode conducts normally.

Vishay BPW34 datasheet drawing: a small flat rectangular photodiode package with a clear top window and two leads.
Figure 13. The Vishay BPW34 silicon PIN photodiode: a flat package with a 7.5 mm² sensitive area. Source: Vishay BPW34 datasheet (document 81521), p. 1.
Vishay BPW34 datasheet Fig. 7: relative spectral sensitivity against wavelength, rising from near zero at 400 nm to a peak near 900 nm and falling steeply to about 0.15 at 1100 nm.
Figure 14. BPW34 relative spectral sensitivity: from 430 to 1100 nm, peaking near 900 nm in the near infrared. Beyond about 1100 nm a photon carries less energy than silicon's 1.12 eV band gap, so it cannot make an electron–hole pair. Source: BPW34 datasheet, Fig. 7.

7.2 The model

Photodiode model

photodiode = a light-dependent current source inside an ordinary diode

Photodiode equivalent circuit: a light-controlled current source I_ph in parallel with the junction diode, a shunt resistance r_d and the capacitance C_d, 70 pF at 0 V and 25 pF at 3 V for the BPW34, with a small series contact resistance r_s to the anode terminal; the cathode is the lower terminal.
Figure 15. Photodiode equivalent circuit. The current source IphI_{ph}, proportional to light, sits in parallel with the junction diode, a shunt resistance rdr_d and the junction capacitance CdC_d (70 pF at 0 V and 25 pF at 3 V for the BPW34); rsr_s is the small series resistance of the contacts.

The terminal current is the diode's own current minus the photocurrent:

I=I0(eqV/kT−1)−Iph,Iph∝optical powerI = I_0\left(e^{qV/kT}-1\right) - I_{ph},\qquad I_{ph}\propto \text{optical power}(7)

7.3 Light shifts the I–V curve down

Photodiode current against voltage for dark, 0.5 and 1 mW/cm²: the curves are flat in the shaded reverse-bias region at about 0, −25 and −50 µA, and rise steeply in forward bias; the brightest curve crosses zero at the open-circuit voltage of 350 mV in the photovoltaic quadrant. A marker at −3 V notes that the current equals the photocurrent whatever the voltage.
Figure 16. Photodiode current against voltage in the dark and at 0.5 and 1 mW/cm² (BPW34-like model). Light shifts the whole curve down by IphI_{ph}. In the shaded reverse-bias region the curves are flat: the current is −25 or −50 µA whatever the bias. The brightest curve crosses zero at VocV_{oc} = 350 mV, in the photovoltaic quadrant.
Operating modeBiasBehavior
Photovoltaiczero biasNo bias-driven dark current, so the noise is low. But the junction capacitance is large and the detector is slow, and with a resistor load the response compresses near VocV_{oc}.
Photoconductivereverse biasThe operating point sits on the flat part of the curve, so the current equals IphI_{ph}; the wider depletion region lowers the capacitance and raises bandwidth. The cost is dark current.

7.4 What the datasheet says

Vishay BPW34 datasheet Fig. 3: reverse light current against irradiance on log–log axes at 5 V and 950 nm, a straight line from about 0.5 µA at 0.01 mW/cm² to about 100 µA at 2 mW/cm².
Figure 17. BPW34 reverse light current against irradiance at 5 V and 950 nm: a straight line over three decades, about 50 µA at 1 mW/cm². Source: BPW34 datasheet, Fig. 3.
Vishay BPW34 datasheet Fig. 5: reverse light current against reverse voltage from 0.1 to 50 V for irradiances from 0.05 to 1 mW/cm², each curve nearly flat, about 50 µA at 1 mW/cm².
Figure 18. BPW34 reverse light current against reverse voltage for five irradiances: each curve is nearly flat from 0.1 to 50 V. This is the flat region of Figure 16 seen on log axes. Source: BPW34 datasheet, Fig. 5.
Vishay BPW34 datasheet Fig. 6: diode capacitance in the dark at 1 MHz against reverse voltage, falling from about 70 pF at 0.1 V to about 25 pF at 3 V and below 10 pF near 50 V.
Figure 19. BPW34 capacitance in the dark against reverse voltage: about 70 pF near 0 V, 25 pF at 3 V and under 10 pF near 50 V, because the depletion layer widens with bias. Source: BPW34 datasheet, Fig. 6.
Vishay BPW34 datasheet Fig. 1: reverse dark current at 10 V against ambient temperature on a log scale, rising in a straight line from about 2 nA at 25 °C to about 800 nA at 95 °C.
Figure 20. BPW34 dark current at 10 V against temperature, on a log scale: about 2 nA at 25 °C rising to about 800 nA at 95 °C. Source: BPW34 datasheet, Fig. 1.

Dark current is the leakage that flows with no light, from thermally generated carriers and surface leakage. It grows with reverse voltage and, from Figure 20, rises about 400 times over 70 °C: a doubling roughly every 8 °C. In a detector it appears as an offset, and its shot noise, 2qIdarkB\sqrt{2qI_{dark}B}, sets part of the smallest signal you can detect. Subtracting a dark reading, or chopping the light, removes the offset.

8 The Resistor Detector

8.1 The circuit and its limit

The simplest detector puts the photodiode in reverse bias in series with a resistor RdetR_{det}. In Figure 21 the anode goes to −15 V and the cathode to node A, with RdetR_{det} from node A to ground. The photocurrent leaves node A into the diode, so current flows up from ground through RdetR_{det} and node A goes negative:

VA=−IphRdetV_A = -I_{ph}R_{det}(8)
Left: a resistor detector with the photodiode anode at −15 V and cathode at node A, R_det from node A to ground, and a DMM reading −3.00 V at node A. Right: node voltage V_A against photocurrent on a log scale for 10 kΩ, 100 kΩ and 1 MΩ: each follows V_A = −I_ph R_det, then stops near −15.4 V where the diode runs out of reverse bias.
Figure 21. Left: the resistor detector, with the DMM reading node A. Right: VAV_A against photocurrent for 10 kΩ, 100 kΩ and 1 MΩ. Each follows Equation (8) until VAV_A approaches the −15 V bias; there the diode loses its reverse bias and the output stops near −15.4 V.

The resistor voltage appears across the diode too: the diode sees 15−∣VA∣15 - |V_A| of reverse bias. A larger RdetR_{det} gives more volts per microamp, but it reaches the bias at a smaller photocurrent. It is also slower: the diode's capacitance charges through RdetR_{det} with time constant RdetCDR_{det}C_D, and CDC_D itself grows as the reverse bias shrinks. So one resistor sets the gain, the range and the speed, and you cannot adjust one without the others.

8.2 A negative reading is information

Task 2 asks for the current when the DMM reads −3.0 V. Define the voltage polarity and the current reference direction before doing any algebra. With the reference direction taken down through the detector resistor,

I=VARdetI = \dfrac{V_A}{R_{det}}(9)
Worked sign example: node A connects to a 10 kΩ resistor to ground and the DMM reads −2.00 V. The chosen reference direction points down through the resistor, while the actual current flows up. I = V_A/R = −2.00 V/10 kΩ = −200 µA: 200 µA flows from ground up into node A.
Figure 22. Worked sign example. The DMM reads −2.00 V at node A across 10 kΩ. The chosen reference direction points down through the resistor; the actual current flows up. I=−2.00 V/10 kΩ=−200 μAI = -2.00\ \text{V}/10\ \text{k}\Omega = -200\ \mu\text{A}: 200 µA flows from ground up into node A.
What a negative answer means, and does not mean

A negative value does not mean an arithmetic mistake, and it does not make the current imaginary. It means the true current flows opposite to the reference direction you chose. Write the convention in your report, in words or on the schematic, then quote the signed result and say what it means physically. "II = −0.20 mA, i.e. 0.20 mA flowing from ground into node A" is a complete answer; "0.20 mA" alone is not. To get a positive reading you must turn the diode around and move its bias to +15 V (cathode to +15 V, anode to node A). Change only one of the two and the diode is forward biased, and it stops working as a detector.

Sanity-check the magnitude as well: 200 µA is a brightly lit BPW34 (extending the line of Figure 17 puts it near 4 mW/cm²), not a dim one.

Practice 8

(a) A 47 kΩ detector resistor reads −0.50 V. Find the current with its sign and describe its direction.

(b) Why might a 1 MΩ resistor be chosen over 10 kΩ, and what does it cost? Use Figure 21.

(c) A datasheet quotes 2 nA of dark current at 25 °C. Estimate it at 45 °C using the slope of Figure 20, and the offset it produces across 1 MΩ.

9 The Transimpedance Amplifier

9.1 The diode at virtual ground

A transimpedance amplifier (TIA) turns detector current straight into voltage. The photodiode connects to the inverting input, a feedback resistor RfR_f runs from the output back to that input, and the non-inverting input is grounded. Rule 2 holds the inverting input at 0 V, a virtual ground. Rule 1 says the input takes no current, so all of the photocurrent must flow through RfR_f.

Transimpedance amplifier: the photodiode cathode is at +15 V and its anode at the op-amp inverting input, held at 0 V virtual ground; the non-inverting input is grounded; R_f with C_f in parallel runs from the output back to the inverting input. The photocurrent flows through R_f, so V_out = −I_ph R_f, and the diode always sees 15 V of reverse bias.
Figure 23. The TIA. The photodiode's cathode is at +15 V and its anode at the inverting input, held at 0 V. The photocurrent flows into the node and on through RfR_f (with CfC_f in parallel) to the output, so Vout=−IphRfV_{out} = -I_{ph}R_f. The diode always sees 15 V of reverse bias.
Vout=−IphRfV_{out} = -I_{ph}R_f(10)

The minus sign comes from the direction of the current: it flows into the virtual-ground node, so the output must sit below 0 V to draw it through RfR_f. Reverse the diode (anode to −15 V, cathode to the node) and the output goes positive.

9.2 Why the TIA beats the resistor

Left: output magnitude against photocurrent from 0 to 60 µA: a 100 kΩ resistor with no bias compresses below about 0.35 V, while a TIA with 100 kΩ rises linearly to 6 V. Right: TIA output against irradiance for R_f 10 kΩ, 100 kΩ and 1 MΩ, falling linearly until the LM741's −14 V swing, reached at 0.28 mW/cm² for 1 MΩ and 2.8 mW/cm² for 100 kΩ.
Figure 24. Left: output magnitude against photocurrent with no bias. With a 100 kΩ resistor the output levels off just below VocV_{oc} ≈ 0.35 V; a TIA with RfR_f = 100 kΩ keeps rising in a straight line. Right: TIA output against irradiance for RfR_f = 10 kΩ, 100 kΩ and 1 MΩ: straight lines until the LM741's −14 V swing, reached at 2.8 and 0.28 mW/cm² for 100 kΩ and 1 MΩ.
Resistor detector versus TIA: the comparison Lab 1 is asking for

The resistor detector is simple and passive, but the voltage it develops appears across the diode and changes the very bias that makes it linear; gain, range and bandwidth are coupled through one resistor. The TIA sets the gain with RfR_f and holds the photodiode at a fixed voltage, so the diode sees the same bias and the same capacitance at every light level. Pulling those apart is why the op-amp version is better.

9.3 Choosing R_f

The brightest light you expect must leave the output inside the rails:

Iph,max⁡Rf<14 VI_{ph,\max}R_f < 14\ \text{V}(11)
Vishay BPW34 datasheet Fig. 4: reverse light current at 5 V against illuminance on log–log axes, a straight line from about 0.7 µA at 10 lx through about 7 µA at 100 lx and 75 µA at 1000 lx to about 600 µA at 8000 lx.
Figure 25. BPW34 reverse light current against illuminance at 5 V: about 7 µA at 100 lx, 75 µA at 1000 lx and 600 µA near 8000 lx. Source: BPW34 datasheet, Fig. 4.
Worked example: choosing the gain

A photocurrent of 2 µA through RfR_f = 100 kΩ gives ∣Vout∣=2 μA×100 kΩ=0.20|V_{out}| = 2\ \mu\text{A}\times100\ \text{k}\Omega = 0.20 V. Office lighting, about 500 lx, gives the BPW34 up to roughly 40 µA (Figure 25), or 4 V with the same resistor; the rail is reached at 140 µA. Treat the 40 µA as an upper guess. The datasheet measures its lux curve with an incandescent-type lamp (CIE illuminant A), which is rich in the near infrared where the BPW34 is most sensitive. White LED or fluorescent light of the same lux gives noticeably less current.

RfR_fV per µAfull scale at 14 V
10 kΩ0.01 V1.4 mA
100 kΩ0.1 V140 µA
1 MΩ1 V14 µA

Measure your brightest case first, then choose the largest RfR_f that still leaves headroom.

At high gain, remember that the op-amp's input bias current also flows through RfR_f. For the LM741 (80 nA typical) and RfR_f = 1 MΩ that puts about 80 mV on the output in total darkness, on top of the photodiode's own dark current. Cover the photodiode, record that dark reading, and subtract it.

9.4 Bandwidth and C_f

The detector capacitance sits between the inverting input and a fixed voltage. Together with RfR_f it puts a pole in the feedback path, and the op-amp's own roll-off adds a second one. Two poles in the loop leave almost no phase margin, so the circuit rings, or even oscillates. If your TIA oscillates on the breadboard, this, not a wiring fault, is usually why. Without compensation the response peaks near

fp≈fT2πRfCDf_p \approx \sqrt{\dfrac{f_T}{2\pi R_f C_D}}(12)

where fTf_T is the op-amp's unity-gain frequency, about 1.2 MHz for the LM741. That comes from its 0.3 µs rise time using 0.35/tr0.35/t_r, the same rule the datasheet itself uses to quote bandwidth. A small capacitor across RfR_f restores the phase margin; the usual choice for about 45° is

Cf≈CD2πRffTC_f \approx \sqrt{\dfrac{C_D}{2\pi R_f f_T}}(13)
Modeled TIA response relative to R_f against frequency for an LM741 with R_f = 100 kΩ: with the BPW34 at 0 V (70 pF) and no C_f it peaks sharply near 160 kHz; at 15 V bias (about 12 pF) it peaks near 400 kHz; with C_f = 10 pF the 70 pF case is flat and falls through −3 dB near 170 kHz.
Figure 26. Modeled TIA response, relative to RfR_f, for an LM741 with RfR_f = 100 kΩ. With the BPW34 at 0 V (70 pF) and no CfC_f it peaks sharply near 160 kHz; at 15 V bias (about 12 pF) the peak moves to about 400 kHz; with CfC_f = 10 pF the 70 pF response is flat and falls through −3 dB near 170 kHz.
Worked example: C_f for the BPW34 at zero bias

CDC_D = 70 pF, RfR_f = 100 kΩ, fTf_T = 1.2 MHz. Equation (12) puts the uncompensated peak at 1.2×106/(2π⋅105⋅70×10−12)≈160\sqrt{1.2\times10^6/(2\pi\cdot10^5\cdot70\times10^{-12})} \approx 160 kHz, and Equation (13) gives Cf≈70×10−12/(2π⋅105⋅1.2×106)≈10C_f \approx \sqrt{70\times10^{-12}/(2\pi\cdot10^5\cdot1.2\times10^6)} \approx 10 pF. The compensated corner, 1/(2πRfCf)1/(2\pi R_fC_f), is then about 160 kHz. Reverse bias lowers CDC_D and pushes all of these up.

Practice 9

(a) The brightest light at your bench gives 25 µA. Choose a standard RfR_f that keeps the LM741 at least 2 V inside its swing.

(b) With that RfR_f and the BPW34 at 15 V bias (about 12 pF), estimate the CfC_f from Equation (13) and the resulting bandwidth.

(c) Task 2.2 asks for the current when the output reads −3.0 V. Write the two facts you must state before you divide.

10 Lab 1 Task 3: Reading an Op-Amp Circuit

Task 3 gives you an op-amp circuit and asks for VaV_a and VbV_b, a sketch of VinV_{in}, VaV_a and VbV_b over at least two periods, an explanation of each functional block, and a comparison with a SPICE simulation. The supply rails are ±15 V and VinV_{in} is a 1 V-peak sine. (The manual calls the source V1; VinV_{in} is the node it drives, so they are the same signal.)

10.1 Find the blocks first

The Lab 1 Task 3 Multisim schematic with three dashed boxes: the 15 V source and the R3–R4 divider labeled 1, divider sets V plus; R2, R1 and the op-amp labeled 2, inverting amplifier about V plus; R5 and C1 labeled 3, RC low-pass, between Va and Vb.
Figure 27. The Task 3 circuit with its three blocks marked: (1) a divider from the 15 V source V2 through R3 and R4 sets the non-inverting input; (2) R2, R1 and the op-amp form an inverting amplifier about that voltage; (3) R5 and C1 form an RC low-pass filter between VaV_a and VbV_b.

Naming the blocks is explicitly part of the task, and it is most of the work: each block is a circuit you can solve alone.

10.2 A biased inverting amplifier

A biased inverting amplifier: V_in drives the inverting input through R_in, R_f feeds back from output V_a, and the non-inverting input sits at V plus from a divider R_a from V_ref and R_b to ground. V+ = V_ref R_b/(R_a + R_b) and V_a = (1 + R_f/R_in)V+ − (R_f/R_in)V_in.
Figure 28. A biased inverting amplifier with general labels: VinV_{in} drives the inverting input through RinR_{in}; RfR_f feeds back from the output VaV_a; a divider RaR_a, RbR_b from VrefV_{ref} sets V+V_+.

Solve it by superposition, one source at a time, using the two op-amp rules.

  • VinV_{in} alone (V+V_+ = 0): the inverting input is a virtual ground; the current Vin/RinV_{in}/R_{in} must flow on through RfR_f, so Va=−(Rf/Rin)VinV_a = -(R_f/R_{in})V_{in}.
  • V+V_+ alone (VinV_{in} = 0): the inverting input follows V+V_+, and RinR_{in}, RfR_f form a non-inverting amplifier, so Va=(1+Rf/Rin)V+V_a = (1 + R_f/R_{in})V_+.
V+=VrefRbRa+Rb,Va=(1+RfRin)V+−RfRinVinV_+ = V_{ref}\dfrac{R_b}{R_a+R_b},\qquad V_a=\left(1+\dfrac{R_f}{R_{in}}\right)V_+-\dfrac{R_f}{R_{in}}V_{in}(14)

The mistake to avoid is referring the inverting relation to ground: the DC level of VaV_a is (1+Rf/Rin)V+(1+R_f/R_{in})V_+, not V+V_+ and not zero.

10.3 The RC low-pass

R5R_5 and C1C_1 form a first-order low-pass filter. At frequency ff, with fc=1/(2πRC)f_c = 1/(2\pi RC),

∣H∣=11+(f/fc)2,φ=−arctan⁡(f/fc)|H| = \dfrac{1}{\sqrt{1 + (f/f_c)^2}},\qquad \varphi = -\arctan(f/f_c)(15)
First-order low-pass response against f/f_c from 0.01 to 100: gain is 0 dB at low frequency, −3 dB (|H| = 0.707) at f_c and −20 dB (0.100) at 10 f_c; phase goes from 0 to −45 degrees at f_c and −84.3 degrees at 10 f_c, approaching −90 degrees.
Figure 29. First-order low-pass response against f/fcf/f_c: gain 0 dB at low frequency, −3 dB (∣H∣|H| = 0.707) at fcf_c and −20 dB (0.100) at 10fc10f_c; phase 0, −45° at fcf_c and −84.3° at 10fc10f_c.

DC passes untouched, so VbV_b keeps VaV_a's DC level; the sine is multiplied by ∣H∣|H| and delayed by ∣φ∣|\varphi|. A negative phase means the output lags. Show that lag in your sketch; two curves drawn exactly in phase show the phase was never computed. Check also that nothing disturbs the filter. The op-amp output drives R5R_5 with almost no source resistance, and VbV_b drives only the probe, so Equation (15) applies as it stands.

10.4 Worked example with other values

Worked example (not the Task 3 values)

Take VrefV_{ref} = 12 V with RaR_a = 30 kΩ and RbR_b = 10 kΩ, so V+=12×10/40=3.0V_+ = 12 \times 10/40 = 3.0 V; Rf/RinR_f/R_{in} = 2; and an RC filter of 10 kΩ and 47 nF, with VinV_{in} a 1 V, 1 kHz sine.

  1. Equation (14): Va=3×3.0−2Vin=9−2sin⁡(ωt)V_a = 3\times3.0 - 2V_{in} = 9 - 2\sin(\omega t) V, swinging from 7 to 11 V, inverted.
  2. fc=1/(2π⋅10 kΩ⋅47 nF)=339f_c = 1/(2\pi\cdot10\ \text{k}\Omega\cdot47\ \text{nF}) = 339 Hz, so f/fcf/f_c = 2.95.
  3. Equation (15): ∣H∣=1/1+2.952=0.321|H| = 1/\sqrt{1+2.95^2} = 0.321 and φ=−71.3°\varphi = -71.3°.
  4. Vb=9−0.64sin⁡(ωt−71.3°)V_b = 9 - 0.64\sin(\omega t - 71.3°) V.
  5. Every voltage stays between 7 and 11 V, well inside ±15 V, so nothing clips.
Worked example with its own values, not the Task 3 values: over 2 ms, V_in is a 1 V, 1 kHz sine; V_a = 9 − 2V_in swings between 7 and 11 V, inverted; V_b = 9 − 0.64 sin(ωt − 71°) is a smaller sine about 9 V, lagging. V_ref 12 V with 30 k and 10 k gives V+ = 3.0 V; RC = 10 kΩ × 47 nF gives f_c = 339 Hz, |H| = 0.321, φ = −71.3°.
Figure 30. The worked example over 2 ms: VinV_{in} a 1 V, 1 kHz sine; Va=9−2VinV_a = 9 - 2V_{in} between 7 and 11 V; VbV_b a smaller sine of 0.64 V about 9 V, lagging VaV_a by 71°.
What makes a good Task 3 answer

Carry symbols as far as you can before substituting numbers, so the structure of the answer stays visible. Quote VaV_a and VbV_b as explicit functions of time with amplitude, DC level and phase. Draw all three traces on one set of axes with a labeled voltage scale, so the gain and the offset can be read off. Then overlay the simulation result and comment on any difference: a small discrepancy traced to a real cause is worth more than a perfect match asserted without checking.

11 Common Mistakes and Bench Safety

  1. LED backwards. It will not light, and across more than 5 V it may be damaged. Long lead to the positive side.
  2. No series resistance. A follower set to 5 V with no RsR_s tries to push far more than 30 mA into the LED. Only the op-amp's own short-circuit limit (25 mA typical, not guaranteed) holds it back, and the op-amp runs hot. That limit is a safety net, not a design feature.
  3. Supplies on the wrong pins. LM741 pin 7 is +15 V and pin 4 is −15 V; reversing them destroys the part. Check the notch before powering on.
  4. Floating non-inverting input. Ground it (TIA) or connect it to its divider; a floating input makes the output wander to a rail.
  5. Oscillating TIA. A fuzzy or ringing output on the scope with no light change is the capacitance problem of §9.4. Add CfC_f.
  6. Wrong DMM polarity. Note which lead is on which node before you read. The sign is part of the answer.

12 Self-Check

  1. Why is an LED an unsafe load for a voltage source, and what does a series resistor change about that?
  2. State the two separate requirements in Task 1.1 and the calculation each one demands.
  3. Why does a 7 kΩ / 5 kΩ divider fail to drive an LED, and how does a follower fix it?
  4. In the current regulator of §6.2, what sets the current, and what three limits must be checked?
  5. A detector resistor reads −0.80 V across 22 kΩ. What is the current under the stated reference direction, and what does the sign mean physically?
  6. Give two advantages of reverse-biasing a photodiode, and the price.
  7. Why does a TIA produce Vout=−IphRfV_{out} = -I_{ph}R_f? Where does the minus sign come from, and what holds the input at virtual ground?
  8. What limits a TIA's bandwidth, and what does CfC_f do?
  9. Name the three functional blocks in the Task 3 circuit and state what each contributes to VbV_b.
  10. What two numbers describe what an RC low-pass does to a sine, and how do you show each on the sketch?

13 Practical Engineering Connections

  1. LED drivers. Current limiting appears in status indicators, infrared remote controls, barcode scanners, optical encoders and fiber-optic transmitters. Constant-current regulators like §6.2 drive nearly every LED lamp and backlight, because brightness follows current.
  2. Photodiode detectors. A photodiode and resistor form the front end of light meters, smoke detectors, automatic brightness controls, optical interrupters and IR receivers.
  3. Transimpedance amplifiers. TIAs appear in fiber-optic receivers, laser-power monitors, pulse oximeters, imaging sensors and optical links, anywhere a small detector current must become a low-noise voltage. Their bandwidth-versus-capacitance trade-off is the central problem of optical receiver design.
  4. Biased amplifier plus RC filter. The Task 3 chain is a basic sensor-conditioning circuit: shift the level, set the range, limit the bandwidth, prepare the signal for an ADC. You will meet the digital half of this chain in Lab 8.
  5. System-level design. A real product combines current limiting, biasing, feedback, filtering, supply decoupling, calibration and protection. Getting the equation right is only part of the job, and that idea runs through the whole course.

← All course materials