Optocoupler Relay Module (NO / NC / COM) & Isolation Lab — Engineering Notes & Troubleshooting
Control high-power pumps, solenoid locks, or AC lamps safely from a tiny 3.3V/5V GPIO! An optocoupler uses invisible infrared light inside a sealed chip to bridge the command across a physical air gap — keeping your microcontroller 100% galvanically isolated from the high-power load.
Each 5V relay coil draws ~70–80 mA when energized — for 4-channel or 8-channel relay boards, power JD-VCC from a dedicated 5V supply!
- COM (Common) connects to NC (Normally Closed) when the relay coil is OFF, and snaps over to NO (Normally Open) when energized!
- Most blue Songle relay modules are ACTIVE-LOW (writing GPIO LOW turns the relay ON!) because the optocoupler LED sinks current into the MCU pin.
| Symbol | Component | Real-World Engineering Tip |
|---|---|---|
| K1 · OK1 | PC817 Optocoupler + 5V Electromechanical Relay | Need silent, rapid PWM switching (>1 Hz)? Never use a mechanical relay (contacts wear out in ~100,000 clicks) — use a MOSFET (Lab 11) or Solid-State Relay (SSR)! |
Real-World Bench Scenario: Smart Irrigation Pump on ESP32: Wire +12V battery → COM, NO → 12V water pump → GND. Even if the pump draws 5 Amps, the ESP32 only sends a tiny 2 mA optocoupler signal!
Bench Challenge: Contact Switch: Toggle GPIO LOW/HIGH and switch wiring between NO (Normally Open) and NC (Normally Closed) to watch the internal iron armature click!