In a circuit I'm making I will be using an Arduino to switch a solenoid using a transistor(TIP120). I know I need a flyback diode as shown in basically every example.
My question is, is there a limit on how close/far away the diode is from the solenoid? I want to place it on the circuit board and then have the solenoid on the end of 2 wires maybe 50cm long at most. Will this pose any problems?


2 Answers 2


In general, you want the flyback diode as physically close to the inductor it is catching the current from as possible. Long leads mean inductance, which slows how fast the current can build up in the diode, which makes large voltages at the solenoid.

If the only thing that is at the end of the long wire is the solenoid with the diode and driving circuitry at the other, then the diode will still protect the driving circuitry well enough. However, the possibly high voltage transients at the solenoid end of the wire can cause radio interference, and in extreme cases arcing.

With long wire to the solenoid, I'd want two diodes. One at the solenoid to limit voltages on the wire, and another close to the driving circuit to protect it. The inductance in the long wire can cause kickback too.

  • 1
    \$\begingroup\$ I didn't even think of there being inductance in the wires. Thanks. \$\endgroup\$
    – Session
    Jul 14, 2013 at 15:28
  • \$\begingroup\$ I'm not sure that a solenoid at the end of a long wire is any different than a slightly larger solenoid at the end of a short wire. The current is already flowing in the long wire. The inductance it adds is not relevant. What needs to be minimized is the inductance added when this current path switches to go through the diode; this is the inductance that will limit the effectiveness of the diode. \$\endgroup\$
    – Phil Frost
    Jul 14, 2013 at 18:09
  • \$\begingroup\$ @Phil: A diode at the board is enough to protect the circuit, but that could still leave large voltage transients on part of the wire, which could be a radiation problem. \$\endgroup\$ Jul 14, 2013 at 19:05

At least, twist those wires to minimize the inductance of the loop. If that is a problem or not depends on how much margin of voltage you have between the expected peaks and your switching transistor (TIP120 -- 60V). The expected switching peaks depend on the inductance, current, switch off characteristics and rest of the circuit.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.