I've just bought an Arduino Uno kit, and am going through all the projects in the booklet that comes with the kit. From even the simplest LED and resistor circuit, to get a feel for the Arduino board, breadboarding, and to dust off my electronics knowledge that's been unused for some 30 years. It needs dusting off.

One of the circuits is simply to demo power switching using a motor and a NPN transistor. I understand every aspect of this most basic of cuicuits except for the function of a diode, that as far as I can tell, plays no role in the circuit's operation. It is surely there for a reason, so my question is: what is that reason?

enter image description here

  • \$\begingroup\$ FYI, it's a NPN transistor. \$\endgroup\$ – immibis Nov 24 '18 at 22:35
  • \$\begingroup\$ @immibis Thanks, I knew that, but my typing about electronics seems as rusty as my knowledge of it. \$\endgroup\$ – ProfK Nov 25 '18 at 5:43

This diode is to surpress any back-EMF caused when the motor is switched off. In general, when one has an inductive load such as a motor, or an electromagnet's solenoid, when you switch it on, there will be an initial drop in current, as some of the current will act to form a magnetic field around the coil. Inversely, when switching off, this magnetic field that has been created needs to dissipate. When there is no back-EMF diode in place, the path would be through the BJT, which would almost certainly damage it, or perhaps other components depending on the circuit.

As for the polarity of the diode itself, when passing current through one way, you generate a field in that respective direction. When you stop the source, that field collapses back to its "rest" position, which means the current will flow the other way momentarily.

All reactive (capacitive and inductive) loads have this kind of "storage" characteristic which needs to be accounted for in design, resistive loads are the exception. If you want to know more about the governing equations and such, wikipedia is a good place to start, or for a good read, try "The Art of Electronics", Horowitz and Hill, 3rd edition.

  • 1
    \$\begingroup\$ Capacitors do not produce the destructive High Voltage kickback. \$\endgroup\$ – analogsystemsrf Nov 24 '18 at 19:16
  • 5
    \$\begingroup\$ Capacitors can produce inrush current which I suppose is the dual of inductive kickback. \$\endgroup\$ – immibis Nov 24 '18 at 22:36
  • 1
    \$\begingroup\$ @analogsystemsrf hell ya they do,. A large capacitor acting as an Input Filter on an Ac to DC converter will create a current of up to 100 times the maximum rated circuit current as the Capacitor charges instantly since I=C(dV/dT) and dT approaches 0 at turn on. dV will be largest when the AC Mains Voltage at 90-degrees. Inrush current from the self-inductance of the transformer on an AC/DC Converter is at the 0 crossing as the change in magnetic flux is largest as the Current waveform is at 0 \$\endgroup\$ – Danny Sebahar Nov 25 '18 at 11:39
  • \$\begingroup\$ this is why I say all reactive components... although, thinking about it further, there can be other dynamics in play which complicate things, especially in electromechanical systems such as this. Suppose a flywheel is attached to the motors axle. The initial inrush current will not be higher to account for the change in inertia, and there will be a period after switching where the motor acts as a generator, which assuming the standard brushed DC motor will produce something similar to rectified AC output. \$\endgroup\$ – Thefoilist Nov 25 '18 at 12:11

The motor is an INDUCTIVE LOAD.

Due to Faraday's Law of Induction stating that a time varying/changing current creates a magnetic field with a magnitude directly proportional to the change in the current through the conductor over time and ( as much symmetry exists in physics) a changing magnetic field creates an electric field (a voltage difference) surrounding the conductor that manifests as an opposition to the change in current that created the magnetic field. This is due to Lenz's Law which complete Faraday's Formula for electromagnetic Induction where an electro-motive-force is created equal to the rate of change in the magnetic field over time (which was cause by the change in the flow of current.

Faraday's Law: back-EMF = (-1)dB/dtN where back-EMF is the voltage potential opposite the current flow creating the resistance to change, "-1" is Lenz's Law, "dB" is the change in magnetic flux, and "dT" is the time period over which the change is is measured, and N is how many coils of wire are within the changing electric field.

Your motor is inductive due to the many coils of wire. When it starts up it slowly gains speed instead of instantly being at top speed because of Lenz's law making the back-EMF resist the change in current flow until the current flow is no longer changing and at its maximum. There is now energy stored in the corresponding magnetic field. When you turn off the motor it will still spin and now instead of consuming power it is generating power. The original back EMF flowed toward the supply but now as the motor slows down the inductance will resist the change in current and will force a current to flow forward and into the transistors collector.

Since current is the flow of electrons the electrons must come from somewhere. Your transistor connects the motor to GROUND where it was sourcing electrons initially. The electrons "moved" by the electro-motive force induced by the collapsing magnetic field would bunch up at the transistor collector without the diode and would have to be sourced from your Power Supply which wont like that. With a diode giving a return path for that EMF it will dissipate through the diode and motor after a couple loops through it.

So, the fly back diode allows a path for the electrons to flow around the motor and not into the power supply or the transistor (causing potential damage), created by self induction in the motors windings when turned off and caused by the sudden change in current to zero.

  • 2
    \$\begingroup\$ The changing field doesn't create electrons. It causes the existing electrons to move. \$\endgroup\$ – JRE Nov 24 '18 at 15:15
  • \$\begingroup\$ @JRE Did you edit the post, I don't know why I would have said that Faraday's Law of Induction "creates" electrons. It does creat and electrics field which is difference in voltage potential between to points and if those two points lie on a continuous path of conductive material then a current is formed. But ya, Electrons are never created or destroyed due to conservation of energy (I know that electrons can be, for very small amounts of time, turned into its subatomic constituents in a particle accelerator or super nova, so I mean electrons follow the conservation of energy with an asterisk \$\endgroup\$ – Danny Sebahar Nov 25 '18 at 9:16
  • \$\begingroup\$ I edit it, but didn't change the part about electrons being created. I noticed it while editing. You can view the changes, and you will see that I didn't change that. I changed capitalization and some apostrphes. \$\endgroup\$ – JRE Nov 25 '18 at 9:38

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.