Skip to main content
PartAndStock
Blog

What Is the MOC3021? Triac-Driver Optocoupler and Uses

October 26, 2026 5 min read
Quick answer

The MOC3021 is a triac-driver optocoupler. It contains an LED + a small triac; isolating the MCU, it triggers a power triac and switches AC mains loads (lamps/heaters/motors). It does not drive the load directly; a power triac (e.g. BT136/BT138) and a trigger resistor are also needed. It is random-phase trigger (for dimming); the zero-crossing version is the MOC3041.

The MOC3021 is a triac-driver optocoupler: it contains an LED + a small triac and, isolating the microcontroller, triggers a large power triac. This safely switches AC mains loads (lamps, heaters, motors). For the concept, see what is an optocoupler.

What is the MOC3021 used for?

AC load control from an MCU (dimmers, solid-state switching instead of a relay). The MOC3021 is random-phase trigger (for phase-cut/dimming); the zero-crossing version is the MOC3041/MOC3061 (less noise for simple on/off).

MOC3021 pinout (DIP-6)

PinFunction
1Anode (LED +)
2Cathode (LED −)
3NC
4Main terminal (triac)
5NC
6Main terminal (triac)

Watch out

The MOC3021 does not drive the load directly; it only triggers the gate of the power triac. The circuit also needs a power triac (e.g. BT136/BT138) and a trigger resistor (e.g. 330–470 Ω). A current-limiting resistor on the input LED is a must. Because it works at mains voltage, isolation and safety are critical.

Equivalents

  • MOC3041 / MOC3061: zero-crossing trigger versions.
  • MOC3020 / MOC3022: the close family.
  • PC817 + triac: a discrete solution.

Find it in our catalog

Use the MOC3021 search.

Frequently Asked Questions

What is the MOC3021?+
The MOC3021 is a triac-driver optocoupler. It contains an LED + a small triac; isolating the MCU, it triggers a power triac and switches AC mains loads (lamps/heaters/motors).
Does the MOC3021 drive the load directly?+
No; it only triggers the gate of the power triac. The circuit also needs a power triac (e.g. BT136/BT138) and a trigger resistor (330–470 Ω).
How does the MOC3021 differ from the MOC3041?+
The MOC3021 is random-phase trigger (for dimming/phase-cut); the MOC3041/MOC3061 trigger at the zero crossing (less noise for simple on/off).
What is the MOC3021 pinout?+
DIP-6: 1 Anode, 2 Cathode (input LED); 4 and 6 main terminals (internal triac); 3 and 5 NC.
What are MOC3021 equivalents?+
The zero-crossing MOC3041/MOC3061; the close family MOC3020/MOC3022; the discrete PC817 + triac.