1
\$\begingroup\$

I'm new to the world of circuits. I have only a basic level of understanding. I know how to use resistors, know the difference between NPN and PNP transistors, and understand the one-way flow control offered by a diode.

But I don't understand why a diode has been introduced into the circuit (and many similar diagrams I've seen) when using a transistor to switch a DC motor on and off when it runs at a higher voltage than the controlling source (ie. an Audrino or PC).

Here's an example from Adafruit:

enter image description here

I recognize that the 5v source current powering the motor would not short to ground because of the orientation of the diode. But I don't see why you would do that rather than just have the 5v run directly (and only) to the motor.

Is there something about the rotating nature of the DC motor that causes reverse current or something, and the diode is there to protect the audrino?

Appreciate any help offered. Thanks.

\$\endgroup\$
3
  • 5
    \$\begingroup\$ This question has been asked SO MANY TIMES. It's because the motor is an inductor and sudden changes in current can cause flyback (high voltages) which is dangerous. The diode also known as the flyback diode which you can search on Wikipedia eliminates that effect. \$\endgroup\$
    – Bradman175
    Commented Jan 6, 2017 at 13:31
  • \$\begingroup\$ @Bradman175 I'm not surprised at all that this has been asked SO MANY TIMES, yet when I did the search through the site (and looked through all the suggested related posts while typing in my question topic) I failed to find something that obviously answered my question. Since I didn't know it was called a flyback diode, it made it a bit harder to find what I was looking for. \$\endgroup\$ Commented Jan 6, 2017 at 14:23
  • 1
    \$\begingroup\$ @MichaelOryl The StackExchange search isn't that great. Next time you want to search for related questions, I suggest you use google with this query: site:http://electronics.stackexchange.com/questions [your question here] \$\endgroup\$
    – m.Alin
    Commented Jan 6, 2017 at 15:03

2 Answers 2

2
\$\begingroup\$

See The flyback diode and its applications

Is there something about the rotating nature of the DC motor that causes reverse current or something, and the diode is there to protect the arduino?

Essentially yes, but due to the coil nature of the motor. The same property applies to solenoids such as relay coils. Because it's a coil, it has a high inductance. Inductance limits the rate of change of current flow. The diode allows the current to flow in a loop through the diode rather than trying to force it through a nonconducting transistor.

\$\endgroup\$
0
\$\begingroup\$

In simple terms: -

  • A capacitor "stores" voltage and if you shorted it out you will get a spark and a pulse of high current flowing into the short.
  • An inductor "stores" current and if you open circuited it you will get a spark and a pulse of high voltage.

That high voltage is not limited by the supply voltage of the circuit.

A motor is basically an energy converter that takes electrical energy and converts it to mechanical energy but, it's not 100% perfect and the coils in the motor will still store some energy that is never given to the rotor as mechanical power. This means it behaves like an inductor.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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