Comparators & Mixed-Signal Building Blocks

an opto-isolator

/ OP-toh EYE-so-lay-ter /

An opto-isolator lets a signal cross from one circuit to another with no electrical wire between them — the message travels as a flash of light across a tiny gap. Inside one little package sits an LED facing a phototransistor. Turn the LED on and its light switches the phototransistor on; turn it off and the transistor goes off. The signal gets through, but the two sides share no metal connection, so they can sit at wildly different voltages in perfect safety. It is a one-way window: light passes, dangerous voltage does not.

Here is the chain in steps. A current of a few milliamps through the input LED makes it glow. The glow lands on the base region of the phototransistor a fraction of a millimetre away, generating a current that turns that transistor on. The ratio of output current to input LED current is called the current transfer ratio (CTR), often 20 to 100 percent, and it varies a lot part-to-part and ages over time. Between the LED and the transistor is an insulating barrier rated to withstand thousands of volts — typically 2.5 kV to 5 kV — so a fault that puts mains voltage on one side cannot reach the other. You drive the LED through a current-limiting resistor just like any LED: at 5 V with a 1.2 V LED drop and a 330 ohm resistor, about (5 - 1.2)/330 = 11.5 mA flows.

Opto-isolators show up wherever a low-voltage controller must touch a dangerous or noisy world: feeding back from a mains-powered switching supply to its low-voltage control side, letting a microcontroller sense or switch high-voltage equipment, and breaking ground loops between instruments. The honest limits: a basic phototransistor optocoupler is slow (kHz to low MHz) because the phototransistor's capacitance is large, its CTR drift means you cannot rely on it for analog accuracy, and it only carries a signal — never power. For fast digital links there are special logic-gate optocouplers and digital isolators; for analog you need linear-optocoupler tricks. Isolation is for safety and noise, not for moving energy.

A 3.3 V microcontroller switches a 230 V heater safely: its output drives the optocoupler's LED through a 330 Ω resistor (about 6 mA), and the phototransistor on the other side, sitting in the mains-referenced circuit, triggers a triac. A 5 kV barrier keeps the mains away from the microcontroller even if the heater side fails.

Light carries the message; thousands of volts cannot follow.

Current transfer ratio is loose and ages, so do not design an optocoupler to set a precise gain. Use it as a switch with margin, or pick a part rated for the isolation voltage your safety case actually requires.

Also called
optocouplerphotocoupler光隔離器光電耦合器