Question about inductive spike / flyback diode

Hey guys,

I'm trying to wrap my head around how my circuit will behave with a certain layout but I'm stuck.

Let's say I have a 12V motor, and 2 12V LED bulbs I want to control with rudimentary PWM. They are connected to a 10' long cable with four conductors. One of the conductors is 12V. The other three terminate at my Arduino, where I have three NFETs to pull them to ground when I want to turn the device on.

Now, I need a flyback diode for that motor. And I'd like to put it at the Arduino end of the cable.

The problem is, I'm not sure what's going to happen to that 12V line when I shut the motor off.

If I had the diode at the motor, then when I shut off the motor and the magnetic field collapses, the + and - on the motor flip, and the current flows through the diode and back into the motor until the motor's resistance dissipates the power. There's still 12V connected to one side of the diode, but the current doesn't seem to care about this and still flows through the diode.

I think what's happening here is that to the motor and diode, 12V has become the new ground, and the other side of the diode is at such a high voltage that the potential difference allows current to flow through it. So I think that nothing else on he 12V line will see the voltage dip.

Anyway, to get right down to it, what I'm trying to figure out is if my two bulbs will shut off momentarily every time I turn off my motor if I have that diode all the way at the other end of a 10' cable.

I don't think they will, but I can't be sure.

Another thing I can't be sure of is that they won't see a high voltage reverse spike. Like, when the motor flips, if it can't pull 0V up because of the long wire and its inductance then maybe it will pull the 12V line to -24V or something and blow the LEDs which aren't rated for that kind of reverse voltage?

Anyway, I'm sure half of what I just said is crazy, but I'm hoping someone can explain how this thing would behave. :slight_smile:

When this happens, you say "the 12V voltage will dip", relative to what ?

You have no ground in this cable, remember ?

Firstly, you should not disregard the impedance of the actual cable.

Secondly, if you consider the effect of the motor, when the current is interrupted, the voltage at the -ve terminal of the motor will rise. This will be an issue for the possible breakdown voltage of your transistor, but not for the LED's which are not connected to it.

If I have a flyback diode between the motor and transistor though (across the motors terminals essentially), the transistor shouldn't see a high voltage, should it? There'll be an easy path through the diode, which should keep the voltage from rising too high.

I'm guessing it would have to rise to the diode's forward voltage plus 12V? Since 12V is the new ground for the motor and diode... So the mosfet would see like 12.7V on the drain?

I have to assume that isn't too much, I mean the only thing I'm doing different here from normal is that the motor is at the end of a long lead, and there's an LED bulb connected to that 12V line doing its own thing. But I'll have to find the datasheet for the FETs I was going to use and see what they say.

What happens when you switch off the FET is that the current keeps flowing because
the motor is inductive and its like the electrons have momentum and keep moving. They
find alternative route through the diode as the current dissipates due to losses. Because
its the current controlling the situation the voltage just goes to whatever value is needed
to maintain the current flow (in the short term). Without the diode it could be 100's or
1000's of volts and highly destructive.

Yes, I aware of that. My question wasn't what would happen if I didn't have a diode. It was what would happen if the diode were at the opposite end of a long cable, and the +12V line at the other end of that long cable were also feeding an LED bulb.

My more recent question about the mosfet was because mich said:

when the current is interrupted, the voltage at the -ve terminal of the motor will rise. This will be an issue for the possible breakdown voltage of your transistor

I assumed he meant that would happen regardless of whether I had the diode or not because I said I was aware of the need for a diode and would be putting a diode there.

The thing I was confused about is if anything bad would happen if I put the LED's + side AFTER the flyback diode, on the same side as the motor, (but with it's own seperate ground) would be.

Anyway, this is the transistor I was considering using for this application:

If you have your controlling transistor and your "flyback diode" at one end of the cable, and your motor and your LED at the other end of the cable, and you completely ignore the impedance of the cable, then this is what I think will happen:

When you switch your transistor to its high impedance state ( off ), The current has nowhere to go and would stop, abruptly. The inductance would cause a voltage to appear the the low side of the motor which is higher than the input side, which is still connected to your 12 V. The extent of this potential voltage spike is going to be proportion to the rate at which the current is interrupted di/dt

With the diode there, as soon as this voltage at the -ve terminal of the voltage reaches 0.6V above the +ve side ( or whatever your diode forward voltage is ), the diode will conduct, which enables the current in the motor to flow in a loop through the diode, which reduces the magnitude of the di/dt, which reduces the inductance voltage. While this loop current is flowing, there is no current in the supply line and no current in the transistor. The loop current starts out at whatever the load current was, and declines from that level. Contrary to popular belief, it isn't actually a surge of current.

If you move the diode away from the proximity of the motor and locate it at the other end of your cable, where the transistor is, the same thing will happen. The difference now is that this loop current is flowing through motor, then the cable back to your diode, and then through your diode, and then back along the 12V line to your motor.

The resistance and inductance of the cable are going to change the performance of the diode circuit, somewhat.

However, if your motor load current was originally say 1 amp, this loop current is going to start at 1 amp and then decline from there, it is going to be no more onerous than your load current was.

If you analyse the circuit from the motor end, the voltage at the motor end is going to have to rise somewhat higher , taking into account the cable resistance, in order to create sufficient voltage across the diode to make the diode conduct. If you have sensibly sized cables, so that the voltage drop in the cable caused by the cable resistance at full load current is no more than say 0.5 V each way coming and going, then the voltage at the negative terminal of the motor is going to have to rise somewhat higher in order to force the diode to conduct. How high ? Well if you assume that you have 12 V at the supply end, and then 11.5 V at the motor positive terminal, then you need 12.6 V at the anode of the diode, and you need 13.1 Volts at the negative motor terminal in order to present that voltage drop to the diode at the other end of the cable.

In effect, a bigger inductance related potential will need to be created in the motor in order to force the remote diode to conduct. This will result in a bigger initial negative di/dt to create that voltage.

The difference is small. Your transistor is not going to fail if it has a voltage of 12.6V instead of 11.5 V applied to it when it is turned off.

The energy of the loop current is going to be dissipated by the resistance of the circuit it is flowing through. Moving the diode to the other end of the cable increases the resistance which is going to increase the dissipation.

It is not going to make any difference to the LED voltage, either.

The current going through the diode might be large. It's almost certainly going to have a spike that's larger than the current you were using to drive the motor.

This will induce currents in other wires nearby, like a transformer causes current to flow in the secondary winding when there is a change in current in the primary winding. The other wires in the cable will see a spike of noise.

This is unlikely to noticeably affect an LED but if you were trying to use those wires to measure something, like counting encoder pulses, then you will have problems.