How to Control a Relay Module Using Microcontroller in Proteus | Step-by-Step Tutorial

Опубликовано: 29 Июнь 2026
на канале: Electronic simulation
1,326
13

This video demonstrates a relay module circuit using a PC817 optocoupler, 2N2222 transistor, and 5V relay in Proteus Software. The circuit safely switches a 220V AC load (e.g., lamp) using a low-voltage microcontroller signal, ideal for applications requiring galvanic isolation and high-power switching.

Key Features:

PC817 Optocoupler: Isolates the 5V microcontroller signal from the 220V AC load.
Transistor (2N2222): Amplifies the signal to drive the relay coil.
Relay (RL1): Switches the 220V AC load safely.
Flyback Diode (D2, 1N4007): Protects the transistor from voltage spikes.
LED Indicator (D1): Shows active status of the circuit.
How It Works:

Microcontroller Signal:
A 5V signal from a microcontroller (e.g., Arduino) activates the optocoupler’s LED.
Optocoupler Action:
The phototransistor turns ON → Current flows through R1 → Transistor Q1 turns ON.
Relay Activation:
Q1 energizes the relay coil → RL1 switches the 220V AC load (e.g., lamp).
What you’ll learn:

How to interface a microcontroller with a high-voltage load.
Role of optocouplers in electrical isolation for safety.
Importance of flyback diodes in inductive load circuits.
Simulating real-world circuits in Proteus.
⚠️ Safety Note: Always use isolation transformers and follow safety protocols when working with high-voltage loads.

🔔 Subscribe for more tutorials, and hit the bell for updates!