Optoelectronics systems

Sensors, embedded & practical systems · tree view

Systems built from the LED/photodiode pair: turning electricity into light and back (links, fibre), and the sealed optocoupler that passes a signal across a gap no current can cross.

Prerequisites

optocoupler symbol
optocoupler
led symbol
led
photodiode symbol
photodiode
microcontroller symbol
microcontroller
optocoupler-isolation.svg
optocoupler-isolation.svg
fiber-link.svg
fiber-link.svg
led-vs-photodiode.svg
led-vs-photodiode.svg

Optothyristors (a general term for either the LASCR or the opto-TRIAC) are commonly found inside sealed "optoisolator" modules.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. III (Semiconductors), Chapter 7, section “Optothyristors” source

Like bipolar transistors, SCRs and TRIACs are also manufactured as light-sensitive devices, the action of impinging light replacing the function of triggering voltage.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. III (Semiconductors), Chapter 7, section “Optothyristors” source

Electrical signals from digital circuits (high/low voltages) may be converted into discrete optical signals (light or no light) with LEDs or solid-state lasers. Likewise, light signals can be translated back into electrical form through the use of photodiodes or phototransistors for introduction into the inputs of gate circuits.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. IV (Digital), Chapter 14, section “Optical data communication” source

Glass fibers will "conduct" a beam of light much as a copper wire will conduct electrons, with the advantage of completely avoiding all the associated problems of inductance, capacitance, and external interference plaguing electrical signals.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. IV (Digital), Chapter 14, section “Optical data communication” source

Semiconductor photodiodes generate a current when they absorb photons (light). The amount of current generated depends on the following factors:

— U.S. Navy, NEETS Module 24 — Introduction to Fiber Optics, Chapter 7, “Semiconductor Photodiodes”

When light strikes the surface of a substance, it may dislodge electrons from their orbits around the surface atoms of the substance.

— U.S. Navy, NEETS Module 1 — Introduction to Matter, Energy, and Direct Current, Chapter 1, “Voltage Produced by Light”

Voltage produced in this manner is referred to as a PHOTOELECTRIC VOLTAGE.

— U.S. Navy, NEETS Module 1 — Introduction to Matter, Energy, and Direct Current, Chapter 1, “Voltage Produced by Light”
Show alternative explanations

Diodes made from a combination of the elements gallium, arsenic, and phosphorus (called gallium-arsenide-phosphide) glow bright red, and are some of the most common LEDs manufactured. By altering the chemical constituency of the PN junction, different colors may be obtained. Early generations of LEDs were red, green, yellow, orange, and infra-red, later generations included blue and ultraviolet, with violet being the latest color added to the selection. Other colors may be obtained by combining two or more primary-color (red, green, and blue) LEDs together in the same package, sharing the same optical lens.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. III (Semiconductors), Chapter 3, section “Light-emitting diodes” source

Optical fibers exceed the data-handling performance of copper wire in almost every regard. They are totally immune to electromagnetic interference and have very high bandwidths. However, they are not without certain weaknesses.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. IV (Digital), Chapter 14, section “Optical data communication” source

One weakness of optical fiber is a phenomenon known as microbending. This is where the fiber is bend around too small of a radius, causing light to escape the inner core, through the cladding

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. IV (Digital), Chapter 14, section “Optical data communication” source

The 817 optocoupler datasheet specifies a minimum CTR (current transfer ratio) as 50%. So if your optocoupler driving current is e.g. 10mA then [the output can sink] 5 mA.

— EEVblog forum, “Using resistors and optocouplers as AC voltage detector for Arduino”, community thread — CTR is a datasheet concept, not covered by the library books source

Optocoupler: input side on/off → output side

An LED and a photosensitive receiver share one sealed package with no electrical connection across the gap (book: sealed "optoisolator" modules; light replaces the triggering voltage). Predict the output like a relay with photons as the actuator. CTR arithmetic python-verified; CTR itself flagged as a datasheet concept.

To predict the outcome:

  1. Drive the input LED with current If → photons cross the gap.
  2. Receiver conducts proportionally: Iout ≈ CTR × If (CTR typically 50%+, datasheet).
  3. Kill If → receiver reverts to blocking; the two sides keep their own grounds.
  4. Check what the isolation rating buys: each side references its own supply, so neither's voltage exists on the other side.
input_ledreceiveroutput_nodeisolation_statemargin_note
off (If = 0)blocked — output transistor openpulled by the load to its own railfull isolation, nothing crosses but darknessnothing to size
on, If = 10 mA, CTR = 50% (min)conducts ≥ 5 mA (python-verified)sinks the load — logic state crosses the gapstill isolated; signal transferred opticallysatisfied — 10 mA in, 5 mA available
on, output tries to draw more than CTR × Ifcomes out of saturation — signal degradeslogic levels sagrating unchanged, margin gonesize If so the load current sits inside the CTR envelope
AC-driven through a resistor (mains-probe style)conducts on each half-cycle in which the LED is forward-biasedpulse train at line frequency, not DCdetector side never touches the linecommunity designs add a reverse-protection diode — LED PIV is only ~5 V

Electrical ↔ optical direction: LED vs photodiode

The book's two-way conversion table: LEDs/lasers make light from current; photodiodes/phototransistors make current from light. Predict each device's job, its electrical behaviour, and which way the information flows.

To predict the outcome:

  1. Ask: does current in make light out (emitter), or light in make current out (detector)?
  2. Emitter: forward-bias the junction — electrons recombining emit photons; needs a series resistor (see special-diodes lesson).
  3. Detector: reverse or zero bias — absorbed photons generate carriers; output is a current to be amplified.
  4. Pair them with nothing but a gap and you have an isolator; guide the light down glass and you have a fibre link.
deviceconversionelectrical_behavioursystem_role
LEDelectrical → opticaldiode: conducts forward above ~1.6–3 V, blocks reversetransmitter, indicator, optocoupler input
Photodiodeoptical → electricalphotocurrent linear with light (PC mode), self-generates in PV modereceiver, light meter, optocoupler output
Optocoupler (LED + photoreceiver, sealed)electrical → optical → electricalinput LED on one side, receiver on the other, no shared conductorgalvanic isolation between circuits that must not share ground
Solid-state laser + fibre + photodiodeelectrical → optical (through glass) → electricalbook: avoids inductance, capacitance and external interference entirelylong-distance, EMI-proof data link
LASCR / opto-TRIACoptical trigger → power conductionbook: impinging light replaces the triggering voltageisolated switching of loads

Why isolate? isolation-gap verdicts

Predict what the isolation barrier is for in each scenario. Anchors: the book's sealed-module quote, the fibre passage on escaping interference, and the BogusBus ground-fault story (two grounds at different rails short-circuit).

To predict the outcome:

  1. Ask: do the two sides need to share current? If not, isolation is free signal transfer.
  2. Different ground potentials: a conductor across the gap carries the difference as fault current; a photon does not.
  3. High-voltage side: isolation keeps user-side electronics at low voltage.
  4. Noisy ground: optical transfer skips the shared-impedance path entirely.
scenariocrossing_allowedwhat_is_blockedverdict
microcontroller watching a high-voltage circuitlight onlyfault current, voltage differencethe defining optocoupler job
two boards powered by different supplies, grounds not tiedoptical signalthe undefined ground difference (book's short-circuit scenario)isolation removes the ground-potential question
noisy industrial plant wiring (book: RS-422 territory)light (or a differential pair)common-mode noise on the shared groundfibre is the extreme case — total EMI immunity (book)
low-voltage LED indicator on the same boardordinary wirenothing needs blockingisolation would be cost without benefit — plain wire is right

Candidate projects — awaiting review

  • Isolated AC-mains detector: series resistor + protection diode feeding a PC817 input side, microcontroller pin on the output side watching the line-frequency pulse train — on a low-voltage test load, with the isolation verified by multimeter. (https://www.eevblog.com/forum/projects/isolated-voltage-detector-(ac-mains)/, community)
  • PC817 101: drive the LED side from a microcontroller pin, switch a separate-supply lamp on the transistor side; measure input and output currents to extract your own CTR and compare with the 50% datasheet minimum. (https://www.eevblog.com/forum/beginners/playing-with-arduino-and-pc817-optocoupler-voltage-measurement-doubt/, community)
  • Isolating an analog signal with an optocoupler: deliberately drive the PC817 into its linear region (or PWM + filtering), plot input vs output and map the nonlinearity. (https://www.eevblog.com/forum/projects/isolating-analog-signal-with-an-optocoupler/, community)
  • Through-the-air and through-the-fibre data link: blink an LED/laser into a photodiode receiver — first across a dark box, then down a short plastic fibre — and scope the recovered logic waveform. (Kuphaldt, Lessons In Electric Circuits Vol. IV ch. 14, “Optical data communication”, book)