LED GURUcosycom.com
PAGE 070 OF 150 · DRIVING WITH SWITCHES & TRANSISTORS

Optocoupler Basics

An LED and light sensor pass signals without electrical contact.

LED SYMBOLTriangle points from anode to cathode; the arrows show light leaving the part.

What it does

An optocoupler holds an infrared LED and a light-sensitive transistor in one package. Light crosses a gap, so the input and output circuits have no electrical connection.

Using one

  • Drive the input LED through a resistor, as for any LED.
  • The output transistor acts like a switch with a limited current rating.
  • Current transfer ratio (CTR) tells how much output current you get for a given input current; common parts such as the PC817 vary widely.

Optocouplers are chosen for safety isolation and noise immunity, and are slower than a normal transistor.

REMEMBER
A transistor lets a tiny signal control a much larger LED current.

Try it yourself

Sketch the circuit on paper first, calculate the values, then build it on a solderless breadboard using a low-voltage supply. Measure with a multimeter before you make anything permanent.

Explore LED clocks, stopwatches and electronics at cosycom.com.

Watch: COSYCOM channel videos

www.youtube.com/@cosycom