2
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ "other than rebooting the microcontroller" isn't that reason enough? \$\endgroup\$ – PlasmaHH Jun 17 '15 at 10:24
2
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

A separate power supply is definitely the ideal way to go, with opto-isolators separating the microprocessor from the relay, but that really isn't necessary for most small relays.

What you do need to do though is put a reverse biased diode across the relay coil to suppress transients on opening, and I always put a snubber circuit across the coil as well; either a self contained one, or a 10 Ohm resistor in series with a .22uF capacitor (for a 5VDC coil); again, for transient suppression.

Relays are quite an inductive load, so you need to protect your control electronics. Even when using the same supply, I would still stick either a driver transistor or even better an opto-isolator between the uP and the relay coil.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.