Where to position flyback diode

Can anyone tell me where to physically position my flyback diodes?

I have a Uno that controls two 12v 5.5W Pull type solenoids.
The Uno, and associated electrical equipment, are all in a control box, which is about 500mm away from the two solenoids.
I am using two TIP41X transistors to control 12V feed to the solenoids. The transistors are on a small daughter board next to the Uno

Can I put the flyback diodes on the daughter board in the control box, or should they be close to the solenoids? It would be neater and easier for me if they went on the daughter board.

Thanks

Steve

Across the solenoid coil would be best. Dissipates the coil generated current across the coil, vs letting it create a voltage spike at the transistor.

Thanks Crossroads. That's made up my mind for me.

I was kind of hoping to put them near the transistors, but everything was telling me it was a bad idea.

Steve

If you need the solenoids to "release" quickly there are alternatives to just a diode that will allow the solenoid to react to the OFF state more quickly.

Hi JR

The solenoids are controlling two oilers on a lathe. They control the drips of oil to some bearings, so a fast cut off time is not essential in this application. But I am intrigued. Can you explain a bit more, or point me at somewhere on the internet? Thanks

Steve

Putting them at the transistor is OK but be sure the cathode connects to the solenoid + supply. Whatever works best for you is OK. Circuit wise it is the same. There are a lot of circuits with the current recirculation diode at the driver rather then the inductive load. The current recirculation diode conducts when the magnetic field of the solenoid collapses. Remember the polarity of the voltage on the solenoid reverses when the field collapses. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

Putting them at the transistor is OK . . .

If the cable connecting the driver and inductive load is short this will work.

However if the cable is long, place the diode at the load as there can be noise induced in adjacent wiring.

Besides, the load is usually a convenient is place to put the diode.

larryd:
If the cable connecting the driver and inductive load is short this will work.

When the cable to the load is long it will have its own inductance. When you connect the diode at the transistor the diode will protect the transistor from both wiring and solenoid inductance. OTOH connecting the diode at the solenoid will let the wiring inductance cause a voltage spike at the transistor. I don't see a reason why connecting at the solenoid should be better. Am I missing something?

Let's assume our transistor is driving an inductor 20 feet away.

Let's assume you have communication and other cables in the same cable tray laying next to our cable above.

Maximum energy is stored in the inductor when when inductor current is at maximum.

In the case where the diode is placed at the transistor, let's remember our 20' cable has a component of both resistance and inductance. When the transistor turns off, there will still be a spike of voltage at the load. This spike degrades as we approach the driver where the diode sits across the transistor.

This spike at the load (much smaller than when a diode is not used) often results in noise in nearby parallel cabling running in the same cable tay.

Placing the diode at the far end of our 20' cable, where the inductor has stored maximum energy, prevents aforementioned issues.

I have diagnosed this phenomena far too many times in the past. The solution was to move the snubbing diode to the load's location.

If the diode is at the transistor the spike should be equal to the voltage drop over the wiring (+ forward voltage drop on the diode). If there is small voltage drop over the wires (they are thick enough) there will be little noise from the wires. Is it right?

If cable resistance and inductance would have been nil, the past observed problems would probably not have been seen. (i.e. in those situations where the diode is at the driver 20 feet away)

Assume better cable selection, for long runs, will reduce the effect. But, the extra cost would be prohibitive; better just place the diode at the load. :wink:

The solution I see in practice, basically universally, is with a the flyback diode soldered between the terminals of the coil. Usually coils have two fairly big terminals that you solder the power to, so it's easy to also put a diode between them.

In my designs I normally place a diode on the PCB, i.e. near the MOSFET switching the load, if I know that this output is going to (or may be used to) switch an inductive load. Usually I'll also solder a diode right at the load itself. Even with short leads (0.5-1m or less).

One of the two will not do much, but considering the negligible cost of diodes I don't mind.

Without diode at the load (only the one at the PCB itself) I have seen sparks fly when unplugging the load from the main board while it was engaged. That's never a good thing to see happening. The second diode solved that problem.

wvmarle:
In my designs I normally place a diode on the PCB, i.e. near the MOSFET switching the load, if I know that this output is going to (or may be used to) switch an inductive load. Usually I'll also solder a diode right at the load itself. Even with short leads (0.5-1m or less).

I like that idea!

From an EMI standpoint the diode should be right at the coil. And the loop made up of the coil/diode, wires, Mosfet and power source should be the least amount of area possible. Secondary it should be as small as possible (i.e. short wires even if parallel or twisted).

Wawa:
What else could generate that high voltage.

It sounds simple to say the inductor "generates" the voltage and of course it does, but I deliberately referred to an "impulse".

Wawa:
The impulse is of course generated after the transistor switch turns off,

No, it is not generated after the transistor switch turns off, it is generated as the switch turns off. The inductor is in the short term, a constant-current source. Unless otherwise constrained, it will produce whatever voltage is required to keep that current flowing. So you have a circuit consisting of a switch and a constant current source in an "open-collector" arrangement. As the switch opens, the voltage rises. It makes no difference whether it is "open-collector" or "totem pole" driving, the switch is the source of the impulse and the critical concept is that - it radiates from there.

Wawa:
but kickback current flows through the inductor.

Here is the point of the common confused thinking. There is no such thing as "kickback current"! :cold_sweat:

The inductor has a current flowing through it. When the switch opens, the current in the inductor and the wires that connect the inductor to the rest of the circuit instantaneously stays the same. That is the whole point of an inductor - to resist any change in current.

OK, so what does change? Where is there a current impulse?

Well, the diode of course! Before the switch off, a current was flowing through the (power supply and) the switch (transistor). After the switch off, the same current is now flowing through the diode.

So what current has changed? Where is there a current impulse?

It is in the switch circuit, including the power supply itself, and the diode. Current in the switch goes (suddenly) down, current in the diode goes (suddenly) up by the exact same amount. Current in the inductor and the wires that connect the inductor to the rest of the circuit instantaneously stays exactly the same. Then of course, the current in the inductor (and diode) smoothly decays - not as much of an impulse by any means. So the wiring to the inductor does not generate an impulse (or a sudden change in magnetic field) between the inductor and the diode.

Wawa:
The shortest current path is when the diode is connected directly to the inductor.

Following from the above, if however you connect the diode directly across the inductor, the actual current impulse occurs in the wires that run beteen this and the switch, and it is this part therefore that radiates interference. Not only that, but this also involves the wiring to the power supply itself, so any other devices that connect along this path will also be subject to the impulse.

Wawa:
Any wire in between will act as an aerial and could transmit the spike to other circuits.

Yes, the wires between the diode and the switch, not the wires between the diode and the inductor! :sunglasses:

What about the voltage "spike"? Well, that appears on the switched line all the way between the switch and the inductor, including the diode terminal irrespective of where the diode is located. It clearly is important that the two wires to any part of the circuit be bundled together as a pair, to minimise capacitive (electrostatic) radiation but much more importantly, to avoid electromagnetic radiation from "loops" in the wiring.

MarkT:
If the inductor carries a large current

Not strictly a factor

MarkT:
placing a diode at the switch and at the inductor is a wise precaution, as the stray inductance / characteristic impedance of the cable may generate large voltages anyway.

No, putting a second diode at the inductor is again, irrelevant! :astonished:

In fact, inductance in the cable will add to the voltage at the switch, as the switching impulse travels from the switch to the inductor, so the diode placed there will be first to conduct, and the diode at the inductor will not be needed as it is simply ineffectual!

In summary, note that the transfer of current is from the power supply and switch, to the diode. To properly suppress the impulse, the triangle of three components which are involved must be located as closely as possible with short wires between: the switching device, itself the diode and the local bypass capacitor across the power supply. The latter is needed to prevent the current impulse travelling back along the wires to the power supply itself

The solenoids are controlling two oilers on a lathe. They control the drips of oil to some bearings, so a fast cut off time is not essential in this application. But I am intrigued. Can you explain a bit more, or point me at somewhere on the internet? Thanks

Of course....

I looked on the internet and could not find an explanation I think is suitable. So...

  • Relay and solenoid coils are basically inductors.

  • Inductors store energy in the form of a magnetic field. It is this magnetic field that actuates the relay or solenoid. The energy in a coil is proportional to the current through the coil. More current more energy and vice versa.

  • When the circuit is opened by a switch or transistor, the current cannot stop until all the magnetic energy is dissipated.

  • The energy stored in the inductor is ..... energy = volts * amps * time.

  • The maximum current the inductor can generate to dissipate this energy is what was in the coil when it was ON.

Now with a diode across the coil, when the coil is trying to dissipate the energy the voltage cannot go above 0.7V because the forward drop of a diode is approx 0.7V

Here I will make up numbers (also ignoring units etc)

energy = 10
amps = 2

With one diode across the coil, from the above equation; 10 = 0.7 * 2 * time. so time to dissipate the energy is = 7.14 "seconds"

Now for the same situation, if you put 8 diodes in series across the coil:

10 = (8*0.7) * 2 * time. so time to dissipate energy = 1.78 "seconds"

So you can see, the faster you get rid of the energy the faster the relay, solenoid etc will respond as the current drops more quickly.

BTW there are app notes from relay mfg showing the slowing of the turn off of a relay can adversely effect the life.

Hope this helps.

John

the flyback diode is connectes parallel to the inductive load