Very good. At Maxim, I defined several families of fancy relay drivers for special markets like ATE (little COTO relays) and DSL provisioning (thousands of relays in a crosspoint). A few things that some of these guy do is interesting. 1. They will have all the snubber diodes for the relays return to a single zener that is reverse biased up from ground. Small transistors can generally take 50v, so it was common to use a 33v diode. The ULN200x series part makes the common diode terminal available for this purpose, you can just tie it to the high rail but for better speed, take it to a common grounded zener at a higher voltage- in 5v systems, this could give a 6x speedup. The reason that they like the return to ground is that often the high rail can't sink current (except into bypass caps)- ground is a better sink and probably stiffer. 2. In some critical applications where power dissipation of on relays could be an issue- they would have a two stage switch, it used the full 12v to pull in the relay and a lower voltage to sustain it. I defined some Maxim IC's that did all this- a 12v relay won't drop out until it gets down below 5v in most cases though generally you'd use 3/4 of the nominal to keep the contact pressure high and R low. There are several clever ways to do this if you look at app notes from Maxim and others. 3. The other cool thing is single coil and dual coil latching relays. Telcom guys would capacitively couple small single coil relay to a HCMOS output- when the output was energized, it would send a pulse to the coil in the forward direction, when the output went low, it would reset the relay. A .1 uF ceramic will create a lot of peak current with a CMOS rise time pushing it- you size the cap for the peak current and energy required for a good latch. This is a good topic. I talked to a lot of relays guys, relays are still used a lot but there are few drivers for them- the ULN2003 series goes back to Sprague in the mid 70's. We had some advanced development on MEMs relays, a whole 'nother very interesting topic that you might look at. Your discussion was well presented as usual. Regards
Great comments. This reminds me of the work we did at Eaton when designing oven controllers. Given the longevity requirements and the high temperatures involved, relay life *and* power dissipation were important design concerns. The normal way to power relays was to use 18v relays in a 24v circuit. The uC would drive the relay at full voltage for a few small time and then PWM it to get a lower effective drive current--but above the hold limit of the relay. Turn on/off was generally synchronized to a zero crossing to minimize current through the contacts when they made/broke. Depending on how the drive circuit was designed and the behavior of different relays, the microcontroller would be programmed with different timings to get the actual make/break exactly on the zero crossing. Pitty the purchasing manager who tried to substitute a different relay in a design without engineering approval. ;)
LM1949 is one such chip, it's primarily for low impedance injector drivers, putting full power into the injector to pull it in, then throttling the current to about 1/4 to hold it in, making for much less power draw, less injector coil heat buildup, and MUCH faster turn-off times.. One of the great things about them is they can also power high impedance injectors just fine, since they will just never draw the current needed to trip into current limiting mode
@@davidwillmore - I worked on white good stuff some. You have some clever designers in that field. Getting the high volume cost down to be competitive took a lot of smart engineering. Zero crossing and cold switching is the same thing that a lot of ATE guys do. They have control of the Source/Measure unit or PMU driver so they can keep everything cold while swtiching. The ATE guys wanted to get 10^11 cycles out of those little Coto relays- and they could do it if you switched cold.
@@Rx7man - exactly- injector drivers are very sexy. They actually use active clamping like a synchronous rectifier to get things to really move. Modern direct EFI, does tiny little timed squirts of 100 uS etc.- amazing- Bosch was/is king. I went on after managing the Standard Products definition to start Maxim's automotive group, I setup the target markets to keep margins high, defined the first 50 or products and hired a bunch of auto industry guys to get it going- a lot of fun. Its now a billion dollar group inside Maxim, soon to be ADI- amazing. We did some interesting injector driver parts and other automotive inductive drivers- modern 7 and 8 speed automatic transmission use very sexy drivers to move hydraulic proportioning valves to make all the shifting buttery smooth. Incandescent lamp Drivers are actually challenging too because the cold resistance is a lot like a short and the hot resistance is much pretty high- took pretty smart drivers. The customers also wanted these to work with LED's with no changes (sense the load profile). LED's have a completely different set of problems. Infineon makes all kinds of really cool smart drivers for automotive and they sell them cheap- at least to the automotive guys. There is a lot engineering in the smallest details everywhere.
@@johnwettroth4060 That's really cool.. I found the LM1949 when I took a Holley Commander 950 standalone controller apart.. it was built in about 2000 or so I can only imagine the new diesel injector drivers have gotta be really nifty to get the response and resolution, and drive piezo injectors which have gotta be very different from coils
@@galfisk yes and no, the yes is it will lite, the no is there is not a lot discharge, so depending on the about of stored energy in the inductor, the low power neon bulb might not clamp it much.
This is one of my questions when I'm interviewing circuit design engineers. I ask them to draw me the circuit they would use to connect a relay to a GPIO pin. They get points for knowing a GPIO pin can't source enough current and need a transistor of some kind, and extra points for including a snubber across the inductor. When I first wrote the question, I thought I was being too easy, but after a dozen interviews, I was wondering if I was being too hard. Interviews are stressful and make you second guess what color the sky is, but I get all sorts of answers I wasn't expecting.
Not too hard at all. That's really basic stuff. Easy to forget, especially in a stressful interview situation, but basic stuff nonetheless. I hope that most at least get the transistor part right :-)
@@sencillamentecharles4359 They're all pretty basic EE101 to gauge their working knowledge. Aside from the relay question, I do a equivalent resistance circuit using values that makes calculating values in your head easy (like two 2k resistors in series, which is in parallel with a 4k resistor, and one 1k resistor is in series with the others). Another question is about ideal op-amp characteristics, which leads to a question about why you would use an op-amp configured as a unity gain. The other is just a basic bit wise operations. This does have one trick to it to see if they recognize the overflow that occurs and if their result of the 8-bit unsigned integer is 0x08 or 0x108.
@@stephanweinberger the transistor is 50/50. I've even had people connect the SPDT switch to the GPIO even through I drew the relay symbol with the coil on the left, and the uC right next to the coil.
Don't assume that all designers know about these things. I was called over to look at a friend's electric gates and discovered that the DC motors were driven in either direction with relays, with no protection devices in the circuit at all! The relays had already been replaced once, and they can't have lasted more than a hundred or so activations before being destroyed by the arcing. I added a couple of large Zener Diodes back to back across the motors, and the relays have now been on there for years. I suppose the electric gate company likes replacing the whole circuit as a nice steady income.
Actually, if that was a brushed motor, you just switched the failure mode from driving circuit, to now motor brushes wearing out eventually! (Brushed motors would not appreciate sudden discrete ON/OFF voltage polarity inversion, especially under load!) A much more complicated H-bridge transistor circuit with braking in the control algorithm would be required!
@@cambridgemart2075 to be fair, he did touch on it briefly in the middle. I think the main point is you should validate your circuit in general and try to minimize surprises.
Spinning flywheel reference... I describe the issue like a pneumatic air hose. If you're working on your car in the garage with air tools, when you plug a line into the compressor, the line expands a little like a balloon as it takes on the working pressure. And, while your using air tools and such, no problem. However, disconnect that pressurized line and you'll get a nice blast of air in your face, a hose end that whips around and a loud pop of escaping air. The longer/wider the hose, the bigger the issue. That magnetic field is just like the expanded rubber of the air line. It wants to keep squeezing things along until fully dissipated.
Fantastic vid! Back in '96, my analog-electronics instructor demonstrated the back EMF phenomenon by having the entire class hold-hands while he stroked a 9V battery across a relay-coil. We all jumped during the shock. Gotta love the 90's! DiPaula was the best instructor ever...
Hi Dave. Good video. The most important is at the end! Often forgotten topic. I work with solenoid that are valves. In the valves you control the current by means of PWM, for that part you want to have a diode with as low as possible forward voltage. You do not want to dissipate energy, contrary, you want the energy to stay there, and keep turning on with PWM to keep the valve open. On the other side, when you what to shut the valve off, you want it to be fast, so you switch another part of the circuit with a Zener, because you want the time to be fast, but also well defined. Knowing the regulated current with PWM, and the zener voltage, you can relatively precisely tell the shut down time. Also for high power relays it is critical that the field goes down fast, moving the contacts fast and avoiding sparking that reduce the life of the relay. Exactly as you demonstrated at the end, is shuts down harder, but it may be a good thing after all. The harder it shuts down, the more life of the contacts, if the contacts in turn drive another inductive load. On the example of valves, sometimes you want to close them softly, to avoid seal wear.... so... it all depends. But it is important to know that a diode is low voltage and tends to "perpetuate" the current AKA free wheeling, and a Zener or something with high voltage will dissipate energy fast. I've seen even "active freewheeling" by using the diode of a MOS, and turning it on short after the diode starts to conduct, to allow for minimal energy dissipation, when you want to regulate a current in the inductor. This is made with a totem-pole or push-pull MOS stages, for example. It would be nice a video making focus on that topics!
Beware that large high current relays need a zener type of diode (as said by dave in the end), this causes a larger voltage across the coil in off transient, creating a larger energy dump in the diode and a faster drop-off of magnetic field (resulting in a faster opening of the relay).
I've seen blogs with scope outputs that show how different flyback configurations can have dramatic effects on switch speed. Quite cool. Rule of thumb I've seen when driving with a transistor is to use a zener value that is as high as possible, but less than the transistor breakdown voltage (with headroom). Not sure if that rule is valid.... I've seen come fylback suggestions with diodes and caps and resistors, but not sure what benefit, if any, that has...... sometimes I wonder if adding extra BOM is worth it when we all know fairly simple diodes work just as well.
@@rainmakerscustomsrainmaker8985 ...remember that the 2 zener diodes are connected 'cathode to cathode' or 'anode to anode', in SERIES across the relay coil-!!!
Dave is an absolute legend! He is like the terminator of electronics and electrical theory! I would start my apprenticeship all over again if I could have Dave as my trade school teacher or my boss!
The most interesting part of the demonstration is when lower breakdown voltage transistors were used. I never would have guessed that such a circuit had so much treasure troves worth of knowledge hidden behind such a simple form. Thanks again, Dave!
As a young player, I got trapped by this one several years ago when retrofitting an old CNC machine with a modern computer. It took me forever to stumble upon the actual problem/solution. But once I did, all my little gremlins went away. Nice video, Dave.
I remember being a kid and using a relay to drive itself--put the coil in series with the NC contacts. Current will flow, the coil will open, current will stop flowing and the relay will close--repeat. Then put a neon bulb across the relay could and you just made a high voltage power supply. ;)
As a kid, I got a pretty good shock when, after building my own 2-way relay out of a hacksaw blade and some electromagnets, I decided that I might be able to configure it as a buzzer by having each direction's connection power the other direction's coil. 12v in, massive arcing and electrical shocks out.
I would have LOVED to have been there learning that lesson with you! Sounds like some beautiful work! Electronics experimenter tinkering and learning at it's FINEST! - The very foundation of what defines a real engineer. Tech Universities hand out engineering degrees to people that never fixed their own bicycle as a kid, never took apart the family toaster to see why the button stays down when plugged in but not when unplugged...and WHERE'S that toast TIMER? Nope. That thought never occurred to them. The curiosity never sparked. They got excellent grades in their courses, though. These people are are incapable of fooling the master of all trades self-taught school of hard learned lessons engineer.
I've come across this in real life, on a tractor using the horn would cause such a spike on the canbus the engine would stop from the ECU protecting itself. The horn circuit was not on the canbus but wires run alongside. Fixed the issue by putting a capacitor in parallel with the horn.
relays with an internal clamping diode must be wired correctly on the primary side to function correctly. more than once i found one wired incorrectly and one time it was from the factory!!!
28:40 My guess is because the diode has slowed the switching action slightly, the contacts don't slam shut as forcefully. This makes the relay operate more quietly.
EDIT: apparently it's not electromagnetic, and actually making the relay louder. Fascinating. The high-voltage pulse generates RF, which the mic picks up due to imperfect shielding. Basically a small EMP. If you hook a relay up so that its contacts open when energized and power the coil via this, you get a simple oscillator that emits wideband RF, with the spark occurring in the relay contacts. Look up spark-gap transmitter.
@@snivesz32 That would be a good theory, but the mic used is a Rode NT5, it is a condenser (capacitor) type with no moving coil or transformer, as is more common in studio applications due to higher sensitivity and linearity compared to moving coil (dynamic) designs. The diaphragm itself functions as a capacitor which varies capacitance and thus voltage due to the change in distance between the flexible diaphragm and static backplate when air pressure impinges on the former.
Again stellar tutorial. Good and useful for any power electronics engineer from novice to expert. I must unfortunately stress the importance of the basics again and again, over and over.
Comments: 1) Although it does not solve the flyback issue, it's a good idea to drive a relay smartly these days to reduce static (resistive) power dissipation/waste: high initial turn-on voltage, and then decrease voltage to just enough to maintain hold. They have ICs for driving relays nowadays. 2) For motion applications: use a Voice-Coil Motor instead of a hefty solenoid. Their inductance is much less. 3) Use a Schottky for the flyback diode. Its breakdown voltage must be high! 4) MOSFETs have a built-in body diode which freewheels in this case, but I don't trust it and supplement with an external Schottky! 5) This snubber can get more complicated (RCD Snubbers, regenerative snubbers), but all of those require tuning to end application! 6) This is EXACTLY the cause of frequent posts on electronics-related forums of noobs saying "HELP my switching power supply project (or any switch project) transistor worked a few times and died..." Transistor is OK when it turns ON in a bad switch design/build, but is killed instantly when you ask the transistor to turn OFF. Well, besides proper design and proper build, you must also validate your design with simulation (which I don't care about) and real-world testing (which is what my job is all about)! Why relay is quieter with snubber is because the scope already showed us they relay turns off much slower. So, this actually can worsen (because contacts move slower) high-voltage acing across load contacts!
A good easy to grasp analogy I think is water hammer, when a valve is closed rapidly with a high speed flow through it. U then get a huge pressure spike (because the water like anything that is moving can't just stop instantly) that can damage or even rupture pipes, valves and other stuff. This is sort of similar to that but for for electricity.
A good way to think about stored magnetic flux and the collapsing magnetic field generating EMF is that of physical momentum. If you roll a bowling ball and suddenly try and stop it, the force pushing back on your hand to stop the ball is the back EMF force trying to stop to momentum of the forward current flow. Or another analogue is of a spinning bicycle wheel and tire. Spin the bike wheel up while you have the bike elevated and then suddenly try and stop the wheel with your hand. Everyone, from child through to elderly, knows EXACTLY what will happen. This is exactly the same thing but in the physical world where people can more easily understand it. Great video, Dave!!!!! PS 14:00 That poor poor BJT is getting flogged!!! LOL
TE has an application note about this for mechanical relays. They say the diode decreases relay force because it decreases opening force and opening velocity. Both necessary to break the dendrites that grow on the contact point. If you put a flyback diode on control side you have only the spring force to open the relay. It will open slowly with diode but it will slam open without the diode. The problem is you need 80V NPN for 24V relay and that is slightly out of spec. 90V collector absolute maximum rating would be ideal for 24V. It depends on proprietary specifications of your exact relay part number though. This is what it was for my TE part. It also depends on your requirements for relay cycles before failure. I follow the application note from TE to get 1,000,000 cycles guaranteed and certified on the datasheet.
@@daleburrell6273 Turn your caps lock off lol. But yeah the condensor...gotta love old names still holding out in niche uses...is to keep the points from burning. They will function without it but the points last a matter of minutes.
@@daleburrell6273 The cap across the points are there to actually increase the output voltage while protecting the point contacts. When the points open but before the HV on the coil output reaches a value high enough to jump the plug gap the coil primary voltage also increase negatively. This can result in an arc across the opening contact. Any arcing here dissipates energy in the coil core reducing the stored energy for your HV secondary. The small value cap across the points absorbs a small amount of this primary side reverse EMF just long enough for the points to open wide enough that an arc can't form. Sort of acts like Dave's diode but only for a very short time. Once the cap charges up a bit and the points open without arching it no longer presents a load to the stored EMF. Arcing also reduces the rate of change of the magnetic field but too large of cap would do the same thing so it's a balancing act for the size if the cap. The down side is when the points close again the energy stored in the cap now wants to spot weld the point contacts.
@@craigs5212 I'd expect the cap to have discharged through the coil primary by the time the points close again. But you'll get some oscillation between the cap and coil for a while.
You're talking about modern coil ignition systems. The PCM has zener snubbers to protect the coils' driver circuitry. The capacitor is used to suppress RF that can picked up radios and other sensitive equipment. An older points style ignition doesn't produce as high voltages as solid state ignitions because of the slower turn off time.
Same, I jumped the 24vdc brake release on a 2 kw servo motor on a custom robot, pinching 2 wires together with each hand and they slipped apart after energizing the coil. Had a bit of a lie-down afterwards. Looking back, it could have killed me but I got lucky.
Excellent demonstration of a very necessary protection for inductive circuits. I have made many pulse width modulation power control circuits, mostly with multiple BUZ11 mosfets in parallel, for speed control of electric trams on my 7.25" gauge garden railway. In every case, I fitted a substantial flywheel diode across the output to the motors (which could draw up to 60 Amps). Even on lower current applications where relays were involved, diodes were a must. One point that should not be overlooked is the use of fast recovery diodes to handle high frequency switching.
While experimenting with pulse motors back in 2001, I managed to blow both channels on my Velleman PC scope rated at 600V. The supply voltage I was working with, was only 12V. As luck would have it, a friend gave me his Tektronix portable that was geared towards auto shops and ignition coils. It was a life saver sort of thing. It's still working like nobody's business.
Yeah, Dave said you wouldn't blow up the input of your oscilloscope because there is so little energy in the voltage peak. This is true for the resistors in the input, but the frequency compensation capacitors or a (MOS)FET input can certainly be damaged even with a short overload like this.
A lot of automotive relays, especially in expensive foreign cars, contain a resistor snubber. If you replace one in a car, make sure you use a snubbed relay. ECMs are a lot more expensive than the proper relay. There's an automotive diagnostic video on UA-cam telling the story of a mechanic trying to get someone back on the road, after their fuel pump relay went out. Replacement, unsnubbed, American parts store relay worked for a couple of days, then fried the output transistor in the ECM through high voltage spikes.
I actually HAVE been shocked by a relay because of this! Before I fully understood counter-voltage spikes, I couldn't see why a little battery powered circuit was able to zap me!
OK, how 'bout listening to a legacy one-tube radio with earphones? The 22.5 V B+ lead went to the phones, and I got zapped when I opened the phone connector. SURPRISE! Some phones actually had EXTERNAL screw terminals! Duuuh?
That was an eye opener. When I started watching, I was thinking to myself, I know all about Back EMF, but I decided to carry on watching anyway, because Dave is always one step ahead of me. So you start out with this little power transistor, and I am saying to myself, Yes, I know all this. But when you put that HF transistor in, I was fascinated. I have never seen that before in all my years in my career. What a great lesson. You are never too old to learn.
With the PN100 in circuit You created a source of QRM (man made noise) on the 160m amateur radio band. Shows just how important it is to get the little things right to avoid all sorts of unwanted 'magic' and unintentional RF noise.
Love the Australian humor...the 50 ohm signal generator termination...I thought the emitter current wasn't exactly the same as the collector...lol I just played with some littlte Omron PLC switching a 7 watts DC solenoid...we had 10 systems returned for failed closed contacts...the solenoid had no snubbler...I tired to cycle and repeat the failure measured -375 volt reverse spike when opened...relay cycled 1.5 x 6....I was advocating a snubber...& 1N4002 clamped it good enough...it was their design....that valve might be opened 4 times a day in its life...so probably the contacts were being eroded..but not the reason for failure on install for PLC relay Q3. What could it be? Ah...there is another solenoid..a N2 purge...that had 8 foot cable from the Q3...and is also was cycle tested unclamped...two 7 watt solenids ran 600,000 cycles without a failure...humm...then found if the 8' cable to N2 was shorted..I got the relay contacts to weld closed in 5 cycles...the little 24 VDC switcher could supply 5A continuous and lots of fat filter caps...before it foldedback...to save itself... At the end of the day...a i am almost sure a new hire was installing the unit and was powering up before terminating the N2 solenoid..and we didn't always do a good job separating the wire ferrules after final test on that cable...before shipping.... Problem went ...quietly away.. No snobbery clamps were installed...let it just radiate... Good job...on BACK EMF
Without the flyback diode, the energy stored in the coil dumps much more quickly because there are 90V at the end of the coil terminals instead of 0.6V, as a result the contacts slams really hard.
@@bsodmike It doesnt. Instead it REDUCES contact wear because any arc gets extinguished faster. Saying to just always add a diode is not the best advice. For example just a Resistor, an RC snubber, or Zener diodes can all be better options than a flyback diode. Plus you cant use a normal diode for AC relays.
Recovery snubber is the way to go. It reminds me of playing with old pulse motors and how guys were using the back emf to recharge batteries etc. The high rate of change produces the high transients which could do things like weld reed switches together after the bit of plasma in the discharge created enough heat at the contacts.
Excellent video! Clearly explained with great visual aids from o'scope making this one of the most practical explanations of the laws governing back emf.......without all the math!
I blew up a micro-ohm meter measuring the dc resistance of a microwave oven transformer primary. Yes it was the back-EMF did it. Kelvin clips interrupted the test current without isolating the voltage measurement. BTW it was about 6 ohms for a 240V primary! 😢
Back EMF can be a valuable safety learning tool. My collage instructors son didn't think a plain 9v battery and a "coil of wire" could possibly hurt him, the shock he received was a very valuable learning experience...
When I was starting my electronics experience ( after uni, because they didn't teached us that), while designing my first prototypes of a AHU control PCB I got a such strong kick back it restarted the microcontroller on the board. took me a while to to realize that I need a diode on every relay and that I have those in the uln2003, just needed to connect the com pin to relay drive voltage. And thinking of it now I remember that my father told that the spark on the motorcycles ignition coil sparks when the contacts on the crank position sensing thingie opens. Took a good 15 years to wrap the experiences and data together.
Here's a related "Trap for young players", and I saw this a lot when I did PLC work on industrial equipment, the back-emf diodes we had were on the output side of the relay that was driving large solenoids, plus of course the back-emf diode on the relay itself... These were circuits that had to perform millisecond sensitive operations, and the snubbers would not change how long it took for the relay or the coil to energize, but they'd significantly affect the time to de-energize and would limit the frequency and minimum reliable pulsewidths you could run because they'd hold the relay and solenoid open for longer Ideally (at least for our application) you would chose the maximum value Zener diode that still protects your circuitry, the higher you can allow the back-emf the faster things will respond
In an application where fast switching times is needed, mechanical relays is probably not the best choice anyway - physically move contact still takes ages, compared to using semiconductors. But if just a freewheeling diode is used, that also means the current gradually goes down, which could cause slow contact separation and that could be a problem (especially for bigger relays that switches high loads). Even if turn off delay is not a problem, arcing at the contacts may be. I got quite impressed by that "RF transmitter". My experience is that the transistors just fail - not that they "break down" and recover repeatedly like that. But it's apparently not the high voltage on it's own that causes them to fail - but rapid heating from huge internal losses. In a low power circuit like this, where the energy stored by the inductor is very low, as well as the average power dissipation (due to the very low switching frequency) - there is no significant heating anyway. Interesting with the mic at the end also - the RFI-clicks could clearly be heard. Funny that it was a Rode mic - those seem to have bad shielding against RFI in general (they pick up a lot of noise from cellphones and other stuff)
@@Speeder84XL yeah, relays are a bad choice, but they managed with what we needed from them.. I'm sure that now they're using solid state or better.. this was 15 years ago
@@Rx7man Yeah. I was also just thinking that even if the switching can be made faster, it will probably still take 10 ms or more to switch on or off - which feels like an eternity when it comes to fast switching in electronics. But I can think for example an elevator that uses relays. If it travels for example 2 m/s and the switching time is shorted from 50 ms to 15 - that makes 7 cm less motion before the motor is disconnected (which makes it significantly easier to set it to stop in the right place). Same applies for other machines moving as well. So, even for applications that don't need to be switched in micro or even nano seconds (as they could using semiconductors), 10's of extra ms can still have quite a significant impact. And for the last part, mechanical relays are not always bad - for high power stuff that doesn't need to be switched very often and very fast, they may still be the best choice. Because metal to metal contact have almost no forward voltage drop and very small losses at on state. The down side, is mainly slow switching and mechanical wear in applications where they switch on/off very often.
@@Speeder84XL In my case, it was a piece of packaging equipment that needed to spray a glue pattern down on a moving piece of cardboard.. the most important thing is consistency, and the longer the delays on switching, the more inconsistency you can have with varying input voltage, temperature, etc.. the relays we used were small 24V ones and they were really quite fast, I'd say probably around a couple ms to turn on at most, and maybe double that to turn off.. As long as the box was moving slow, or was a large box, it wasn't bad, but when you were trying to crank up a small box to 60/minute, timing gets super critical or you get glue all over the place where you don't want it Here's one of the big machines I worked on ua-cam.com/video/mQukx2IyyL0/v-deo.html
@justan idiot Ok, that was quite interesting. But I can think that the rise time may in fact be very short when using physical contacts. Once the conducting parts come close enough, current quickly start flowing. (even at a very low voltage the air will break down when the gap is small enough and form an arc/spark, that can allow for a very rapid rise in current flow) Most of the "switch on time" in a relay happens before the "rise time" though (the time it takes from applying voltage on the coil until the circuit it controls is fully on, is whats's interesting for most applications). Also, it's much harder to "turn off" when using physical contact - because there is always some arcing (which can cover much larger gaps when the contacts is moving apart) before the current stops. The fall time, is always very much longer than the rise time. 440 Hz is quite impressive for a mechanical circuit though - much faster than what could be possible with a solid state relay in fact, since those can only turn off at a zero crossing of the AC current. Since an AC half wave on mains frequencies is 10 ms for 50 Hz (or 8 1/3 ms for 60 Hz), that's the time it may take to switch off those (so theoretical maximum repetition rate is twice mains frequency - 100-120 Hz)
In junior high I bought a plastic sandwich box, put 2x 9v batteries and a relay (wired to oscillate) inside, on the outside put screws as terminals and a red button. It was fun to test for how long people could withstand the shock, and buzzing of the relay made even more hilarious. It taught me that people have vastly different electric shock threshold.
Great video and very detailed explanation. The simple flyback diode can saves a lot of trouble in relay driving circuits. I destroyed a 3 phase 25 kVA generator winding by arcing out some old MOT's in a three phase arrangement. as soon one of the MOT's primary winding went open circuit, flames shot out of the generator winding vents. Hindsight, I should have used a load bank in parrallel or a snubber/surge protector across each phase. Expensive lesson learnt.
That was a lot more fun than I expected. Being able to monitor reverse EMF was interesting, didn't expect such a high voltage from such a small coil. Being an 'old school' motorcycle mechanic I don't get to use oscilloscopes and have to use a peak voltage adapter in an ordinary meter which tends to average out max voltage. I have only seen 318v on a 12v system but now I'm sure it was much much higher. Thanks for an interesting vid. I'm off to see the Fluke meters next.
Dave: You are a blessing to a guy who never finished high school and loves electronics. Also, I wish more teachers would use "E" for EMF instead of "V" for volts.
I remember in my basic electronics lab course we used a transformer, a neon lamp (80V indicator neon lamp as I recall), and a push button switch to demonstrate flyback voltage. Someone in my class hooked up the transformer backwards (and used 120VAC wall voltage instead of our 12VDC power supplies) and ended up getting a large enough flyback to explode his neon lamp (and push button switch). After that we joked with him that he left his shadow on the wall behind him from the flash.
I've had to deal with back EMF when building my DIY spot welder. The solution i came to was to connect a zener diode between the gate and drain, and by choosing the zener voltage accordingly i could make my MOSFET assembly turn on whenever the gate voltage exceeded the supply voltage. A schottky diode was added in series with the zener to prevent the MOSFET from dragging the gate voltage down. Handling over 900 Amps of back EMF is no easy task but this solution did it beautifully. In your case you could omit the second diode so that the transistor would limit its base current and prevent saturation, which you mentioned can slow the switching down of the BJT. Doing it this way you only need to worry about the energy dissipation and supply voltage, because you know that your switching transistor can handle the current already. :)
Fantastic presentation Dave, really appreciate that you've started to go back to these super educational pieces than just the Mail bag serious or tear downs - sure, I enjoy those segments to bits - but knowledge nuggets like this, with your style of presentation are hard to beat and look forward to a lot more in this direction! Now, how about we wire up a beefier inductor, to a transformer (more windings on the secondary) and a potato. Let's see if we can let the magic smoke out of the potato. Tee hee!
Wow, as an engineering student, I would have learned useful stuff in circuits if you had been the professor. You incorporate the theory into the practical with great visuals, demonstrations, and clear explanations. Thank you!!! This should be a tutorial on how to make a teaching video!
I know of one computer (HP2114, from 1970's) that used a "clicker" open frame relay to indicate soft button presses. I suspect it didn't have a full snubber (maybe a zener) to maximize the sound generated.
I like to add a low-value resistor in series with the back-EMF diode, on the order of 10-100 ohms. It allows the diode to snub the voltage spike at a higher value, still within the maximum C-E voltage rating of the transistor, but it dissipates the energy in the relay coil faster, allowing the relay to drop out considerably quicker. This reduces the chances of damaging contact arcing occurring in the relay.
I've built a few linear power supplies and ended up putting some high voltage ceramic caps across the diodes to help smooth away the spikes caused by the switching action of the does in the rectifier. Wrt the microphone, I reckon there is electromagnetic noise that is suppressed with the clamping diode, and that the mic is picking that up. Also potentially some arcing in the relay.
Mic (or the associated circuitry) picking up the electrical spike is my guess, too. Bonus reason: it's the drop-out side of the cycle that gets louder, and that's where the spike happens. (Of course, the pull-in side of the cycle shouldn't be in any way affected by the diode.) Mostly, though, the extra noise sounds more electrical than mechanical, somehow.
I've always had hard time hearing things like "the voltage must rise to obey Faraday's Law". No. It does not rise because of Faraday's law but Faraday's law perfectly describes what is going to happen. That is the order of "status", the laws we have FOUND, not made. Nothing follows our laws, our laws follow what is happening. I remember having this been a problem all the way the first year of EE, as our teacher approached everything from that angle, "X happens because of Y law". In the second year i got a different teacher and he approached everything from the opposite angle: X is going to happen and this law is formed to explain it. He was actually a lab teacher. The first teacher didn't do anything but theory so very single equation was presented in the FULL form, then simplified to the thing we will use. He caused so much confusion in a subject matter that is at the core of understanding electricity. He was a bad teacher anyway, each question was answered "it is in the book".
When it's across the horizontal output and flyback of a CRT set it's almost always called the damper, and in some sets (mostly older tube sets) it dumps into a big capacitor to develop the boosted B+ voltage for the horizontal/vertical output. Which is why when you had a weak damper tube, the telltale symptom was a small picture that didn't fill the screen. In the secondary winding of the flyback, those big pulses (and the resonant frequency of the transformer) is what develops the high voltage for the CRT, not just the ratio of primary to secondary windings. In fact, in some designs it worked a little too well. There was a "critical safety" snubber cap in addition to the damper diode to keep the HV down. If the cap failed shorted or open, it would kill the HV. No worries. But that's not what happened. The caps changed in value and let the HV climb until something blew, and that something was often the neck of the CRT. Lots of infamous TV set fires started that way, not to mention getting free whole-body X-rays at home.
@@nameredacted1242 AM is also LW for all of us I think. As MW and SW, (Long/Medium/Short Wave), which are all a specific frequency band. AM is the way it is modulated, as FM is. When a radio has only one AM frequency band (most likely MW) manufacturers (can) use AM as a name, opposite to FM. German radio's use UKW for FM, Ultra Kurtze Welle (ultra short wave). Beside that Lange Welle and medium Welle have the same abbreviation as in English. But I guess you know....
Just yesterday i was talking about this with my boss, he told me that every professor explains back EMF on inductors wrong, he had difficulties to understand it for weeks until he reached a explanations and when talked with his tutor about it, the tutor explained that it was true but people wouldn´t understand it that way as it was a basic level class. The explanation says that the Inductor doesen´t magically generate a reverse voltage on its own, its the current trying to continue flowing forward that tries to find a path, as the path is not found the voltage rises and rises until a path is found, (it might even be the impedance of the air ) then the current is dumped trough that path and thus you now have the inductor working as a current source powering a impedance( whatever is working as the path for the current) so now the voltage across the coil is reversed since it was a load and now its a source. i still don´t think i fully understand it, it might be from the years i thought of the magical voltage veresing explanation but it makes complete sense.
Don't let physicists (and managers) in the lab!!! They can stay at their desks and theorize, and please don't touch any of my lab equipment if you are not a technician!!!
Back EMF is somewhat analogous to the water hammer in pipes. Once the flow of electrons is stopped by brutally opening the transistor, inertia pushes the electrons still in the inductor to flow to the positive rail, leaving a 'vaccum' behind. When the 'vaccum' is strong enough, it will suck the ground electrons through the transistor junctions. Plumbing helped me a lot to understand analog electronics when I started working in this field.
@@nameredacted1242 Well, he is my boss at the I+D department, he is the one that designed the new generation of flyback power supplies that will be released in the next months and are absolutely nuts how powerful and precise they are. As soon as they are released i´l post here the link to the specifications but can´t say anything right now due the NDA i signed. If he says so, i believe him, he´s an electronics engineer but ALL of his designs are based on the absolute math basics of every component, not the equations in the datasheets, those are simplifications as he already demostrated me lots of times. I asked my power electronics professor back from the uni and told me the same, i STILL have difficulty in completely believing them but again, it makes sense.
I inadvertently discovered back EMF when I was a kid, after realising that I could configure a relay to act as a buzzer, passing one of the power lines to the coils first through the normally closed switch pair. Thought it was fun that I was able to make a buzzer, then realised that it was even more fun to touch the coil contacts to get myself zapped! Was high enough voltage to cause my finger to spasm.
Coils are still somewhat mysterious for me. You store energy in a magnetic field, that expands into the universe with the speed of light. How can you retrieve that energy almost instantly?
Because the vast majority of the energy never goes far, it stays in the air gap between the ferrous particles. Radiation only occurs when the field is changed over a distance that is long compared to the time it takes.
Only a part of the magnetic energy is radiated off that cannot be recovered; that happens when the magnetic field is changing. The stored energy that is recovered comes from the DC magnetic field and when that collapses part of it also gets lost in the form of radiation.
Energy storage and energy transmission are separate concerns. Energy transmission (electromagnetic wave propagation) happens when things change. So each time you charge or discharge a capacitor or an inductor, the dynamic part of the electric and magnetic field induce corresponding changes in each other, and those propagate out. But energy storage is a static phenomenon - once a steady state is reached, a certain amount of energy is stored as long as that steady state persists. Most coils and capacitors are very poorly coupled to the free space (by design and happenstance), and thus most of their energy is typically retained in spite of dynamic changes. If you couple a capacitor or an inductor well to free space, a lot of the energy can be radiated out the antenna rather than flowing into other parts of the circuit. This can be seen easily when you have an LC tank with high Q corresponding to long oscillation decay time constant. Once a matching antenna is attached, the Q can be lowered by an order of magnitude or more - more the wider the bandwidth of the antenna and the matching network, since at low Q the effective frequency also changes quite a bit. In circuits that are reasonable to construct, the Q can be lowered to low single digits that way. If the matching network and antenna have low losses, a large fraction of energy stored in the tank can be radiated out :)
So that’s why big DC contactors have a varistor in parallel to the coil! Thank you so much! BTW, isn’t it the way old school gas engines points ignition works?
I have an antique "Hipps Toggle" electric clock patent 1896 that runs on 3v that the back EMF packs quite a punch. I was holding the wire when the contacts opened once. It hurt! The back EMF actually makes the magnet coils thump when the contacts open.
we used to call it the MF Diode... like in m0ther *** .... because a student didn't want to put it in the design (replaced it with a resistance ) ... so the team leader just said ... put the M*F* Diode
@@EEVblog You get a good number of automotive relays with the resistor in there, done for exactly the same reason to reduce back EMF without needing to add any extra parts in the vehicle. Do not change for a version without the resistor, because it will cause issues in a lot of cases.
If you need to stop the inductor current quicker, increase the diode voltage with a series Zener or R||C snubber (inset at 8:15). Keep in mind that the V_CE (or V_DS) will also increase.
In the 70's Spencer Gifts sold a prank cigarette lighter which used a small relay to give you a pulsating AC shock. I recreated the circuit for other pranks.
Flyback can also be your friend if you need to an easy, inexpensive way to create a voltage - like a for a spark plug or a CRT. The technique is also used for boost converters to avoid using a transformer.
I did this exact thing when building my super cap spot welder, i put in a single diode across the coil, and a diode and tvs diode across the welding leads to prevent the contacts from welding themselves together, this combination was a compromise on the voltage spike across the contacts and the time it took for the solenoid to disconnect, around 11mS and +/- 20V. I also had soo much energy from those super caps i had to increase the length and decrease the cable cross section, actually using the cables themselves as a current limit because otherwise it was too much energy from those caps and just blowing metal apart and creating holes in 1mm aluminium. I also had a timer feeding the solenoid so i could adjust the on/off time for the spot welder.
I enjoy your presentation's, They are always educational. I have been in electronics, sense the early 60's, first as a T.V. tech, then in later years, as a land mobile tech, for Motorola, and at 80 Yrs. i still find that I don't know every think, so thank you for the knowledge you share.
The energy built-up in the coil discharges very quickly, which for a moment, creates a stronger magnetic field that pulls the relay contact faster and harder, making the sound louder. However, I also think the actual magnetic field collapsing is getting picked up by the coil in the microphone as well. The louder sound is partially the hard knock of the relay switching harder, but unless it's so loud the audio is clipping, I think I hear the snap of the magnetic field in the audio. It's hard to say for sure, but that's what it sounds like.
Great video! Love these sort of fundamental type videos you do. Usually stuff we all/most are aware of, but the deep look on the oscilloscope and intricacies of it are fascinating when you present it like this.
Superb tutorial on the effects of back emf. Those expanded scope traces are amazing to actually see. A bit surprising the transistor didn't get destroyed by almost 3x the max rated voltage, even though the current is so low.
Good. Interesting. It deals with a much overlooked subject, and the comments on flywheel time are good. I liked the demonstrations of the effects of spring energy in modifying the waveforms. I should like to add a little detail however: 1 - The back-emf at a perfect switch-off would aim for V=I×squroot(L÷C) where C is the total capacitance, ie coil self-C plus stray C. So no infinity, sorry. 2 - Replacing the perfect switch with a transistor and nothing else will cause the transistor collector V to rise until it breaks over the transistor's collector-base voltage which acts like a zener diode. Like the man said. 3 - As another commenter has said, a zener diode can be used to clamp this flyback voltage to a value somewhat below Vceo. The higher the flyback voltage (eg high Vceo transistor with high voltage zener) the shorter the flywheel time, because there's a fixed energy in the inductance (plus contact spring etc if present), and the rate of energy dissipation is proportional to this voltage. 4 - For really heavy-duty flyback limiting. connect the zener cathode to the collector and anode to the BASE. This creates a fast, high-power zener. The transistor must have sufficient power rating, but it beats trying to find a high-power zener. 5 - I've had fairly large telephone relays driven by unprotected transistors pulsing away for hours on end with no apparent problem, but any reliability engineer will tell you that even a single break-over of the c-b diode permanently compromises a transistor's reliability. 6 - In 1967 I was required to adapt an echo-sounder for shallow water readings. The instrument used a single audio transducer for transmit and receive. It had a post-office type relay to switch the transducer from the power driver output to the high-sensitivity receiver input. The flywheel time was so long that the bottom echo was not received: it had arrived during the flywheel time. I cured it by omitting the flywheel diode and used the highest voltage approved transistor available to me - around 120V. And this was my first introduction the this kind of phenomenon. 7 - A factor ignored in this video is current induced in the iron. Some energy is dissipated by the iron core acting as a shorted turn. This effect will actually prolong the flywheel time as it represents a low-resistance, low voltage path just as the simple flywheel diode did. I found this effect with iron-shrouded solenoid valves to completely take over from the electronic circuit at switch-off. They took over ¼sec to close after the end of their drive pulse. This was 1970. I'll be 80 on Thursday!
Real world experience. The robot I worked on used an audio sampler on a midi interface ( to play music clips etc) , and had a water valve actuator. I was new to the job, and experienced random samples playing, when the water squirter was switched on and off. Not really wanted behaviour. The small water valve had a solenoid, and I figured that the solenoid coil switch-off spikes ( as Dave so ably demonstrated) were enough to cause the sampler to switch on, despite the water squirter being on 12 volts, and the sampler on 9 volts. A simple diode fixed the problem.
Thanks for the young player trap info, I will say most Tech's know very little about why fly back issues can shorten component life. Most get basic idea, your complete demo with scope-well-The BEST. I to this day do not know what a dc brushed motor, (24 volt 5amp drill), can do to the electronics of todays smps. that is raw motor, tear down stuff. Would it require a special tongue angle?
That was a good demonstration, a very nice use of your osciloscope and probes!. I had to figure this out the hard way years ago, when trying to accelerate relay switching for a UPS circuit. Very good work!
07:15 this arrangement is used in many HE (High Efficiency) LED lamps, where not only the current being drawn through the inductor is used, but also the energy stored in the inductor is used as well. Bigclivedotcom has taken apart many a lamps with this configuration with buck or SM PSUs
We always called that diode a counter-EMF diode. Learned about that little guy in the Navy electronics school AV-B. And that magnetic field collapse will zap you a little if the diode goes bad. Learned that the hard way too. 😁. I think the US Navy had the 1N914A designed just for this purpose, because we had thousands of those diodes all over the aircraft. But, that’s supposition on my part. 🤔 Outstanding video!! Thanks Dave!!
The down side to any coil snubber is the longevity of the drop out, this causes premature wear in the contacts. Best circuit I have used is a diode and resistor in series, then you can fine tune the circuit by altering the resistor to get the least drop out time and least voltage spike. Nothing else has been better, TVRs VDRs Zeners, non as good. The other thing to watch is collective dropout, if you have a series of relays, say three or four the delay can run into many 10s of mS. When controlling pneumatic valves its good to have the same use as well, although then its usually ok to just have a diode, as the difference for a valve of a few mS is not as critical.
Very good. At Maxim, I defined several families of fancy relay drivers for special markets like ATE (little COTO relays) and DSL provisioning (thousands of relays in a crosspoint). A few things that some of these guy do is interesting. 1. They will have all the snubber diodes for the relays return to a single zener that is reverse biased up from ground. Small transistors can generally take 50v, so it was common to use a 33v diode. The ULN200x series part makes the common diode terminal available for this purpose, you can just tie it to the high rail but for better speed, take it to a common grounded zener at a higher voltage- in 5v systems, this could give a 6x speedup. The reason that they like the return to ground is that often the high rail can't sink current (except into bypass caps)- ground is a better sink and probably stiffer. 2. In some critical applications where power dissipation of on relays could be an issue- they would have a two stage switch, it used the full 12v to pull in the relay and a lower voltage to sustain it. I defined some Maxim IC's that did all this- a 12v relay won't drop out until it gets down below 5v in most cases though generally you'd use 3/4 of the nominal to keep the contact pressure high and R low. There are several clever ways to do this if you look at app notes from Maxim and others. 3. The other cool thing is single coil and dual coil latching relays. Telcom guys would capacitively couple small single coil relay to a HCMOS output- when the output was energized, it would send a pulse to the coil in the forward direction, when the output went low, it would reset the relay. A .1 uF ceramic will create a lot of peak current with a CMOS rise time pushing it- you size the cap for the peak current and energy required for a good latch. This is a good topic. I talked to a lot of relays guys, relays are still used a lot but there are few drivers for them- the ULN2003 series goes back to Sprague in the mid 70's. We had some advanced development on MEMs relays, a whole 'nother very interesting topic that you might look at. Your discussion was well presented as usual. Regards
Great comments. This reminds me of the work we did at Eaton when designing oven controllers. Given the longevity requirements and the high temperatures involved, relay life *and* power dissipation were important design concerns. The normal way to power relays was to use 18v relays in a 24v circuit. The uC would drive the relay at full voltage for a few small time and then PWM it to get a lower effective drive current--but above the hold limit of the relay. Turn on/off was generally synchronized to a zero crossing to minimize current through the contacts when they made/broke. Depending on how the drive circuit was designed and the behavior of different relays, the microcontroller would be programmed with different timings to get the actual make/break exactly on the zero crossing. Pitty the purchasing manager who tried to substitute a different relay in a design without engineering approval. ;)
LM1949 is one such chip, it's primarily for low impedance injector drivers, putting full power into the injector to pull it in, then throttling the current to about 1/4 to hold it in, making for much less power draw, less injector coil heat buildup, and MUCH faster turn-off times.. One of the great things about them is they can also power high impedance injectors just fine, since they will just never draw the current needed to trip into current limiting mode
@@davidwillmore - I worked on white good stuff some. You have some clever designers in that field. Getting the high volume cost down to be competitive took a lot of smart engineering. Zero crossing and cold switching is the same thing that a lot of ATE guys do. They have control of the Source/Measure unit or PMU driver so they can keep everything cold while swtiching. The ATE guys wanted to get 10^11 cycles out of those little Coto relays- and they could do it if you switched cold.
@@Rx7man - exactly- injector drivers are very sexy. They actually use active clamping like a synchronous rectifier to get things to really move. Modern direct EFI, does tiny little timed squirts of 100 uS etc.- amazing- Bosch was/is king. I went on after managing the Standard Products definition to start Maxim's automotive group, I setup the target markets to keep margins high, defined the first 50 or products and hired a bunch of auto industry guys to get it going- a lot of fun. Its now a billion dollar group inside Maxim, soon to be ADI- amazing. We did some interesting injector driver parts and other automotive inductive drivers- modern 7 and 8 speed automatic transmission use very sexy drivers to move hydraulic proportioning valves to make all the shifting buttery smooth. Incandescent lamp Drivers are actually challenging too because the cold resistance is a lot like a short and the hot resistance is much pretty high- took pretty smart drivers. The customers also wanted these to work with LED's with no changes (sense the load profile). LED's have a completely different set of problems. Infineon makes all kinds of really cool smart drivers for automotive and they sell them cheap- at least to the automotive guys. There is a lot engineering in the smallest details everywhere.
@@johnwettroth4060 That's really cool.. I found the LM1949 when I took a Holley Commander 950 standalone controller apart.. it was built in about 2000 or so
I can only imagine the new diesel injector drivers have gotta be really nifty to get the response and resolution, and drive piezo injectors which have gotta be very different from coils
an interesting demonstration of the back-emf current is by using an LED as the flyback diode
And you can demonstrate the high voltage issue by using a neon lamp as a clamper.
@@galfisk I actually did that back in the early 80s when I was learning about this stuff.
@@galfisk yes and no, the yes is it will lite, the no is there is not a lot discharge, so depending on the about of stored energy in the inductor, the low power neon bulb might not clamp it much.
Yes
But it will damage the LED .
@@DavyOneness that video is pretty long, about where in there is the charging off the cemf?
This is one of my questions when I'm interviewing circuit design engineers. I ask them to draw me the circuit they would use to connect a relay to a GPIO pin. They get points for knowing a GPIO pin can't source enough current and need a transistor of some kind, and extra points for including a snubber across the inductor. When I first wrote the question, I thought I was being too easy, but after a dozen interviews, I was wondering if I was being too hard. Interviews are stressful and make you second guess what color the sky is, but I get all sorts of answers I wasn't expecting.
Awesome fact, could you share more of those "tricky" you questions you ask?
Not too hard at all. That's really basic stuff. Easy to forget, especially in a stressful interview situation, but basic stuff nonetheless.
I hope that most at least get the transistor part right :-)
@@sencillamentecharles4359 They're all pretty basic EE101 to gauge their working knowledge. Aside from the relay question, I do a equivalent resistance circuit using values that makes calculating values in your head easy (like two 2k resistors in series, which is in parallel with a 4k resistor, and one 1k resistor is in series with the others).
Another question is about ideal op-amp characteristics, which leads to a question about why you would use an op-amp configured as a unity gain.
The other is just a basic bit wise operations. This does have one trick to it to see if they recognize the overflow that occurs and if their result of the 8-bit unsigned integer is 0x08 or 0x108.
@@stephanweinberger the transistor is 50/50. I've even had people connect the SPDT switch to the GPIO even through I drew the relay symbol with the coil on the left, and the uC right next to the coil.
ULN2003 Is the answer. It has got some 8 Darlington arrays, diodes for freewheel....works nice till the magic smoke escapes.
Don't assume that all designers know about these things. I was called over to look at a friend's electric gates and discovered that the DC motors were driven in either direction with relays, with no protection devices in the circuit at all! The relays had already been replaced once, and they can't have lasted more than a hundred or so activations before being destroyed by the arcing. I added a couple of large Zener Diodes back to back across the motors, and the relays have now been on there for years. I suppose the electric gate company likes replacing the whole circuit as a nice steady income.
Actually, if that was a brushed motor, you just switched the failure mode from driving circuit, to now motor brushes wearing out eventually! (Brushed motors would not appreciate sudden discrete ON/OFF voltage polarity inversion, especially under load!) A much more complicated H-bridge transistor circuit with braking in the control algorithm would be required!
@@nameredacted1242 Dave didn't cover it but you can also use an RC snubber, suitable for AC situations. I'd assume it has a softer clamping action.
@@gblargg RC snubber or a varistor would be better than a diode snubber in this situation.
@@cambridgemart2075 to be fair, he did touch on it briefly in the middle.
I think the main point is you should validate your circuit in general and try to minimize surprises.
i like big motors and i cannot lie
Spinning flywheel reference... I describe the issue like a pneumatic air hose. If you're working on your car in the garage with air tools, when you plug a line into the compressor, the line expands a little like a balloon as it takes on the working pressure. And, while your using air tools and such, no problem.
However, disconnect that pressurized line and you'll get a nice blast of air in your face, a hose end that whips around and a loud pop of escaping air. The longer/wider the hose, the bigger the issue.
That magnetic field is just like the expanded rubber of the air line. It wants to keep squeezing things along until fully dissipated.
Ah, finally a UA-camr who knows how to properly draw a resistor.
Fantastic vid! Back in '96, my analog-electronics instructor demonstrated the back EMF phenomenon by having the entire class hold-hands while he stroked a 9V battery across a relay-coil. We all jumped during the shock. Gotta love the 90's! DiPaula was the best instructor ever...
None of my teachers did that one to our class.
But I did.
Experience is one of our greatest teachers! 😊🌎✨
Instructional videos like this are a gold mine, like that bit about BJT storage time, I didn't know that.
Hi Dave. Good video. The most important is at the end! Often forgotten topic. I work with solenoid that are valves. In the valves you control the current by means of PWM, for that part you want to have a diode with as low as possible forward voltage. You do not want to dissipate energy, contrary, you want the energy to stay there, and keep turning on with PWM to keep the valve open. On the other side, when you what to shut the valve off, you want it to be fast, so you switch another part of the circuit with a Zener, because you want the time to be fast, but also well defined. Knowing the regulated current with PWM, and the zener voltage, you can relatively precisely tell the shut down time.
Also for high power relays it is critical that the field goes down fast, moving the contacts fast and avoiding sparking that reduce the life of the relay. Exactly as you demonstrated at the end, is shuts down harder, but it may be a good thing after all. The harder it shuts down, the more life of the contacts, if the contacts in turn drive another inductive load. On the example of valves, sometimes you want to close them softly, to avoid seal wear.... so... it all depends. But it is important to know that a diode is low voltage and tends to "perpetuate" the current AKA free wheeling, and a Zener or something with high voltage will dissipate energy fast. I've seen even "active freewheeling" by using the diode of a MOS, and turning it on short after the diode starts to conduct, to allow for minimal energy dissipation, when you want to regulate a current in the inductor. This is made with a totem-pole or push-pull MOS stages, for example. It would be nice a video making focus on that topics!
I have been at least 20 years wondering about the switching phenomna of relays
Man, I have to say, you are a true legend
Beware that large high current relays need a zener type of diode (as said by dave in the end), this causes a larger voltage across the coil in off transient, creating a larger energy dump in the diode and a faster drop-off of magnetic field (resulting in a faster opening of the relay).
I've seen blogs with scope outputs that show how different flyback configurations can have dramatic effects on switch speed. Quite cool. Rule of thumb I've seen when driving with a transistor is to use a zener value that is as high as possible, but less than the transistor breakdown voltage (with headroom).
Not sure if that rule is valid.... I've seen come fylback suggestions with diodes and caps and resistors, but not sure what benefit, if any, that has...... sometimes I wonder if adding extra BOM is worth it when we all know fairly simple diodes work just as well.
Used for fast PLC relay outputs for the very same reason.
...TWO ZENER DIODES BACK TO BACK IN SERIES IS EVEN BETTER-(!)
A good peace of info. this is a new take that I had not known about. Using a Zener across the coil dose make sense on some of my applications.
@@rainmakerscustomsrainmaker8985 ...remember that the 2 zener diodes are connected 'cathode to cathode' or 'anode to anode', in SERIES across the relay coil-!!!
I blew so many mosfets during my undergraduate years before I figured this out.
Only wish you were around back then.
Dave is an absolute legend! He is like the terminator of electronics and electrical theory! I would start my apprenticeship all over again if I could have Dave as my trade school teacher or my boss!
Agreed Nelson
@Google user yeah I get what you're saying and I agree but I'd happily work under Dave any day
I'll be back.
The most interesting part of the demonstration is when lower breakdown voltage transistors were used. I never would have guessed that such a circuit had so much treasure troves worth of knowledge hidden behind such a simple form. Thanks again, Dave!
As a young player, I got trapped by this one several years ago when retrofitting an old CNC machine with a modern computer. It took me forever to stumble upon the actual problem/solution. But once I did, all my little gremlins went away. Nice video, Dave.
I remember being a kid and using a relay to drive itself--put the coil in series with the NC contacts. Current will flow, the coil will open, current will stop flowing and the relay will close--repeat. Then put a neon bulb across the relay could and you just made a high voltage power supply. ;)
RIP relay contacts, :)
I did the same. It makes them go nuts. I did it with relays from a car.
The classic, bi-stable circuit! That little relay circuit was used in the millions of things back in the day. Sure makes a racket!!
As a kid, I got a pretty good shock when, after building my own 2-way relay out of a hacksaw blade and some electromagnets, I decided that I might be able to configure it as a buzzer by having each direction's connection power the other direction's coil. 12v in, massive arcing and electrical shocks out.
I would have LOVED to have been there learning that lesson with you! Sounds like some beautiful work! Electronics experimenter tinkering and learning at it's FINEST! - The very foundation of what defines a real engineer. Tech Universities hand out engineering degrees to people that never fixed their own bicycle as a kid, never took apart the family toaster to see why the button stays down when plugged in but not when unplugged...and WHERE'S that toast TIMER? Nope. That thought never occurred to them. The curiosity never sparked. They got excellent grades in their courses, though. These people are are incapable of fooling the master of all trades self-taught school of hard learned lessons engineer.
I've come across this in real life, on a tractor using the horn would cause such a spike on the canbus the engine would stop from the ECU protecting itself. The horn circuit was not on the canbus but wires run alongside. Fixed the issue by putting a capacitor in parallel with the horn.
quite unusual because CAN bus is differential and should be near immune to noise.
relays with an internal clamping diode must be wired correctly on the primary side to function correctly. more than once i found one wired incorrectly and one time it was from the factory!!!
28:40 My guess is because the diode has slowed the switching action slightly, the contacts don't slam shut as forcefully. This makes the relay operate more quietly.
But its contacts would now arc more if HV inductive load is switched!
Yep, that would be my guess as well.
EDIT: apparently it's not electromagnetic, and actually making the relay louder. Fascinating.
The high-voltage pulse generates RF, which the mic picks up due to imperfect shielding. Basically a small EMP. If you hook a relay up so that its contacts open when energized and power the coil via this, you get a simple oscillator that emits wideband RF, with the spark occurring in the relay contacts. Look up spark-gap transmitter.
My guess is that the high voltage coils magnetic field is coupling to the microphones coil.
@@snivesz32 That would be a good theory, but the mic used is a Rode NT5, it is a condenser (capacitor) type with no moving coil or transformer, as is more common in studio applications due to higher sensitivity and linearity compared to moving coil (dynamic) designs. The diaphragm itself functions as a capacitor which varies capacitance and thus voltage due to the change in distance between the flexible diaphragm and static backplate when air pressure impinges on the former.
Again stellar tutorial. Good and useful for any power electronics engineer from novice to expert. I must unfortunately stress the importance of the basics again and again, over and over.
Comments:
1) Although it does not solve the flyback issue, it's a good idea to drive a relay smartly these days to reduce static (resistive) power dissipation/waste: high initial turn-on voltage, and then decrease voltage to just enough to maintain hold. They have ICs for driving relays nowadays.
2) For motion applications: use a Voice-Coil Motor instead of a hefty solenoid. Their inductance is much less.
3) Use a Schottky for the flyback diode. Its breakdown voltage must be high!
4) MOSFETs have a built-in body diode which freewheels in this case, but I don't trust it and supplement with an external Schottky!
5) This snubber can get more complicated (RCD Snubbers, regenerative snubbers), but all of those require tuning to end application!
6) This is EXACTLY the cause of frequent posts on electronics-related forums of noobs saying "HELP my switching power supply project (or any switch project) transistor worked a few times and died..." Transistor is OK when it turns ON in a bad switch design/build, but is killed instantly when you ask the transistor to turn OFF. Well, besides proper design and proper build, you must also validate your design with simulation (which I don't care about) and real-world testing (which is what my job is all about)!
Why relay is quieter with snubber is because the scope already showed us they relay turns off much slower. So, this actually can worsen (because contacts move slower) high-voltage acing across load contacts!
A good easy to grasp analogy I think is water hammer, when a valve is closed rapidly with a high speed flow through it. U then get a huge pressure spike (because the water like anything that is moving can't just stop instantly) that can damage or even rupture pipes, valves and other stuff. This is sort of similar to that but for for electricity.
this is yet another one of a multitude hydraulic analogy working very well to explain electricity.
Yeah, i did that once..... Then i had to explain water hammer... I gave up after trying to explain how echoes work. Went home, got drunk and cried.
Hi Dave. Using the scope gives such clarity to your explanation. Brilliant and thanks.
A good way to think about stored magnetic flux and the collapsing magnetic field generating EMF is that of physical momentum. If you roll a bowling ball and suddenly try and stop it, the force pushing back on your hand to stop the ball is the back EMF force trying to stop to momentum of the forward current flow. Or another analogue is of a spinning bicycle wheel and tire. Spin the bike wheel up while you have the bike elevated and then suddenly try and stop the wheel with your hand. Everyone, from child through to elderly, knows EXACTLY what will happen. This is exactly the same thing but in the physical world where people can more easily understand it.
Great video, Dave!!!!!
PS 14:00 That poor poor BJT is getting flogged!!! LOL
Water hammer
Yes, I used the flywheel analogy in the video.
No transistor were harmed in the making of this video.
Another word for the diode:
"MSRD - Magic Smoke Retention Device"
If ya leave it out, then the 'Magic Smoke' is far more likely to escape.
Hate those devises
@@jdarst100 All electronics work on captive smoke, the amount of times I have let it out and the damned thing then stops working....
TE has an application note about this for mechanical relays. They say the diode decreases relay force because it decreases opening force and opening velocity. Both necessary to break the dendrites that grow on the contact point. If you put a flyback diode on control side you have only the spring force to open the relay. It will open slowly with diode but it will slam open without the diode. The problem is you need 80V NPN for 24V relay and that is slightly out of spec. 90V collector absolute maximum rating would be ideal for 24V. It depends on proprietary specifications of your exact relay part number though. This is what it was for my TE part. It also depends on your requirements for relay cycles before failure. I follow the application note from TE to get 1,000,000 cycles guaranteed and certified on the datasheet.
I love your series of "fundamentals" videos Dave! This one on "Back EMF" is particularly well presented and enlightening. Top Notch!
14:40 Automotive ignition coils use this to generate the spark that fires each cylinder. They can turn 12 volts into something like 50, 60, 80kV.
...AND THAT'S WHY THERE WAS A CAPACITOR CONNECTED ACROSS THE POINTS-(!)
@@daleburrell6273 Turn your caps lock off lol. But yeah the condensor...gotta love old names still holding out in niche uses...is to keep the points from burning. They will function without it but the points last a matter of minutes.
@@daleburrell6273 The cap across the points are there to actually increase the output voltage while protecting the point contacts. When the points open but before the HV on the coil output reaches a value high enough to jump the plug gap the coil primary voltage also increase negatively. This can result in an arc across the opening contact. Any arcing here dissipates energy in the coil core reducing the stored energy for your HV secondary. The small value cap across the points absorbs a small amount of this primary side reverse EMF just long enough for the points to open wide enough that an arc can't form. Sort of acts like Dave's diode but only for a very short time. Once the cap charges up a bit and the points open without arching it no longer presents a load to the stored EMF. Arcing also reduces the rate of change of the magnetic field but too large of cap would do the same thing so it's a balancing act for the size if the cap. The down side is when the points close again the energy stored in the cap now wants to spot weld the point contacts.
@@craigs5212 I'd expect the cap to have discharged through the coil primary by the time the points close again. But you'll get some oscillation between the cap and coil for a while.
You're talking about modern coil ignition systems. The PCM has zener snubbers to protect the coils' driver circuitry. The capacitor is used to suppress RF that can picked up radios and other sensitive equipment. An older points style ignition doesn't produce as high voltages as solid state ignitions because of the slower turn off time.
I first learned about this as a kid when I connected a relay and 9v battery with one hand on each terminal. Ouch!
haha yep same!
same but with a wall wart
Best is to have one end of the coil on the NC so that the relay oscillates. Gives ya quite a good tingle.
Same, I jumped the 24vdc brake release on a 2 kw servo motor on a custom robot, pinching 2 wires together with each hand and they slipped apart after energizing the coil. Had a bit of a lie-down afterwards. Looking back, it could have killed me but I got lucky.
Me too and Dave says not enough energy to be bitten.
Excellent demonstration of a very necessary protection for inductive circuits.
I have made many pulse width modulation power control circuits, mostly with multiple BUZ11 mosfets in parallel, for speed control of electric trams on my 7.25" gauge garden railway.
In every case, I fitted a substantial flywheel diode across the output to the motors (which could draw up to 60 Amps). Even on lower current applications where relays were involved, diodes were a must.
One point that should not be overlooked is the use of fast recovery diodes to handle high frequency switching.
While experimenting with pulse motors back in 2001, I managed to blow both channels on my Velleman PC scope rated at 600V.
The supply voltage I was working with, was only 12V.
As luck would have it, a friend gave me his Tektronix portable that was geared towards auto shops and ignition coils.
It was a life saver sort of thing. It's still working like nobody's business.
Yeah, Dave said you wouldn't blow up the input of your oscilloscope because there is so little energy in the voltage peak. This is true for the resistors in the input, but the frequency compensation capacitors or a (MOS)FET input can certainly be damaged even with a short overload like this.
A lot of automotive relays, especially in expensive foreign cars, contain a resistor snubber. If you replace one in a car, make sure you use a snubbed relay. ECMs are a lot more expensive than the proper relay. There's an automotive diagnostic video on UA-cam telling the story of a mechanic trying to get someone back on the road, after their fuel pump relay went out. Replacement, unsnubbed, American parts store relay worked for a couple of days, then fried the output transistor in the ECM through high voltage spikes.
I actually HAVE been shocked by a relay because of this! Before I fully understood counter-voltage spikes, I couldn't see why a little battery powered circuit was able to zap me!
Yes I shed to feel it as a kid messing about and always wondered what it was lol
OK, how 'bout listening to a legacy one-tube radio with earphones? The 22.5 V B+ lead went to the phones, and I got zapped when I opened the phone connector. SURPRISE! Some phones actually had EXTERNAL screw terminals! Duuuh?
That was an eye opener. When I started watching, I was thinking to myself, I know all about Back EMF, but I decided to carry on watching anyway, because Dave is always one step ahead of me. So you start out with this little power transistor, and I am saying to myself, Yes, I know all this. But when you put that HF transistor in, I was fascinated. I have never seen that before in all my years in my career. What a great lesson. You are never too old to learn.
With the PN100 in circuit You created a source of QRM (man made noise) on the 160m amateur radio band. Shows just how important it is to get the little things right to avoid all sorts of unwanted 'magic' and unintentional RF noise.
Love the Australian humor...the 50 ohm signal generator termination...I thought the emitter current wasn't exactly the same as the collector...lol
I just played with some littlte Omron PLC switching a 7 watts DC solenoid...we had 10 systems returned for failed closed contacts...the solenoid had no snubbler...I tired to cycle and repeat the failure measured -375 volt reverse spike when opened...relay cycled 1.5 x 6....I was advocating a snubber...& 1N4002 clamped it good enough...it was their design....that valve might be opened 4 times a day in its life...so probably the contacts were being eroded..but not the reason for failure on install for PLC relay Q3.
What could it be? Ah...there is another solenoid..a N2 purge...that had 8 foot cable from the Q3...and is also was cycle tested unclamped...two 7 watt solenids ran 600,000 cycles without a failure...humm...then found if the 8' cable to N2 was shorted..I got the relay contacts to weld closed in 5 cycles...the little 24 VDC switcher could supply 5A continuous and lots of fat filter caps...before it foldedback...to save itself...
At the end of the day...a i am almost sure a new hire was installing the unit and was powering up before terminating the N2 solenoid..and we didn't always do a good job separating the wire ferrules after final test on that cable...before shipping....
Problem went ...quietly away..
No snobbery clamps were installed...let it just radiate...
Good job...on BACK EMF
Without the flyback diode, the energy stored in the coil dumps much more quickly because there are 90V at the end of the coil terminals instead of 0.6V, as a result the contacts slams really hard.
How badly can this slamming damage the contacts? The clunk-clunk sounds was really cool. Thanks Mr. Dave!
@@bsodmike It doesnt. Instead it REDUCES contact wear because any arc gets extinguished faster.
Saying to just always add a diode is not the best advice. For example just a Resistor, an RC snubber, or Zener diodes can all be better options than a flyback diode. Plus you cant use a normal diode for AC relays.
@@Basement-Science Thanks appreciate your response :)
Recovery snubber is the way to go. It reminds me of playing with old pulse motors and how guys were using the back emf to recharge batteries etc. The high rate of change produces the high transients which could do things like weld reed switches together after the bit of plasma in the discharge created enough heat at the contacts.
You can even see that the throw of the relay changes. If you look closely the armature actually goes up until it contacts the top of the enclosure.
Excellent video! Clearly explained with great visual aids from o'scope making this one of the most practical explanations of the laws governing back emf.......without all the math!
No need for the math, you just need to know how it relates to the formula.
This is one of the first principles I had to deal with in my profession. A horn relay can have one of the biggest pulses.
I blew up a micro-ohm meter measuring the dc resistance of a microwave oven transformer primary. Yes it was the back-EMF did it. Kelvin clips interrupted the test current without isolating the voltage measurement. BTW it was about 6 ohms for a 240V primary! 😢
I knew the laymans version of this but you gave me the back story.. Thanks Dave.
hey Dave, excellent video, OF COURSE!!! thank you for your time and talents!!! mike
The best video on back emf suppression ever. Terrific video Dave. How about a deep dive into Hbridge design?
Yeah!
Back EMF can be a valuable safety learning tool. My collage instructors son didn't think a plain 9v battery and a "coil of wire" could possibly hurt him, the shock he received was a very valuable learning experience...
Hurt as in EGO?
but i didnt see any oscilloscopes go pop!...
...oh wait..thats another channel! :P
thanks Dave
Iiiiiiiii aaaainnt aviinn it!
@@digitalradiohacker wheres my hammer!
When I was starting my electronics experience ( after uni, because they didn't teached us that), while designing my first prototypes of a AHU control PCB I got a such strong kick back it restarted the microcontroller on the board. took me a while to to realize that I need a diode on every relay and that I have those in the uln2003, just needed to connect the com pin to relay drive voltage. And thinking of it now I remember that my father told that the spark on the motorcycles ignition coil sparks when the contacts on the crank position sensing thingie opens. Took a good 15 years to wrap the experiences and data together.
Here's a related "Trap for young players", and I saw this a lot when I did PLC work on industrial equipment, the back-emf diodes we had were on the output side of the relay that was driving large solenoids, plus of course the back-emf diode on the relay itself... These were circuits that had to perform millisecond sensitive operations, and the snubbers would not change how long it took for the relay or the coil to energize, but they'd significantly affect the time to de-energize and would limit the frequency and minimum reliable pulsewidths you could run because they'd hold the relay and solenoid open for longer
Ideally (at least for our application) you would chose the maximum value Zener diode that still protects your circuitry, the higher you can allow the back-emf the faster things will respond
In an application where fast switching times is needed, mechanical relays is probably not the best choice anyway
- physically move contact still takes ages, compared to using semiconductors. But if just a freewheeling diode is used, that also means the current gradually goes down, which could cause slow contact separation and that could be a problem (especially for bigger relays that switches high loads). Even if turn off delay is not a problem, arcing at the contacts may be.
I got quite impressed by that "RF transmitter". My experience is that the transistors just fail - not that they "break down" and recover repeatedly like that.
But it's apparently not the high voltage on it's own that causes them to fail - but rapid heating from huge internal losses. In a low power circuit like this, where the energy stored by the inductor is very low, as well as the average power dissipation (due to the very low switching frequency) - there is no significant heating anyway. Interesting with the mic at the end also - the RFI-clicks could clearly be heard. Funny that it was a Rode mic - those seem to have bad shielding against RFI in general (they pick up a lot of noise from cellphones and other stuff)
@@Speeder84XL yeah, relays are a bad choice, but they managed with what we needed from them.. I'm sure that now they're using solid state or better.. this was 15 years ago
@@Rx7man Yeah.
I was also just thinking that even if the switching can be made faster, it will probably still take 10 ms or more to switch on or off
- which feels like an eternity when it comes to fast switching in electronics.
But I can think for example an elevator that uses relays. If it travels for example 2 m/s and the switching time is shorted from 50 ms to 15 - that makes 7 cm less motion before the motor is disconnected (which makes it significantly easier to set it to stop in the right place). Same applies for other machines moving as well.
So, even for applications that don't need to be switched in micro or even nano seconds (as they could using semiconductors), 10's of extra ms can still have quite a significant impact.
And for the last part, mechanical relays are not always bad - for high power stuff that doesn't need to be switched very often and very fast, they may still be the best choice. Because metal to metal contact have almost no forward voltage drop and very small losses at on state. The down side, is mainly slow switching and mechanical wear in applications where they switch on/off very often.
@@Speeder84XL In my case, it was a piece of packaging equipment that needed to spray a glue pattern down on a moving piece of cardboard.. the most important thing is consistency, and the longer the delays on switching, the more inconsistency you can have with varying input voltage, temperature, etc.. the relays we used were small 24V ones and they were really quite fast, I'd say probably around a couple ms to turn on at most, and maybe double that to turn off.. As long as the box was moving slow, or was a large box, it wasn't bad, but when you were trying to crank up a small box to 60/minute, timing gets super critical or you get glue all over the place where you don't want it
Here's one of the big machines I worked on ua-cam.com/video/mQukx2IyyL0/v-deo.html
@justan idiot Ok, that was quite interesting. But I can think that the rise time may in fact be very short when using physical contacts. Once the conducting parts come close enough, current quickly start flowing. (even at a very low voltage the air will break down when the gap is small enough and form an arc/spark, that can allow for a very rapid rise in current flow)
Most of the "switch on time" in a relay happens before the "rise time" though (the time it takes from applying voltage on the coil until the circuit it controls is fully on, is whats's interesting for most applications). Also, it's much harder to "turn off" when using physical contact - because there is always some arcing (which can cover much larger gaps when the contacts is moving apart) before the current stops. The fall time, is always very much longer than the rise time.
440 Hz is quite impressive for a mechanical circuit though - much faster than what could be possible with a solid state relay in fact, since those can only turn off at a zero crossing of the AC current. Since an AC half wave on mains frequencies is 10 ms for 50 Hz (or 8 1/3 ms for 60 Hz), that's the time it may take to switch off those (so theoretical maximum repetition rate is twice mains frequency - 100-120 Hz)
You are incredible Dave, why I did not had professors like you or your knowledge and caliber, it really counts, thank you.
In junior high I bought a plastic sandwich box, put 2x 9v batteries and a relay (wired to oscillate) inside, on the outside put screws as terminals and a red button. It was fun to test for how long people could withstand the shock, and buzzing of the relay made even more hilarious. It taught me that people have vastly different electric shock threshold.
I did this in 5th grade and wired it up to the 3v side of a 120->3v transformer. What a messed up childhood
Great video and very detailed explanation. The simple flyback diode can saves a lot of trouble in relay driving circuits. I destroyed a 3 phase 25 kVA generator winding by arcing out some old MOT's in a three phase arrangement. as soon one of the MOT's primary winding went open circuit, flames shot out of the generator winding vents. Hindsight, I should have used a load bank in parrallel or a snubber/surge protector across each phase. Expensive lesson learnt.
700 volts - ouch. Now I know why I blew so much TTL up as a kid.
That was a lot more fun than I expected.
Being able to monitor reverse EMF was interesting, didn't expect such a high voltage from such a small coil.
Being an 'old school' motorcycle mechanic I don't get to use oscilloscopes and have to use a peak voltage adapter in an ordinary meter which tends to average out max voltage. I have only seen 318v on a 12v system but now I'm sure it was much much higher.
Thanks for an interesting vid. I'm off to see the Fluke meters next.
Dave: You are a blessing to a guy who never finished high school and loves electronics. Also, I wish more teachers would use "E" for EMF instead of "V" for volts.
Volts and EMF are not the same thing. Voltage is a potential difference where emf is a difference in voltage which can do work.
@@jimmysyar889 Again...Should've stayed in school. Thanks!
I like the way you wrapped up it all up in the end by mentioning another 3 snubber methods. Very useful stuff for electricians.
I remember in my basic electronics lab course we used a transformer, a neon lamp (80V indicator neon lamp as I recall), and a push button switch to demonstrate flyback voltage. Someone in my class hooked up the transformer backwards (and used 120VAC wall voltage instead of our 12VDC power supplies) and ended up getting a large enough flyback to explode his neon lamp (and push button switch). After that we joked with him that he left his shadow on the wall behind him from the flash.
I've had to deal with back EMF when building my DIY spot welder.
The solution i came to was to connect a zener diode between the gate and drain, and by choosing the zener voltage accordingly i could make my MOSFET assembly turn on whenever the gate voltage exceeded the supply voltage. A schottky diode was added in series with the zener to prevent the MOSFET from dragging the gate voltage down.
Handling over 900 Amps of back EMF is no easy task but this solution did it beautifully.
In your case you could omit the second diode so that the transistor would limit its base current and prevent saturation, which you mentioned can slow the switching down of the BJT.
Doing it this way you only need to worry about the energy dissipation and supply voltage, because you know that your switching transistor can handle the current already. :)
Fantastic presentation Dave, really appreciate that you've started to go back to these super educational pieces than just the Mail bag serious or tear downs - sure, I enjoy those segments to bits - but knowledge nuggets like this, with your style of presentation are hard to beat and look forward to a lot more in this direction!
Now, how about we wire up a beefier inductor, to a transformer (more windings on the secondary) and a potato. Let's see if we can let the magic smoke out of the potato. Tee hee!
Wow, as an engineering student, I would have learned useful stuff in circuits if you had been the professor. You incorporate the theory into the practical with great visuals, demonstrations, and clear explanations. Thank you!!! This should be a tutorial on how to make a teaching video!
I love the sound of relay to the point that i treat it like a musical instrument, made a relay board for some effect production
Homemade metronome!
I know of one computer (HP2114, from 1970's) that used a "clicker" open frame relay to indicate soft button presses. I suspect it didn't have a full snubber (maybe a zener) to maximize the sound generated.
I like to add a low-value resistor in series with the back-EMF diode, on the order of 10-100 ohms. It allows the diode to snub the voltage spike at a higher value, still within the maximum C-E voltage rating of the transistor, but it dissipates the energy in the relay coil faster, allowing the relay to drop out considerably quicker. This reduces the chances of damaging contact arcing occurring in the relay.
I've built a few linear power supplies and ended up putting some high voltage ceramic caps across the diodes to help smooth away the spikes caused by the switching action of the does in the rectifier.
Wrt the microphone, I reckon there is electromagnetic noise that is suppressed with the clamping diode, and that the mic is picking that up. Also potentially some arcing in the relay.
Mic (or the associated circuitry) picking up the electrical spike is my guess, too. Bonus reason: it's the drop-out side of the cycle that gets louder, and that's where the spike happens. (Of course, the pull-in side of the cycle shouldn't be in any way affected by the diode.) Mostly, though, the extra noise sounds more electrical than mechanical, somehow.
Nice enthusiastic paresentation. We learnt about back EMF at college (millions of years ago) but have never really seen it in action. Thank you!
great! thanks for sharing this -- it is easy to overlook this as a problem in design!
Like the way Dave explain things.
He makes it simple and very easy to understand. Appriciate it.
Thank you.
I've always had hard time hearing things like "the voltage must rise to obey Faraday's Law". No. It does not rise because of Faraday's law but Faraday's law perfectly describes what is going to happen. That is the order of "status", the laws we have FOUND, not made. Nothing follows our laws, our laws follow what is happening. I remember having this been a problem all the way the first year of EE, as our teacher approached everything from that angle, "X happens because of Y law".
In the second year i got a different teacher and he approached everything from the opposite angle: X is going to happen and this law is formed to explain it. He was actually a lab teacher. The first teacher didn't do anything but theory so very single equation was presented in the FULL form, then simplified to the thing we will use. He caused so much confusion in a subject matter that is at the core of understanding electricity. He was a bad teacher anyway, each question was answered "it is in the book".
Whatever floats your boat.
When it's across the horizontal output and flyback of a CRT set it's almost always called the damper, and in some sets (mostly older tube sets) it dumps into a big capacitor to develop the boosted B+ voltage for the horizontal/vertical output. Which is why when you had a weak damper tube, the telltale symptom was a small picture that didn't fill the screen.
In the secondary winding of the flyback, those big pulses (and the resonant frequency of the transformer) is what develops the high voltage for the CRT, not just the ratio of primary to secondary windings. In fact, in some designs it worked a little too well. There was a "critical safety" snubber cap in addition to the damper diode to keep the HV down. If the cap failed shorted or open, it would kill the HV. No worries. But that's not what happened. The caps changed in value and let the HV climb until something blew, and that something was often the neck of the CRT. Lots of infamous TV set fires started that way, not to mention getting free whole-body X-rays at home.
You should have fire up a MW radio, and tune to 1.5MHz. Ahhh.
AM radio in US. And you don't even need to tune to exact frequency for a square wave... Plenty of harmonics there, so this would be broadband!
@@nameredacted1242 AM is also LW for all of us I think. As MW and SW, (Long/Medium/Short Wave), which are all a specific frequency band. AM is the way it is modulated, as FM is. When a radio has only one AM frequency band (most likely MW) manufacturers (can) use AM as a name, opposite to FM.
German radio's use UKW for FM, Ultra Kurtze Welle (ultra short wave). Beside that Lange Welle and medium Welle have the same abbreviation as in English.
But I guess you know....
@@erikdenhouter What I meant was "a commonly available AM radio"... LW MW SW coverage by a radio is a much rarer appliance for most people...
Yes, I thought he might have done that to show us.
Every time i have a problem Dave comes in explains the thing and saves the day.
Just yesterday i was talking about this with my boss, he told me that every professor explains back EMF on inductors wrong, he had difficulties to understand it for weeks until he reached a explanations and when talked with his tutor about it, the tutor explained that it was true but people wouldn´t understand it that way as it was a basic level class.
The explanation says that the Inductor doesen´t magically generate a reverse voltage on its own, its the current trying to continue flowing forward that tries to find a path, as the path is not found the voltage rises and rises until a path is found, (it might even be the impedance of the air ) then the current is dumped trough that path and thus you now have the inductor working as a current source powering a impedance( whatever is working as the path for the current) so now the voltage across the coil is reversed since it was a load and now its a source.
i still don´t think i fully understand it, it might be from the years i thought of the magical voltage veresing explanation but it makes complete sense.
Don't let physicists (and managers) in the lab!!! They can stay at their desks and theorize, and please don't touch any of my lab equipment if you are not a technician!!!
Back EMF is somewhat analogous to the water hammer in pipes. Once the flow of electrons is stopped by brutally opening the transistor, inertia pushes the electrons still in the inductor to flow to the positive rail, leaving a 'vaccum' behind. When the 'vaccum' is strong enough, it will suck the ground electrons through the transistor junctions.
Plumbing helped me a lot to understand analog electronics when I started working in this field.
@@nameredacted1242 Well, he is my boss at the I+D department, he is the one that designed the new generation of flyback power supplies that will be released in the next months and are absolutely nuts how powerful and precise they are.
As soon as they are released i´l post here the link to the specifications but can´t say anything right now due the NDA i signed.
If he says so, i believe him, he´s an electronics engineer but ALL of his designs are based on the absolute math basics of every component, not the equations in the datasheets, those are simplifications as he already demostrated me lots of times.
I asked my power electronics professor back from the uni and told me the same, i STILL have difficulty in completely believing them but again, it makes sense.
I inadvertently discovered back EMF when I was a kid, after realising that I could configure a relay to act as a buzzer, passing one of the power lines to the coils first through the normally closed switch pair.
Thought it was fun that I was able to make a buzzer, then realised that it was even more fun to touch the coil contacts to get myself zapped!
Was high enough voltage to cause my finger to spasm.
Coils are still somewhat mysterious for me. You store energy in a magnetic field, that expands into the universe with the speed of light. How can you retrieve that energy almost instantly?
Because the vast majority of the energy never goes far, it stays in the air gap between the ferrous particles.
Radiation only occurs when the field is changed over a distance that is long compared to the time it takes.
The universe is a magical place.
there should be nothing. A void.
Yet here we are!
Only a part of the magnetic energy is radiated off that cannot be recovered; that happens when the magnetic field is changing. The stored energy that is recovered comes from the DC magnetic field and when that collapses part of it also gets lost in the form of radiation.
Energy storage and energy transmission are separate concerns. Energy transmission (electromagnetic wave propagation) happens when things change. So each time you charge or discharge a capacitor or an inductor, the dynamic part of the electric and magnetic field induce corresponding changes in each other, and those propagate out. But energy storage is a static phenomenon - once a steady state is reached, a certain amount of energy is stored as long as that steady state persists. Most coils and capacitors are very poorly coupled to the free space (by design and happenstance), and thus most of their energy is typically retained in spite of dynamic changes. If you couple a capacitor or an inductor well to free space, a lot of the energy can be radiated out the antenna rather than flowing into other parts of the circuit. This can be seen easily when you have an LC tank with high Q corresponding to long oscillation decay time constant. Once a matching antenna is attached, the Q can be lowered by an order of magnitude or more - more the wider the bandwidth of the antenna and the matching network, since at low Q the effective frequency also changes quite a bit. In circuits that are reasonable to construct, the Q can be lowered to low single digits that way. If the matching network and antenna have low losses, a large fraction of energy stored in the tank can be radiated out :)
Brilliant, and thank you. I'm a complete ignoro-noob but can see the goodness and importance of this.
So that’s why big DC contactors have a varistor in parallel to the coil! Thank you so much!
BTW, isn’t it the way old school gas engines points ignition works?
Yep! And that's also why timing on them is so so important.
The "points" are actually on the Transistor's place in the car's ignition....so no, not the same thing.
@@nunamvseravno what does points mean on this? I had assumed that was a typo.
@@nunamvseravno Points were used before electronic ignition (transistor) came along.
It had platinum contacts. Before your time.
That's fascinating! Thanks for that, I'm sure I've used relays in the past and not bothered to prevent back emf!
26:10 the current probe is not in the right place on the schematic. It should be in the loop made of the inductor and the diode...
I mentioned that several times. I didn't want to have to redraw the whole thing.
I have an antique "Hipps Toggle" electric clock patent 1896 that runs on 3v that the back EMF packs quite a punch. I was holding the wire when the contacts opened once. It hurt! The back EMF actually makes the magnet coils thump when the contacts open.
we used to call it the MF Diode... like in m0ther *** .... because a student didn't want to put it in the design (replaced it with a resistance ) ... so the team leader just said ... put the M*F* Diode
Ironically, the resistor actually can work if done right, as mentioned in the video.
@@EEVblog You get a good number of automotive relays with the resistor in there, done for exactly the same reason to reduce back EMF without needing to add any extra parts in the vehicle. Do not change for a version without the resistor, because it will cause issues in a lot of cases.
@@SeanBZA The relays used to have a diode across them, back in the day when people paid attention to the way they wired them into the circuit.
If you need to stop the inductor current quicker, increase the diode voltage with a series Zener or R||C snubber (inset at 8:15). Keep in mind that the V_CE (or V_DS) will also increase.
In the 70's Spencer Gifts sold a prank cigarette lighter which used a small relay to give you a pulsating AC shock. I recreated the circuit for other pranks.
Thank you for the informative lecture professor Dave.
Flyback can also be your friend if you need to an easy, inexpensive way to create a voltage - like a for a spark plug or a CRT. The technique is also used for boost converters to avoid using a transformer.
Finally a video where we did not saw the brymen bm786 toy. Great content, thank you!
I did this exact thing when building my super cap spot welder, i put in a single diode across the coil, and a diode and tvs diode across the welding leads to prevent the contacts from welding themselves together, this combination was a compromise on the voltage spike across the contacts and the time it took for the solenoid to disconnect, around 11mS and +/- 20V.
I also had soo much energy from those super caps i had to increase the length and decrease the cable cross section, actually using the cables themselves as a current limit because otherwise it was too much energy from those caps and just blowing metal apart and creating holes in 1mm aluminium. I also had a timer feeding the solenoid so i could adjust the on/off time for the spot welder.
I enjoy your presentation's, They are always educational. I have been in electronics, sense the early 60's, first as a T.V. tech, then in later years, as a land mobile tech, for Motorola, and at 80 Yrs. i still find that I don't know every think, so thank you for the knowledge you share.
The energy built-up in the coil discharges very quickly, which for a moment, creates a stronger magnetic field that pulls the relay contact faster and harder, making the sound louder. However, I also think the actual magnetic field collapsing is getting picked up by the coil in the microphone as well. The louder sound is partially the hard knock of the relay switching harder, but unless it's so loud the audio is clipping, I think I hear the snap of the magnetic field in the audio. It's hard to say for sure, but that's what it sounds like.
Great video! Love these sort of fundamental type videos you do. Usually stuff we all/most are aware of, but the deep look on the oscilloscope and intricacies of it are fascinating when you present it like this.
Superb tutorial on the effects of back emf. Those expanded scope traces are amazing to actually see. A bit surprising the transistor didn't get destroyed by almost 3x the max rated
voltage, even though the current is so low.
Good. Interesting. It deals with a much overlooked subject, and the comments on flywheel time are good. I liked the demonstrations of the effects of spring energy in modifying the waveforms. I should like to add a little detail however:
1 - The back-emf at a perfect switch-off would aim for V=I×squroot(L÷C) where C is the total capacitance, ie coil self-C plus stray C. So no infinity, sorry.
2 - Replacing the perfect switch with a transistor and nothing else will cause the transistor collector V to rise until it breaks over the transistor's collector-base voltage which acts like a zener diode. Like the man said.
3 - As another commenter has said, a zener diode can be used to clamp this flyback voltage to a value somewhat below Vceo. The higher the flyback voltage (eg high Vceo transistor with high voltage zener) the shorter the flywheel time, because there's a fixed energy in the inductance (plus contact spring etc if present), and the rate of energy dissipation is proportional to this voltage.
4 - For really heavy-duty flyback limiting. connect the zener cathode to the collector and anode to the BASE. This creates a fast, high-power zener. The transistor must have sufficient power rating, but it beats trying to find a high-power zener.
5 - I've had fairly large telephone relays driven by unprotected transistors pulsing away for hours on end with no apparent problem, but any reliability engineer will tell you that even a single break-over of the c-b diode permanently compromises a transistor's reliability.
6 - In 1967 I was required to adapt an echo-sounder for shallow water readings. The instrument used a single audio transducer for transmit and receive. It had a post-office type relay to switch the transducer from the power driver output to the high-sensitivity receiver input. The flywheel time was so long that the bottom echo was not received: it had arrived during the flywheel time. I cured it by omitting the flywheel diode and used the highest voltage approved transistor available to me - around 120V. And this was my first introduction the this kind of phenomenon.
7 - A factor ignored in this video is current induced in the iron. Some energy is dissipated by the iron core acting as a shorted turn. This effect will actually prolong the flywheel time as it represents a low-resistance, low voltage path just as the simple flywheel diode did. I found this effect with iron-shrouded solenoid valves to completely take over from the electronic circuit at switch-off. They took over ¼sec to close after the end of their drive pulse. This was 1970.
I'll be 80 on Thursday!
one of the most interesting practical video I've came across. Excellent job, thanks!
Real world experience. The robot I worked on used an audio sampler on a midi interface ( to play music clips etc) , and had a water valve actuator. I was new to the job, and experienced random samples playing, when the water squirter was switched on and off. Not really wanted behaviour. The small water valve had a solenoid, and I figured that the solenoid coil switch-off spikes ( as Dave so ably demonstrated) were enough to cause the sampler to switch on, despite the water squirter being on 12 volts, and the sampler on 9 volts. A simple diode fixed the problem.
Thanks for the informative video. I wasn't aware of Back EMF. There are a couple projects I did that need modifications now.
Thanks for the young player trap info, I will say most Tech's know very little about why fly back issues can shorten component life. Most get basic idea, your complete demo with scope-well-The BEST. I to this day do not know what a dc brushed motor, (24 volt 5amp drill), can do to the electronics of todays smps. that is raw motor, tear down stuff. Would it require a special tongue angle?
No wonder I have shocked myself with the relay switch - I figured it would have to do with the inductance of the coil. Good explanation!
That was a good demonstration, a very nice use of your osciloscope and probes!. I had to figure this out the hard way years ago, when trying to accelerate relay switching for a UPS circuit. Very good work!
07:15 this arrangement is used in many HE (High Efficiency) LED lamps, where not only the current being drawn through the inductor is used, but also the energy stored in the inductor is used as well. Bigclivedotcom has taken apart many a lamps with this configuration with buck or SM PSUs
I enjoy HV stuff. Been nailed off of 12VDC through an inductor many times. As field collapses... 90 volts easy all day long. Smart video sir
That answered a question or two about flyback diodes and learned another bunch of stuff too. Thank you Dave
We always called that diode a counter-EMF diode. Learned about that little guy in the Navy electronics school AV-B. And that magnetic field collapse will zap you a little if the diode goes bad. Learned that the hard way too. 😁. I think the US Navy had the 1N914A designed just for this purpose, because we had thousands of those diodes all over the aircraft. But, that’s supposition on my part. 🤔
Outstanding video!! Thanks Dave!!
5:30 like a charge pump. As the field collapses it keeps moving those electrons, raising that voltage until _something_ gives!
The down side to any coil snubber is the longevity of the drop out, this causes premature wear in the contacts. Best circuit I have used is a diode and resistor in series, then you can fine tune the circuit by altering the resistor to get the least drop out time and least voltage spike.
Nothing else has been better, TVRs VDRs Zeners, non as good.
The other thing to watch is collective dropout, if you have a series of relays, say three or four the delay can run into many 10s of mS.
When controlling pneumatic valves its good to have the same use as well, although then its usually ok to just have a diode, as the difference for a valve of a few mS is not as critical.