Go Down

Topic: L298n, Do I need flyback diodes? (Read 2748 times) previous topic - next topic


So I am driving 2 motors at 14v (under 250ma probably) Also they are driving worm gears so the motor does not continue to spin if voltage is removed.  I have been having some problems with my arduino freezing sometimes (could be other parts of my system) and am wondering if this could be the problem.

Any help would be appreciated.  If I need flyback diodes, how do I know which ones and how do I wire them?


yes you do since ln298 dont have internal flyback diode


I would think that the motors are indeed the cause. Not because of any generated electricity caused by 'winding down', but rather from back-EMF.

This happens whenever the electrical load carried by ANY coil of wire suddenly drops. As the magnetic field around the coil relaxes, it generates a high-voltage pulse in the opposite polarity.

If your motors are only used in one direction then you just need a diode to short out the reverse-polarity high-voltage spikes.
ie. Wire up a diode in parallel with each motor but in reverse polarity. That way the diode does nothing during the motor's power-on state, but catches any reversed current leaking back out (and into your Arduino) whenever the motor's power cuts-off.

If you need to run the motors in both directions then you could use two zener diodes rated for a voltage just higher than the motor voltage. The diodes would be wired in opposing directions (tip to tip), then the pair would be wired in parallel with the motor leads. A pair of such diodes per motor.

Rule of thumb: fly-back diodes need to have at least 1/100th amperage capacity of the motor's supply current. Ideally 1/10th capacity for bullet-proof usage.

Go Up