0
\$\begingroup\$

Please see my crude drawing: Two options for fly-back diode

My question is this. If I was to have multiple relays powered from the same rail, but have each one sinking via whatever to respective MCU pins, could I use option B as the single fly-back diode, or must I have it like option A with a diode for each coil? (Obviously with a diode capable of handling the job.)

Please note, my question is about the flyback diode config. Not about MCU current capability or power supply, etc.

\$\endgroup\$
  • \$\begingroup\$ Thank you, noted. \$\endgroup\$ – Paul Ferreira May 20 at 19:13
  • \$\begingroup\$ Only 1. works. Strong suggestion: Upvote the accepted answer :-) \$\endgroup\$ – Russell McMahon May 20 at 20:54
2
\$\begingroup\$

The second option doesn't allow the diode to conduct unless the +5 V supply rail is pulled below ground. It would be a rare application where this wouldn't cause problems for some other device connected to the rail, or for the power supply circuit itself.

What would actually happen here is the diode you provided would have no effect, and the inductor current would flow through ESD protection diodes in the MCU when you try to shut off the coil current.

Therefore option A is almost surely preferred.

\$\endgroup\$
  • \$\begingroup\$ Thank you. It is what I thought. \$\endgroup\$ – Paul Ferreira May 20 at 19:12
0
\$\begingroup\$

The diode in option B does absolutely nothing under any normal operating conditions, so the two are not equivalent.

A typical MCU output is push-pull (which means it will conduct in reverse to the positive rail) and effectively has a diode to Vcc in addition as part of the protection network and parasitic structures, so one could argue that the external diode is redundant, however I would not recommend going this route as there are subtle issues that could arise, perhaps causing unexpected failure modes. In fact, if you were to drive such an inductive load from an MCU output, I would suggest only using Shottky diodes such as the BAT54 dual in order to shunt almost all of the current through the external diode (Schottky diodes have a lower Vf).

\$\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.