Using flyback diodes to protect ICs from back EMF from stepper motor - Page 1
Forum section: electronics / beginners

author: newtekuser
author_rank: Frequent Contributor
timestamp: April 18, 2023, 03:55:30 am
content: Is this the correct way to add protection against back EMF from a stepper motor? I'd like to protect the ULN darlington array from the effects of back EMF when the coils are de-energized.

author: sparkydog
author_rank: Regular Contributor
timestamp: April 18, 2023, 02:47:11 pm
content: Um. I amfarfrom expert (actually, in this case it's probably safe to say I'm clueless), but I'm familiar withrelay coilback-voltage. In that case, the diode would be placed directly across the relay coil, in the opposite direction as usual current flow.When an inductor is charged, the side that's receiving positive current becomes "positively charged", and the negative side "negatively charged". When the current goes away suddenly, the charge on the inductor doesn't, and wants to expend itself somehow. If there isn't a path for current, the voltage from the inductor will rise until thereisa path... through air, if necessary. Per the above description, this voltage spike is going to be trying to push current in the opposite direction that it was flowing previously.A diode across the inductor, opposite the usual direction of current, provides a low-resistance path for this current. From the perspective of your circuit, such a "flyback" diode means you can pretty much pretend that the reverse voltage spike doesn't exist. (Note: the diode should be connected as close, physically, to the inductor as possible.) The down side of a flyback diode, especially used with relays, is that it keeps current flowing longer, which increases the time it takes for the magnetic field to collapse. For something like a lifting/holding electromagnet or actuator, that might be a feature. For a relay, slow coil opening increases the chances of contact bounce and contact arcing.For relays, the best approach is actually to do nothing, but failing that a Z+D combination or TVS diode (they're essentially the same thing, but TVS diodes are a single component and you can them in convenient bidirectional form-factor) will allow the voltage to rise to the diode's breakdown voltage before conducting, which allows the field to collapse faster. You need to select one with a lower clamping voltage than your upstream components can withstand. Alternatively, Ithinkyou can slap in some additional diodes to stop the back-voltage, in which case the TVS just needs to protect those diodes (which will usually have a very high breakdown voltage).What does this mean for steppers? Well, I don't really know, but it means you probably should consider the effect of suppression on the stepper as well as the controlling circuitry. As to the schematic you showed, I can't say I've seen Schottky diodes used to protect against inductor reverse-voltage spikes, nor do the diodes seem to be positioned where I would expect them to do any good. (The configuration you showmightbe relevant to protecting the board against an idiot connecting the power supply backwards.) That said, I'm a total n00b, so take everything I say with a large grain of salt.

author: Ian.M
author_rank: Super Contributor
timestamp: April 18, 2023, 03:13:41 pm
content: Absolutely pointless - ULN series Darlington transistor arrays already contain an internal clamping diode for each output, with all the cathodes connected together and brought out to the common pin. Provided Common is connected to the positive side of the loads, when any of the output transistors switch off, the current through the load inductance can continue to flow via the associated clamping diode, till it decays naturally, effectively suppressing the back-EMF. *IF* you want a faster turnoff, subject to the limitations of the ULN array's maximum Vce, you can insert a Zener between the Common pin and the load supply, cathode to Common, or a resistor (but beware of the extra voltage if multiple outputs switch off simultaneously) or a carefully chosen parallel RC snubber network, to optimise the rate of current decay vs the peak back-EMF you are willing to tolerate.