Optocoupler and Triac to Control AC Load MOC3021 Triac Driver Circuit
Learn to control AC loads safely using the MOC3021 optocoupler and triac. Step-by-step guide with components, working principle, circuit diagram, and troublesho...
What Is an MOC3021 Triac Driver Circuit?
MOC3021 is a zero-crossing optoisolator, which is fitted with a triac driver. It is constructed to separate control circuits of low voltage from high-voltage AC loads. This circuit enables the safe switching of AC devices with the help of a microcontroller, a switch, or any DC trigger.
running LED effect circuit diagram
One of the most common electronics projects is a running LED chaser circuit powered by a CD4017 IC that is used to illuminate a decoration, as indicators of a signal, or to teach digital electronics. This circuit provides a sequential effect of LED lighting wherein LEDs are activated consecutively in some form of running or chasing effect.
A timekeeping counter, CD4017 IC, is a decade counter fed with the clock pulses of a 555 timer IC. The CD4017 spins the switch 10 of its 10 output pins with each pulse, one after another, with the LEDs then connecting to it, glowing in a sequence. With resistors, capacitors, and LEDs, the CD4017 can be used with resistors to create a nice running light display. This tutorial discusses every single element, the principle of operation, circuit board, step-by-step instructions on building your own LED chaser circuit at home, as well as troubleshooting.
Advantages of Using CD4017 for LED Chasers
- Sequential Control: Lights LEDs in a controlled order.
- Simplicity: Requires only a few components like 555 timer & CD4017.
- Adjustable Speed: Clock frequency controls running speed.
- Multiple LEDs: Supports up to 10 LEDs per IC.
- Educational: Demonstrates counting, pulses & sequencing.
Components Required
| Component | Quantity | Purpose |
|---|---|---|
| CD4017 Decade Counter IC | 1 | Sequential LED control |
| NE555 Timer IC | 1 | Generates clock pulses |
| LEDs | 10 | Visual display |
| Resistors (330Ω – 1kΩ) | 10 | LED current limiting |
| Potentiometer (10kΩ – 100kΩ) | 1 | Clock speed adjustment |
| Capacitors (0.01µF – 100µF) | 2 | Timing & filtering |
| 9V DC Power Supply | 1 | Powers ICs & LEDs |
Working Principle of the Circuit
Clock Pulse Generation
The 555 timer generates square wave pulses that determine LED running speed.
CD4017 Decade Counter
Receives clock pulses and activates Q0–Q9 outputs sequentially.
LED Sequencing
Each output drives an LED through a resistor, creating the chaser effect.
Reset Function
The sequence restarts automatically after 10 pulses.
Circuit Diagram Explanation
555 Timer IC
- Pin 1 → GND
- Pin 2 → Trigger (connected to Pin 6)
- Pin 3 → Clock output → CD4017 Pin 14
- Pin 4 → Reset (VCC)
- Pin 5 → Control (0.01µF cap optional)
- Pin 7 → Discharge
- Pin 8 → VCC
CD4017 IC
- Pin 16 → VCC
- Pin 8 → GND
- Pin 13 → Disable (GND)
- Q0–Q9 → LEDs via resistors
Step-by-Step Construction Guide
- Assemble the 555 timer in astable mode for pulse generation.
- Connect 555 output to CD4017 clock input.
- Wire LEDs to CD4017 outputs using resistors.
- Connect a stable 9V DC power supply.
- Adjust potentiometer to control LED chase speed.
Applications
- Decorative lighting
- Electronic display boards
- Learning digital counters
- DIY electronics projects
- Art-based LED installations
Troubleshooting Tips
- LEDs not lighting → Check 555 output & wiring.
- Wrong sequence → Verify CD4017 reset & pin connections.
- Speed issues → Adjust timing resistor/potentiometer.
- Dim LEDs → Check resistor values.
- IC heating → Ensure voltage ≤12V.