Communica

MOC3021 Optocoupler: Datasheet Insights, Specifications, and Practical Application Guide

In-depth guide to the MOC3021 optocoupler: datasheet, pinout, specs, wiring, troubleshooting, and tips for local South African engineers and students.

electronic component fuses
January 16, 2026
4 min read

Critical Specs Explained

Learn isolation, current transfer, and triac drive specs for informed design decisions.

Practical Wiring & Testing

Get step-by-step pinout, wiring diagrams, and tips for safe switching applications.

Local Sourcing & Use Cases

Understand SA stock, compatible parts, and real-world examples for industry and education.

What is the MOC3021 Optocoupler?

The MOC3021 is a widely used optoisolator (or optocoupler) incorporating an infrared LED and a zero-cross triac driver output. It is purpose-built to control AC power loads through isolation, making it a favorite in industrial, automation, appliance, and academic labs across South Africa.

Its main role is to trigger a high-voltage AC load via a microcontroller or logic circuit while electrically isolating low and high voltage sides, thus protecting sensitive devices and users. Common applications include lamp dimmers, relay-less switching in IoT devices, and solid-state relays.

Pinout and Package Details

Pin Name Function
1 Anode LED positive
2 Cathode LED ground
3 NC No connect
4 Triac Gate Trigger output
5 Main Terminal Load side
6 NC No connect

The device comes in a DIP-6 plastic package and is compatible with breadboards, perfboards, and through-hole soldering-ideal for prototyping and educational settings.

Core Electrical Specifications

Parameter Typical Value Unit
Input Forward Voltage (LED) 1.15 V (If=10mA)
Input Forward Current 10-30 mA
Peak Off-State Voltage 400 V
Output Trigger Current 15 mA (max)
Isolation Voltage 5300 Vrms
Rise/Fall Time ~2 us

These values may vary slightly based on manufacturer, so always check the specific datasheet linked in the sources below when selecting a part at Communica.

Consideration: For driving power loads in South African mains (220-240V AC), always confirm the triac or load you connect downstream is correctly rated for both voltage and current-as the MOC3021 itself handles triggering, not load switching.

How Does the MOC3021 Work?

A logic-level signal on the LED side (input pins 1 and 2) causes infrared light emission within the chip. This light activates the triac driver on the output side, firing the gate when the AC waveform crosses zero (zero crossing detection is not included in the basic MOC3021). It is best used to trigger external triacs or scrs to switch high-voltage loads-ensuring galvanic isolation between microcontroller and AC circuits.

Wiring Example for Microcontroller to AC Load

 (ASCII Circuit)
[3.3V/5V GPIO]---[Resistor]---[Anode (1) MOC3021 Cathode (2)]
                     |
               [Triac Gate (4)]---|>---[External Triac]
                                 |
                          [AC Load/Lamp]

The input resistor (typically 220-470Ohm) limits current to the LED. The output side triggers a triac suited to your load-for small appliances, select a triac rated for at least 2x your expected current at 230V AC (see product links at Communica).

Related Circuit Protection & Passive Components Products

Discover quality circuit protection & passive components products related to MOC3021 Optocoupler: Datasheet Insights, Specifications, and Practical Application Guide

Tt Opi1264a Optocouplers, Photodetectors & Photointerrupters

Tt Opi1264a Optocouplers, Photodetectors & Photointerrupters

TTOptocouplers, Photodetectors & Photointerrupters
ZAR56.93

Tt Opi1264a Optocouplers, Photodetectors & Photointerrupters

Communica Pt331c Optocouplers, Photodetectors & Photointerrupters

Communica Pt331c Optocouplers, Photodetectors & Photointerrupters

CommunicaOptocouplers, Photodetectors & Photointerrupters
ZAR2.88

Communica Pt331c Optocouplers, Photodetectors & Photointerrupters

Vishay Cqy80n Optocouplers, Photodetectors & Photointerrupters

Vishay Cqy80n Optocouplers, Photodetectors & Photointerrupters

VishayOptocouplers, Photodetectors & Photointerrupters
ZAR13.66

Vishay Cqy80n Optocouplers, Photodetectors & Photointerrupters

Communica 4n32 Optocouplers, Photodetectors & Photointerrupters

Communica 4n32 Optocouplers, Photodetectors & Photointerrupters

CommunicaOptocouplers, Photodetectors & Photointerrupters
ZAR9.18

Communica 4n32 Optocouplers, Photodetectors & Photointerrupters

Tlp785gb Single Ch Opto Coupler Ctr= 100-600% Dip4

Tlp785gb Single Ch Opto Coupler Ctr= 100-600% Dip4

ToshibaOptocouplers, Photodetectors & Photointerrupters
ZAR4.31

Tlp785gb Single Ch Opto Coupler Ctr= 100-600% Dip4

Communica Tlp521-1gb Optocouplers, Photodetectors & Photointerrupters

Communica Tlp521-1gb Optocouplers, Photodetectors & Photointerrupters

CommunicaOptocouplers, Photodetectors & Photointerrupters
ZAR28.75

Communica Tlp521-1gb Optocouplers, Photodetectors & Photointerrupters

Communica Sfh600-2 Optocouplers, Photodetectors & Photointerrupters

Communica Sfh600-2 Optocouplers, Photodetectors & Photointerrupters

CommunicaOptocouplers, Photodetectors & Photointerrupters
ZAR23.29

Communica Sfh600-2 Optocouplers, Photodetectors & Photointerrupters

Communica Moc3021 Optocouplers, Photodetectors & Photointerrupters

Communica Moc3021 Optocouplers, Photodetectors & Photointerrupters

CommunicaOptocouplers, Photodetectors & Photointerrupters
ZAR10.29

Communica Moc3021 Optocouplers, Photodetectors & Photointerrupters

Communica H11d1 Optocouplers, Photodetectors & Photointerrupters

Communica H11d1 Optocouplers, Photodetectors & Photointerrupters

CommunicaOptocouplers, Photodetectors & Photointerrupters
ZAR11.27

Communica H11d1 Optocouplers, Photodetectors & Photointerrupters

Vishay 6n135 Optocouplers, Photodetectors & Photointerrupters

Vishay 6n135 Optocouplers, Photodetectors & Photointerrupters

VishayOptocouplers, Photodetectors & Photointerrupters
ZAR16.04

Vishay 6n135 Optocouplers, Photodetectors & Photointerrupters

Communica 4n33 Optocouplers, Photodetectors & Photointerrupters

Communica 4n33 Optocouplers, Photodetectors & Photointerrupters

CommunicaOptocouplers, Photodetectors & Photointerrupters
ZAR7.76

Communica 4n33 Optocouplers, Photodetectors & Photointerrupters

Communica 4n25 Optocouplers, Photodetectors & Photointerrupters

Communica 4n25 Optocouplers, Photodetectors & Photointerrupters

CommunicaOptocouplers, Photodetectors & Photointerrupters
ZAR7.76

Communica 4n25 Optocouplers, Photodetectors & Photointerrupters

Design Choices: Selection Criteria

  • Match input side current to your GPIO or driver, using a series resistor as calculated below.
  • For inductive loads (motors, solenoids), use a snubber circuit or select a logic-compatible triac with sufficient dV/dt rating.
  • Always check isolation voltage and creepage requirements for mains applications, especially in South African industrial environments.

Current-Limiting Resistor Calculation

To drive the input LED with 10mA from a 3.3V microcontroller:

R = (V_GPIO - V_LED) / I_LED
R = (3.3V - 1.15V) / 0.010A ~ 215Ohm

Use the nearest standard value above your result (e.g., 220Ohm). Adjust for 5V logic as required.

Application Examples in South Africa

  • Smart home automation: DIY AC lamp and device control using Arduino, ESP32, or Raspberry Pi setups.
  • Industrial PLC panels: Optoisolated AC/reed relay drivers in production and test jigs, where local mains (230V) safety is a priority.
  • Tertiary teaching labs: Demonstrating safe switching principles, circuit isolation, and thyristor triggering across various education levels.

Communica stocks the MOC3021 and compatible alternatives (see all optoisolators and triacs in passive components and major brands like Vishay and Lite-On). Check availability online or at Samrand, Cape Town, or Pretoria branches-VAT invoices and academic orders are supported.

Troubleshooting Tips

  • Always verify output side connection polarity-miswiring can damage the MOC3021 or attached triac.
  • If loads do not trigger, check input current (is the GPIO sinking enough, is resistor value correct?).
  • For loads turning on erratically, review snubber/capacitor sizing or excess line noise on the output.
  • Ensure adequate PCB spacing, especially at 230V-use local PCB house clearance guidelines.

Comparison: MOC3021 vs Similar Optoisolators

Part Number Zero-Crossing Output Type Typical Use
MOC3021 No Triac Driver General AC load switching
MOC3041 Yes Triac Driver Low-EMI AC switching
4N35 No Phototransistor Signal isolation

Choose zero-crossing versions (MOC3041/3043) for noise-sensitive loads, or MOC3021 for phase/dimming control or custom timing.

Sources

Communica Samrand — Electronic Component Experts

Communica supplies semiconductors and electronic components to industries such as automotive, electrical, automation, mining, and education.

Last updated: January 16, 2026

Disclaimer: This content is for educational purposes only. Product availability, pricing, and specifications are subject to change. Always verify current details on the retailer's website before making a purchase. We may earn affiliate commissions from qualifying purchases.

Frequently Asked Questions

Get answers to common questions about Circuit Protection And Passive Components

Why Choose Communica?

*Free Shipping

Free shipping for orders over ZAR 1,000.00.

7-Day Returns

Get a full refund if you had the product for less than 7 days.

Quick Delivery

Nationwide delivery within 2 - 4 working days.