Electronic – What role does this diode play

basicdiodesmotortransistors

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

Best Answer

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.