One junction, two directions
You already know the diode as a one-way valve for current: forward-bias it and charge flows, reverse-bias it and it blocks. But a PN junction is a far richer object than a valve. Sitting at its heart is a thin depletion region — a zone scrubbed clean of free charge, criss-crossed by a built-in electric field. That field is the secret. It is a tiny, permanent ramp that any stray charge carrier will roll down. Whether you are building a solar panel or a flashlight, everything in this rung comes down to what you do with that ramp.
Here is the beautiful symmetry. Shine light on the junction and photons knock electrons loose; the built-in field sweeps them apart into a current — light becomes power. Push current into the junction and electrons are forced to recombine; each recombination dumps its energy as a photon — power becomes light. Same slab of semiconductor, same field, run forward and backward. A solar cell and a light-emitting diode are mirror twins.
Light into power: the photovoltaic effect
Sunlight is a hail of photons, and each carries a fixed packet of energy E = hf — higher frequency, more energy. When a photon with at least the band-gap energy strikes the silicon, it can hand its energy to a bound electron and kick it up across the gap, leaving behind a hole. Now you have a free electron–hole pair sitting in the junction. Left alone they would simply recombine and the energy would vanish as heat. But they are not left alone: they land in the depletion region's built-in field, which immediately rolls the electron one way and the hole the other. Separate the pair before it recombines and you have collected a charge. That separation, multiplied by trillions of photons per second, is the photovoltaic effect.
So how much voltage and current does one cell give? Because the photo-generated current adds to the diode's own behaviour, a solar cell's current–voltage relation is just the diode equation with a constant photocurrent subtracted off. That single shift is what turns a passive diode into a power source.
I(V) = I_L - I_0 ( e^(qV/kT) - 1 )
│ └─ ordinary diode current (recombination)
└─ photocurrent generated by absorbed light
Two landmark points fall straight out:
• short-circuit (V = 0): I_sc = I_L (all light-current, no voltage)
• open-circuit (I = 0): V_oc = (kT/q) ln(I_L/I_0 + 1) (~0.6 V for Si)Reading the I–V curve and finding maximum power
A single cell delivers two extreme operating points and a sweet spot in between. At short circuit the terminals are shorted, voltage is zero, and you read the full light-current I_sc — but with zero volts you extract zero power. At open circuit no current flows, the voltage climbs to V_oc ≈ 0.6 V — but with zero current you again extract zero power. Power is V×I, so it must peak *somewhere in the knee between them.* That peak is the maximum power point (MPP), and the whole game of solar engineering is keeping the cell parked exactly there.
I ▲
│I_sc ●───────────────● ← current nearly flat here
│ ╲ MPP
│ ● (V_mp, I_mp) ← biggest V×I rectangle
│ ╲
│ power = shaded rect ╲
│ ┌───────────────┐ ╲
│ │ │ ● V_oc
└───┴───────────────┴─────────┴──► V
0 V_mp ~0.6V
Fill factor FF = (V_mp · I_mp) / (V_oc · I_sc) — good Si cell ≈ 0.75–0.82The trouble is that the MPP *moves.* A cloud drifts over and I_sc drops; the panel warms in the afternoon sun and V_oc sags (silicon loses roughly 0.3% of its voltage per °C). So real systems run a small controller called an MPPT — maximum power point tracker — built into the boost converter or buck converter that feeds the battery. It nudges the operating voltage up and down a few times a second, watches whether output power rose or fell, and walks itself back onto the peak. A good MPPT recovers 15–30% more energy over a day than naively clamping the panel to the battery voltage.
Power into light: electroluminescence
Now run the device the other way. Forward-bias the junction and you flood the depletion region with electrons from the n-side and holes from the p-side. They meet, and an electron drops down across the band-gap to fill a hole. That fall releases exactly the gap energy — and in the right material it leaves as a photon rather than heat. Light produced by recombination under electrical drive is called electroluminescence, and a junction engineered to do it efficiently is a light-emitting diode.
Blue was the hold-out. Red and green LEDs existed by the 1960s–70s, but a bright, efficient blue resisted everyone for decades because no one could grow good crystalline gallium nitride. When Akasaki, Amano and Nakamura finally cracked it in the early 1990s, they won the 2014 Nobel Prize in Physics — because blue completed the set. With red, green and blue you can mix any colour; and crucially, a blue LED coated in a yellow phosphor produces white light. That single trick is why the LED bulb in your lamp exists, drawing a fifth of the power of the incandescent it replaced.
Driving an LED has one rule that trips up every beginner: an LED is a *diode*, not a resistor. Past its forward turn-on voltage the current rises almost vertically with voltage, so connecting an LED straight across a battery lets current run away and burns it out in a flash. You must limit the current — either with a humble series resistor or, in any serious product, a constant-current driver that holds the current steady regardless of supply wobble or temperature.
+V (5 V)
│
┌┴┐ series resistor sets the current
│R│ R = (V_supply - V_forward) / I_desired
└┬┘ = (5 V - 2.0 V) / 0.020 A = 150 Ω for a 20 mA red LED
│
▼ LED (anode → cathode, long leg = +)
│
─┴─ GNDWhen light gets coherent: the laser diode
An ordinary LED throws photons out in every direction, every phase, a small spread of wavelengths — light as a friendly crowd all talking at once. A laser diode disciplines that crowd into a single marching column. Take the same electroluminescent junction, drive it *hard* so there are more excited electrons than relaxed ones (a population inversion), and sandwich it between two mirrors that bounce the light back and forth through the active region. Now a passing photon doesn't just wait for a random recombination — it *triggers* another electron to drop and emit a clone photon, identical in wavelength, direction, and phase. This is stimulated emission, the 'ser' in laser.
Laser diodes also have a sharper personality than LEDs. Below a threshold current they barely lase at all, behaving like a feeble LED; cross threshold and the output snaps upward in a steep, near-linear line. They are exquisitely sensitive to temperature and to over-current — drive one a hair too hard and you can vaporise the mirror facet — so a real laser-diode driver pairs current control with a monitor photodiode that watches the back-facet light and feeds power back to hold the brightness rock-steady. Light controlling light: a fitting note to close on, because that monitor photodiode is exactly the device the next rung opens with.
Tying it together: a solar + storage node
Let's connect this rung back to the storage you built in rung 2 with a real worked example: a small off-grid garden light that charges by day and glows by night. Watch how a solar cell and an LED — the same junction physics in both directions — bookend a single energy flow.
- Harvest. A small panel of ~36 series cells delivers about 0.6 W at its MPP under full sun (≈18 V × 33 mA). Across 5 useful sun-hours that's roughly 0.6 W × 5 h = 3 Wh captured per day.
- Track. An MPPT inside the buck converter keeps the panel parked at its maximum power point as clouds and temperature shift it around, and steps the ~18 V down to the battery's charging voltage.
- Store. The energy charges a single lithium-ion cell (3.7 V). A battery management system caps the charge and watches the state of charge so you never over-charge it — exactly the storage layer from rung 2.
- Release. At dusk a light sensor flips the LED on. A constant-current driver runs a 0.1 W white LED. The stored 3 Wh ÷ 0.1 W ≈ 30 hours of light — easily one long winter night, with margin to spare.