Optoelectronics Explainer — LEDs Backwards: How Silicon Sees Light

Text written by Claude Fable 5 (claude-fable-5).

Optoelectronics Explainer — LEDs Backwards: How Silicon Sees Light

This is the “before you build” companion to Projects 7–11, in the spirit of the NE555 explainer: it assumes solid-state basics at the “took one condensed-matter course once” level and no electronics. The goal: by the end, every part of the optointerrupter — and every wiring choice repeated across the five projects — should feel derivable rather than memorised.

One device, two halves

A slotted optointerrupter is two semiconductor junctions in a plastic U:

An LED and a photodetector are the same physics run in opposite directions. Forward-bias a junction and recombining electron–hole pairs emit photons with hνEgh\nu \approx E_g; illuminate a junction and absorbed photons with hνEgh\nu \gtrsim E_g create electron–hole pairs that the junction field sweeps apart into a measurable current. Emission and absorption across the same gap. (Ordinary LEDs really do work as photodiodes — a red LED into a voltmeter under a bright lamp shows tens to hundreds of mV. Fun desk demo.)

Why 940 nm

Three constraints intersect neatly:

  1. Silicon’s absorption window. Si has Eg=1.12E_g = 1.12 eV, i.e. an absorption edge at λ=hc/Eg1100\lambda = hc/E_g \approx 1100 nm. Sensitivity peaks in the 800–950 nm range: photons energetic enough to be absorbed, but not so energetic that they’re absorbed within nanometres of the surface where recombination eats them.
  2. GaAs emits right there. EgGaAs1.42E_g^{\text{GaAs}} \approx 1.42 eV → ~870 nm; with silicon doping, ~940 nm. Direct bandgap → efficient emission → the cheapest IR photons money can buy.
  3. Human eyes stop at ~700 nm, so the beam is invisible — which for our purposes (alarms, finish lines) is a feature, and for the child is magic.

The black plastic housing is itself a filter: opaque to visible light, translucent at 940 nm — it shades ambient light while passing the signal. The “straw over the phototransistor” trick in Project 8 is the same idea when you’ve thrown the housing away.

The detector family, by speed

The series meets three photodetectors; the physics cleanly predicts their speed ordering.

LDR (Project 6’s theremin — CdS photoresistor). Bulk photoconductivity: photons free carriers throughout the volume, raising conductivity σ=e(nμn+pμp)\sigma = e(n\mu_n + p\mu_p). No junction, no field, no direction. Response is set by carrier generation/recombination and — the killer — slow trap states that hold carriers for long times. Result: big, cheap, polarity-free signal, but 10–100+ ms response and a memory effect (resistance depends on recent illumination history). Fine for “is a hand over it”; hopeless past ~10 Hz.

Photodiode. A reverse-biased junction. Absorption in or near the depletion region creates pairs; the built-in plus applied field sweeps them across in nanoseconds. Photocurrent is beautifully linear in flux (Iph=ηeΦI_{ph} = \eta e \Phi, quantum efficiency η ≈ 0.5–0.9) — this is why photodiodes are instruments while LDRs are gadgets. But the current is small: ~0.5 A/W, so μW of light → sub-μA.

Phototransistor (our part). A photodiode whose junction is the base–collector junction of a BJT, with the photocurrent injected where base current would go — so it gets multiplied by the transistor gain: ICβIphI_C \approx \beta I_{ph}, β ~ 100–500. Now mA of collector current from the optointerrupter’s few mW of IR — enough to switch things without further amplification. The price of the gain is speed: the collector–base capacitance is Miller-multiplied by β, giving μs-scale rise/fall instead of ns. The datasheet CTR (current transfer ratio, IC/IFI_C/I_F, often 5–30 % for slotted parts) packages the whole chain — LED efficiency, geometry, η, β — into one number you can design with.

The hierarchy — LDR ~10⁻¹ s, phototransistor ~10⁻⁵ s, photodiode ~10⁻⁹ s, each buying speed by giving up gain — is a textbook gain–bandwidth trade, and Project 9 sits exactly where it needs the middle option: kHz chopping is 5 orders too fast for the LDR and doesn’t need photodiode heroics.

The pull-up resistor, or: how a current becomes a logic level

The phototransistor is a light-controlled current sink; alone it outputs nothing. Put a resistor between it and the rail and Kirchhoff does the rest. With the common-emitter arrangement (Projects 7 and 9):

Vnode=VCCICRV_{\text{node}} = V_{CC} - I_C R

Graphically: a load line of slope 1/R-1/R across the transistor’s output curves, with light as the parameter selecting the curve. The resistor value sets the compromise: larger R → switches on less light (more sensitive, and saturates more deeply) but slower (the node’s stray capacitance charges through R); smaller R → faster, needs more photocurrent. 10 kΩ suits everything in this series.

The two polarities used in Projects 7–11 are just the two places you can put the resistor:

WiringResistorBeam on → nodeUsed when you want
Common-emitter (Proj. 7, 9)pull-up above collectorLOWblocked = active: alarms, click-per-spoke
Common-collector (Proj. 8, 10, 11)pull-down below emitterHIGHlight = active: armed race gates, hole = note, flash = count

Same part, same physics; swapping the resistor’s position logically inverts the output. When a lesson says “if yours does the opposite, swap the legs,” this table is what’s really going on (that, or the collector/emitter were genuinely reversed — a phototransistor conducts weakly backwards, so a swapped part half-works confusingly rather than failing cleanly).

Dark side notes (the honest engineering)

The one-sentence summaries, per project

← Back to Read Me First, or on to Project 7.