Shop OBEX P1 Docs P2 Docs Learn Events
How is diode working for motor flyback? — Parallax Forums

How is diode working for motor flyback?

John KauffmanJohn Kauffman Posts: 653
edited 2013-07-08 15:34 in General Discussion
I'm running a simple small DC motor from BS2. All works fine: pin to 470 to 2N2222 transistor that controls black lead of motor.

To prevent flyback current I have a little diode across(in parallel to) motor leads with black band towards motor red (5v) lead as described in various schematics.

But I don't understand how the diode works in parallel to the motor leads. But it seems in series would be the logical way so current can flow through diode to the motor but can't flow back through diode into circuit. I'm trying to trace the current through/around the diode when motor is running and when it is not.

Can anyone explain the idea or even just trace the current through components when powered and when coasting?

Comments

  • ercoerco Posts: 20,256
    edited 2013-07-05 11:28
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-07-05 11:43
    It is all about voltage... way too high a voltage.

    Your logic is either 3.3volt max for a Propeller, or 5volt max for a BasicStamp.

    But the relay coil or a motor coil can drive a much higher spike of voltage when power is shut down....
    It is only a temporary spike, but it will fry your output or your transistor.

    Even if it doesn't actually fry something, it might upset your microcontroller to the point where it resets...
  • John KauffmanJohn Kauffman Posts: 653
    edited 2013-07-05 12:26
    Thanks guys. I should have tried wiki first. I'm going to try duplicating the o'scope demo.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-07-06 00:56
    Try exploring the following ideas.

    Capacitors have a problem of in-rush current.
    Large power supply filter caps will blow fuses and circuit breakers when first charging... unless limited by some series current limiting device.

    Coils have a problem of out-rush voltage.
    Big coils has the sudden collapse of a magnetic field that pushes a high voltage out of the coil that is suddenly shut off...
    unless it is dissipated by some parallel voltage clamping device.

    ^^^^^^^^^^^^^
    So this is all about bigger capacitors and bigger coils needing to behave well in on/off situations.
  • GenetixGenetix Posts: 1,754
    edited 2013-07-07 13:57
    Loopy mentioned some of this but a motor has a large coil inside and coils will resist any change in the voltage applied to them. Changing the voltage in a coil causes what is called Back EMF (Kick-back voltage) and if you recall a diode only conducts in one direction. By placing the diode in reverse it will absorb any kick-back voltage that is generated so that is why they refer to these as kick-back diodes.
    You also need kick-back diodes when using relays or anything else that contains a coil in it.
    If you look in Industrial Control and Process Control kick-back diodes are not used since the fan both use is low power. Also, in Applied Sensors there is no kick-back diode between the transistor and the pump although there is a resistor there. Experiments with Renewable Energy does use a kick-back diode.

    With proper heatsinking, the BS170 can handle load currents up to 5 amps. These features make the power MOSFET very easy to apply in industrial applications such as driving relays, solenoids and small DC motors. It should be noted that these types of loads are inductive. When switching off the load, this inductance can produce a reverse voltage transient that may be damaging to the MOSFET. The diode D1 provides protection for the transistor when driving inductive loads such as these. This diode is not necessary for the small brushless motor used in our experiments.
    (Industrial Control 1.1d - Page 87)
    It should be noted that these types of loads are inductive. When switching off the load, this inductance can produce a reverse voltage transient that may be damaging to MOSFETs and BJTs. A diode is often used to provide protection for the transistor whendriving inductive loads such as these. However, a diode is not necessary for the small brushless motor used in our experiments.
    (Process Control 1.0 - Page 139)
    The diode in this circuit is functioning as a “flyback diode”, and its purpose is to protect the transistor from a wash of back-EMF when the fan motor stops or reverses direction during our discharge cycle.
    (Experiments with Renewable Energy 1.0 - Page 55, Schematic - Page 52)

    Brian
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-07-08 00:44
    Well, the 'kick-back voltage' might be better termed a 'fly-back voltage'.

    The coil does NOT resist a change in voltage when the voltage is removed, it just immediately collapses the magnetic field and that collapse creates a substantial fly-back voltage.

    Fly-back voltage is at its worse with digital control were square waves are suddenly shutting the coil off.

    Inductive loads are everywhere, but they are the biggest switching problems. For instance, a mechanical relay that is rated at 10 amps for switching at 240VAC is often derated by 80% to 2 amps so that the relay contacts will not prematurely fail. And many solid-state relays cannot handle the fly-back from inductive loads with good protection.

    There are special protection diodes for AC. These are back-to-back zeners that handle spikes in both directions about a certain voltage. And this might be useful in H-bridge motor configurations.
  • Mark_TMark_T Posts: 1,981
    edited 2013-07-08 15:34
    Genetix wrote: »
    Loopy mentioned some of this but a motor has a large coil inside and coils will resist any change in the voltage applied to them. Changing the voltage in a coil causes what is called Back EMF (Kick-back voltage) and if you recall a diode only conducts in one direction. By placing the diode in reverse it will absorb any kick-back voltage that is generated so that is why they refer to these as kick-back diodes.
    You also need kick-back diodes when using relays or anything else that contains a coil in it.

    Inductors don't resist change in voltage at all - quite the opposite, they resist change in current. The flyback diode (sometimes and more logically
    called a free-wheeling diode) is there to allow the current to continue round the coil when the switch opens, so that it dissipates slowly with only
    1 diode's drop of voltage being generated.

    More particularly the faster the current changes the higher the voltage across the inductor terminals - which is why trying to switch the current off suddenly produces
    such massive voltage spikes (kV). At turn-on there isn't a problem, the voltage equals the supply voltage and the current rises until all the voltage is taken up in the resistance
    of the winding (by which time the "inductance" no longer sees any voltage, as it were, so the current doesn't change).

    A perfect inductor with no resistance (a superconducting coil) will exhibit a uniformly rising current when a voltage is applied across its terminals (eventually
    the increasing magnetic field will overwhelm the superconductor's ability to superconduct though).

    If you like the water-flow analogy to electrical current then inductance is like the mass of the water in a long pipe. Shut the valve too fast and the momentum will
    slam the water into the valve and generate large pressures (water-hammer) - exactly like the switching off of a current in an inductor.

    If you like differential equations then you can express most of the above as just V dt = L dI
Sign In or Register to comment.