Electronic – Relay Isolation

microcontrollerrelay

I have read on many websites to use a separate power supply for relay only. But I've few questions. Can I use some component instead of using a separate power supply ? Or what would really the problem if I use same power supply as microcontroller other than rebooting the microcontroller ?

Relay is 5V and needs to turn off and on an AC ceiling fan motor. And I'm using a relay module which has an optocoupler to switch the NPN transistor attached to input signal pin of relay.

Best Answer

Yes it's possible to use the same power supply, but it's more difficult - it's mostly an EMC issue- powering the coil itself from the same supply is not a difficult problem if you have an adequate supply, a flyback diode and control the dv/dt. Using a separate supply with opto-isolation helps provide better isolation between the hundreds of volts and several amperes sparking at the contacts and the micro, which might only be able to tolerate a few hundred mV of noise without being disrupted.

That said, there is no hard and fast rule- it may not be necessary and it may not be sufficient. It can depend on circuit design, shielding, grounding, I/O signal conditioning, snubbing, power supply design, etc.