Core Lesson Content
From Wall Outlet to Working Circuit
Lesson 1 gave you the diode as a device; Lesson 2 puts it to work. The centerpiece is the linear power supply chain that hides inside nearly every piece of electronics you own:
- Transformer: steps the line voltage down to a safe, usable AC level and provides isolation from the mains.
- Rectifier: diodes convert AC into pulsating DC (this lesson's first half).
- Filter: a large capacitor smooths the pulses into DC with a small residual ripple.
- Regulator: an active circuit flattens the last of the ripple and holds the output rock-steady.
The second half of the lesson turns the diode's light-emitting and light-sensing cousins โ LEDs, photodiodes, phototransistors, and optocouplers โ into practical circuits, ending with optical isolation design, one of the most important safety techniques in industrial electronics.
Try It Live
The Half-Wave Rectifier
The simplest possible rectifier: one diode in series between the transformer secondary and the load. During the positive half-cycle the diode is forward biased and the load sees the input minus one diode drop. During the negative half-cycle the diode blocks completely and the output sits at zero.
Worked Example
A 12.6 VRMS transformer secondary feeds a half-wave rectifier: VPK(in) = 12.6 ร 1.414 = 17.8 V, so VPK(out) = 17.8 โ 0.7 = 17.1 V and VAVG = 0.318 ร 17.1 โ 5.4 V. Two-thirds of the available energy is simply discarded during the blocked half-cycle.
Why It's Rarely Used for Power
- Wasted half-cycle: the transformer works only 50% of the time โ poor utilization.
- Low ripple frequency: 60 Hz gaps are long, demanding a huge filter capacitor.
- DC core saturation: one-directional secondary current can magnetize the transformer core.
Full-Wave Rectifiers: Center-Tapped and Bridge
Center-Tapped Full-Wave (2 Diodes)
A transformer with a grounded center tap splits the secondary into two half-windings of opposite phase. One diode conducts on each half-cycle, so the load receives both halves โ but each half-winding provides only half the total secondary voltage, and each diode must block a PIV of 2 VPK.
The Bridge Rectifier (4 Diodes)
Four diodes in a diamond steer current so that both half-cycles drive the load in the same direction. On each half-cycle two diodes conduct in series (1.4 V total drop). The bridge uses the full secondary voltage, requires no center tap, and each diode's PIV is only โVPK โ which is why it dominates modern designs.
| Parameter | Half-Wave | Center-Tapped FW | Bridge FW |
|---|---|---|---|
| Diodes | 1 | 2 | 4 |
| Diode drops in path | 0.7 V | 0.7 V | 1.4 V |
| Uses full secondary V? | Yes | No (half per side) | Yes |
| Diode PIV required | โ2 VPK (with filter) | โ2 VPK | โVPK |
| Ripple frequency | 60 Hz | 120 Hz | 120 Hz |
| VAVG (unfiltered) | 0.318 VPK | 0.637 VPK | 0.637 VPK |
| Typical use | Signal detection, cheap chargers | Legacy designs, dual supplies | Virtually everything modern |
Capacitive Filter Networks and Ripple Voltage
Pulsating DC becomes usable DC through one elegantly simple mechanism: a reservoir capacitor across the rectifier output. Each incoming pulse charges the capacitor to the peak through the conducting diode. Between pulses the diode is reverse biased (the capacitor voltage exceeds the falling input), so the capacitor alone supplies the load, discharging slowly through it. The result is DC with a small sawtooth ripple riding on top.
The Ripple Equation
Every term teaches a design lever: more load current โ more ripple; bigger capacitor โ less ripple; and full-wave's 120 Hz โ half the ripple of half-wave for free.
Worked Example
A bridge rectifier (fripple = 120 Hz) charges a 1000 ยตF capacitor feeding a 100 mA load: Vr(pp) = 0.1 / (120 ร 0.001) = 0.83 V of ripple. Swap in a half-wave rectifier (60 Hz) and ripple doubles to 1.67 V. Drop the capacitor to 100 ยตF and it balloons to 8.3 V โ the supply is barely DC anymore.
Design Consequences
- Surge current: at power-on the empty capacitor charges from zero โ a brief near-short. Diodes need adequate surge (IFSM) ratings.
- Diode conduction angle: with a large capacitor, diodes conduct only in short gulps at each peak, so peak diode current far exceeds the average load current.
- PIV increase: the charged capacitor holds the cathode near +VPK while the input swings to โVPK, so a half-wave diode sees nearly 2 VPK reverse.
Voltage Regulators: The Final Polish
Filtered DC still isn't good enough for logic chips and sensors: it sags when the line voltage dips, rises when the load lightens, and always carries some ripple. A voltage regulator is an active circuit that compares its output against an internal reference and continuously adjusts to hold it constant.
The Three-Terminal Linear Regulator (78xx / 79xx)
The classic 7805 takes any input from about 7 V to 25 V and produces a fixed +5.0 V, with built-in current limiting and thermal shutdown. Its rules are simple:
- Headroom: input must stay at least the dropout voltage (~2 V) above the output โ including at the bottom of every ripple trough. A 7805 needs its input to never dip below โ7 V.
- Power dissipation: the excess voltage times load current becomes heat: P = (VIN โ VOUT) ร ILOAD. A 12 V input at 1 A wastes 7 W โ hence heat sinks.
- Ripple rejection: a healthy regulator attenuates input ripple by 60โ80 dB, turning volts of sawtooth into millivolts.
Zener Shunt vs. Three-Terminal Series
| Property | Zener Shunt (Lesson 1) | Three-Terminal Linear (7805) |
|---|---|---|
| Complexity | 1 diode + 1 resistor | 1 IC + 2 small capacitors |
| Efficiency | Poor (burns current constantly) | Moderate (burns headroom only) |
| Load capability | Tens of mA | 1โ1.5 A (78xx family) |
| Protection | None | Current limit + thermal shutdown |
| Best use | References, small bias rails | General-purpose supply rails |
Oscilloscope Measurement of AC/DC Conversion
The oscilloscope is how a technician sees a power supply working. A systematic stage-by-stage probe sequence turns troubleshooting from guesswork into diagnosis.
The Four-Point Probe Sequence
- Transformer secondary (DC coupling): a clean sine wave at the expected VPK. Missing or distorted โ transformer/line problem.
- Rectifier output, capacitor disconnected (DC coupling): pulsating DC humps. Count the humps: gaps at 60 Hz โ half-wave behavior (in a bridge, that means a failed diode!).
- Filter output (DC coupling, then AC coupling): DC coupling shows the average level; switching to AC coupling lets you magnify the millivolt-to-volt sawtooth ripple for measurement.
- Regulator output (AC coupling, high sensitivity): should be nearly flat. Visible ripple here means dropout โ check upstream.
Reading Ripple Like a Pro
- Amplitude: measure ripple as VPP (trough to crest) on AC coupling.
- Frequency: one ripple period of 16.7 ms โ 60 Hz (half-wave); 8.33 ms โ 120 Hz (full-wave). This single measurement identifies the rectifier topology โ or exposes a dead bridge diode when a "120 Hz" supply shows 60 Hz ripple.
- Shape: healthy capacitor ripple is a sawtooth (slow discharge, fast recharge). A ripple that looks like the raw humps means the capacitor has failed open or dried out.
Light-Emitting Diodes
An LED is a P-N junction engineered so that forward-current recombination releases energy as photons instead of heat. The emitted color is set by the semiconductor's band gap โ which also sets the forward voltage.
| Color | Typical VF | Typical Material |
|---|---|---|
| Infrared (remote controls, optocouplers) | 1.2โ1.5 V | GaAs |
| Red | 1.8โ2.2 V | AlGaAs |
| Yellow / Green | 2.0โ2.4 V | AlGaInP / GaP |
| Blue / White | 3.0โ3.6 V | InGaN |
Designing the Drive Circuit
An LED is still a diode: above VF its current rises exponentially, so it must never be connected directly across a supply. The series resistor does the current-setting:
Worked example: drive a red LED (VF = 2.0 V) at 15 mA from a 5 V rail: R = (5 โ 2.0) / 0.015 = 200 ฮฉ โ use the standard 220 ฮฉ value, giving I = 3.0/220 โ 13.6 mA. Check resistor power: P = IยฒR = 0.041 W โ an eighth-watt part is fine.
- Brightness control: proportional to current โ but dimming is best done with PWM (rapid switching), not analog current reduction, to keep color stable.
- Reverse fragility: most LEDs tolerate only โ5 V reverse. On AC, pair the LED with an antiparallel diode.
- Polarity ID: the flat spot and the shorter lead mark the cathode.
Photodiodes and Phototransistors
Run the LED story backwards: when photons strike a P-N junction's depletion region, they generate electron-hole pairs, and the junction's built-in field sweeps them out as a photocurrent proportional to light intensity. That is a photodiode.
Two Operating Modes
| Mode | Bias | Character | Best For |
|---|---|---|---|
| Photovoltaic | Zero bias | Generates its own voltage (a tiny solar cell); very linear, low noise, but slow | Light meters, precision sensing, solar cells |
| Photoconductive | Reverse bias | Light modulates the leakage current; wider depletion region โ much faster response | Data links, fiber optics, encoders, optocouplers |
Note the beautiful continuity with Lesson 1: the "leakage current" we dismissed as a nuisance in rectifiers becomes the signal in a photoconductive photodiode. Dark current โ the leakage with no light present โ is now the noise floor.
The Phototransistor
Replace the base wire of a transistor with a light window: photons generate the base current, and the transistor multiplies it by its gain (ฮฒ). The result is 50โ500ร more sensitivity than a bare photodiode, traded against slower response. Phototransistors are the standard detector inside low-cost optocouplers, slotted optical switches, and reflective object sensors.
- Common circuit: phototransistor + pull-up resistor = light-controlled logic level. Dark โ output HIGH; illuminated โ output LOW.
- Applications: encoder wheels (RPM counting), paper detectors in printers, IR remote receivers, safety light curtains.
Optocouplers and Optical Isolation Design
An optocoupler (optoisolator) packages an infrared LED and a photodetector face-to-face across a transparent insulating barrier. The signal crosses as light; electricity cannot cross at all. Typical parts withstand 2,500โ5,000 V between input and output.
Why Isolate?
- Safety: lets a 5 V microcontroller monitor or control mains-voltage circuits with no galvanic path for a fault to travel.
- Ground loop elimination: two systems with different ground potentials can exchange data without circulating currents.
- Common-mode noise rejection: volts of noise between the two grounds simply never appear at the output โ light doesn't carry it.
The Key Specification: CTR
A 4N35 with CTR = 100% delivers 10 mA of output collector current for 10 mA of LED drive. CTR varies with LED current and temperature, and degrades as the LED ages โ good designs assume the minimum datasheet CTR and drive the output well into saturation for digital signaling.
Design Procedure (Digital Isolation)
- Choose the LED forward current (typically 5โ15 mA) and compute the input resistor: RIN = (VLOGIC โ VF) / IF.
- From minimum CTR, find the guaranteed output current: IC = IF ร CTRmin.
- Size the output pull-up so the phototransistor saturates: ROUT โฅ VCC / IC.
- Verify speed: phototransistor couplers manage ~10โ50 kHz; use logic-output couplers (6N137-class) for fast data.