Well, they say the only dumb question is the one you don't ask. I suppose that's especially true if it results in release of magic smoke...
I know inductive devices like motors and relays need a fly-back diode to protect the switching silicon. I know that a fly-back diode is back-to-front across the coil.
But my question is, does it matter where the diode goes physically?- does it have to be at the motor end literally across the terminals, or can it be at the other end of the wires which connect the motor to say a breadboard.
(Reason I'm asking is that I know de-coupling capacitors need to go right next to the chip they are connected to; so I'm wondering if the diode has a similar requirement?)
so I'm wondering if the diode has a similar requirement?
Yes, with the understanding that such "requirement" isn't absolute.
The purpose of the fly-back diode is to allow the current a path when the switch is turned off. As such, it sees sudden changes in current. Because of that, any inductance, parasitic or otherwise, from the load to the diode would have a deadly effect in generating a huge voltage on across the switch, defeating the purpose of having a fly-back diode.
So it is generally desirable to have the diode closer to the load as possible.
In cases where the inductance from the load to the diode is low, you can put the diode on the pcb.
The purpose of the flyback diode is to suppress the counter EMF voltage by clamping action and the closer the diode is to the source of the EMF the more effective it will be, and that is why most recommend installing it right on the motor, solenoid, relay, or electromagnet coil terminals. The farther away the diode is mounted the more circuit wiring resistance it has to work through.
Did you... @ dhenry Ever bother to calculate just how much wire it would take to cause the "Drama" you warn about?...
Put the diode on the board and keep the total wire length under 6 meters, You'll be fine, Jim.
Thanks guys.... seems I'm ok as long as it's not a million miles away. It's really just more convenient being able to plug the diode into the breadboard than soldering it to the motor or in our case electromagnet.
Seems it wasn't such a dumb question after all.....
Almost nothing in "analog" electronics is a dumb question, and much of it still is an
art [although I recall someone here discounted this idea a couple of days ago]. Eg,
see the famous book, title thereof,
Also, if you're really paying attention, you can learn a lot by being dumb enough to
let the smoke out too. I have.
Normally, I agree with d-e, but personally I don't like the idea of a 12m long "inductive
loop", which can broadcast EMI to other electronics. IE, in general, inductive loops need
to be kept as small as possible. I've measured 400V inductive spikes on devices, and the
idea of feeding this down a 12m line doesn't especially thrill me. I've also seen companies
spending 10s of 1000s of $$$ trying to bulletproof embedded controllers which were
randomly kicking out due to inductive transients. "Hmmm, motor turned on/off, and
controller shutdown, hmmm".
In any case, you might look at the following pages, especially the parts about Battery loop
inductance/resistance, Motor Loop, and Main Capacitor,
The 1/2-hp motor that I used for my e-bike/"e-chopper" has a lead dress, 8-in. or so, not terminals.
They didn't do that figuring the user would clip those off, up against the motor body or something, to put some diode right there like that.
The other thing that matters is the nature of the wiring between the diode and the motor. If the two conductors are parallel and close to each other (ideally, twisted pair) for the whole run, then you can get away with a long length of wire between the motor and the diode/controller. If they are not (e.g if you are using the chassis of the system as one of the motor connections), then you are much more likely to have problems.
This is one place where connecting the grounds together has some severe side effects...
@ Oric, I was being 'funny'... in response to dhenry's inappropriate, usual and generally useless commentary. as to the possibility of EMI and RFI, Jim made it clear, finally that it was a solenoid and not a motor and the reason I mentioned 6 meters of wire. The rest of the commentary was what I should have said in the beginning.
What! You're being funny and another guy being ironic on the other thread. This is
like dictionary overload. [aren't you the guy coming to cut my grass? Oh, that was the
1/4" guy].
Actually it was a kind of theoretical question about the positioning of the diode, although yes it was spurred by the possible need for one on a project my daughter's doing (hobby, not school related, so we're not doing her schoolwork for her!). We're thinking of using an electromagnet as an end-effector on a robot arm (to pick light items up); it could also be a small dc motor (I'm thinking of a tiny drill here, to emulate say a rock-drill or a drill on a manufacturing robot). So motor, electromagnet....
In this model the arms are going to be really short.... she's leaning towards a plastic school ruler (12", 300mm) as each arm section so we're at most 1m away. Especially if I twist the wires together as suggested, we'll be fine... (About a zillion years ago I remember my Dad twisting reel after reel of wire together by sticking two lengths into a hand-drill and I'd go take the other ends down the garden....)
Main thing I learned is that it's nothing like as crucial as the position of a de-coupling cap, which has to be right at the component it's protecting.
Main thing I learned is that it's nothing like as crucial as the position of a de-coupling cap, which has to be right at the component it's protecting.
That would be the wrong take-away. The primary driver here is di/dt: the faster you switch, the higher the spike at shut-off. It is not difficult to produce 100v or even 1kv spikes.
As dc42 indicated, a parallel or twisted pair will definitely reduce the inductive loop to a
huge degree, so transmitted EMI will be greatly reduced, and therefore the possibility of
such noise getting on the rest of the controller electronics. OTOH, looking back at the
embedded controller I was involved with [re post #8], I'm beginning to think the reset
and shutdown problems were mainly due to not having the spark quenchers right at the
inductive loads.