Let's learn about circuit💥 ;
![]() |
"Circuit diagram of Arduino light control using relay module" |
📝 Summery: How does the circuit work?
1. Arduino sends a HIGH signal to the relay.
2. Relay connects COM and NO.
3. AC power goes to the light → light turns on.
4. Arduino stops the signal → light turns off
● Explanation:
1st step: (RELAY)
🔌 how does a relay work?
A relay is an electronic switch. Just like when you press a switch with your hand, a fan or a light turns on, when Arduino gives a command to the relay, the relay turns on and the light turns on. The 3 main pins of a relay are:
• COM (Common)
•NO (Normally Open)
•NC (Normally Closed)
— we usually use NO
●When the Arduino sends a HIGH signal (5V) to the relay, then:
NO and COM are connected.
This connection turns on the light by crossing the AC line.
2nd step: (Arduino)
!
🔧 How does Arduino control a relay?
A signal goes from a digital pin (e.g. pin 7) on the Arduino board to the relay IN pin. This signal determines whether the relay will be ON or OFF.
Arduino Signal Relay State Light
HIGH (5V) ON ON
LOW (0V) OFF OFF
Arduino + Relay = Smart Light Control!
💡 How is the light controlled?
A wire from an AC light is cut —
One part is placed on the COM terminal,
Another part is placed on the NO terminal.
➡️ When the relay is on, COM and NO are connected → the light turns on.
➡️ When the relay is off → the connection is cut, the light turns off.
In this way, Arduino can directly control the AC light.
⚙️ Role of Transistor and Diode (Optional)
Arduino cannot always drive a relay directly. For this, we can sometimes use an NPN transistor (BC547).
📌 Function of transistor:
Arduino → Base of transistor (with 1kΩ resistor),
Collector → Relay IN
Emitter → GND
In addition, a flyback diode is placed on the relay:
Diode: 1N4007
Cathode → Relay VCC, Anode → Relay IN
●This prevents backcurrent from flowing into the relay, which protects the Arduino.
Note:
Always test the circuit with low voltage before trying real AC power.
⚠️ Warning: This project involves working with electricity, which can be dangerous. Ensure you have proper knowledge and take necessary precautions. If you're unsure, consult with a qualified professional. [The author is not responsible for any harm or damage caused. ]
Be careful 🙌
[Circuit diagram is generated by
__________ ChatGPT ]
0 Comments