Engineers sometimes have the tendency to overcomplicate a problem instead of focusing on simple logical solutions. For example, my friend’s motorcycle broke down and he spent hours checking on the battery, carburetor and the electrical system. It turns out that this was all done in vain. We were pretty amused to find out that this mayhem was caused by a faulty fuel indicator, that let his fuel tank run empty.
In electronics, what might seem like a large problem can sometimes have an easy solution. For example, when designing PCBs that have mechanical relays, you can avoid large voltage spikes by adding a flyback diode to your circuit. However, when you have placed a flyback diode on a relay and your controller still keeps resetting, you might need to consider other sources of electrical noise. Like my friend’s motorcycle issue, often times these sources are hiding in plain sight and can be solved with the same noise reducing techniques you’ve applied to your design. Here’s why and how you can use a flyback diode to reduce EMI in your relays, and what you should consider if your design is part of a larger system.
What Is a Flyback Diode and Why You Need It
If you’ve been creating printed circuit boards that feature mechanical relays, then you probably have heard of flyback diode. If you haven’t, then you’ve come to the right place. To put it simply, a flyback diode, is a diode that is placed with reverse polarity from the power supply and in parallel to the relay’s inductance coil. It is used to prevent the huge voltage spikes that happen when the power supply is disconnected. They are sometimes called “snubber diodes” and are a type of snubber circuit.
When the power supply is connected to the relay, the inductance coil’s voltage builds up to match that of the power source. The speed at which current can change in an inductor is limited by its time constant. In this case, the time it takes to minimize current flow through the coil is longer than the time it takes for the power supply to be removed. Upon disconnection, the inductance coil reverses its polarity in an attempt to keep current flowing according to its dissipation curve (i.e., % of maximum current flow with respect to time). This causes a huge voltage potential to build up on the open junctions of the component that controls the relay.
This voltage built up is called flyback voltage. It can result in an electrical arc and damage the components controlling the relay. It can also introduce electrical noise that can couple into adjacent signals or power connections and cause microcontrollers to crash or reset. If you have an electronics control panel that resets each time a relay is de-energized, it’s highly possible you have an issue with flyback voltage.
To mitigate this issue, a diode is connected with reverse polarity to the power supply. No current passes through the diode when the relay is energized. When the power supply is removed, the voltage polarity on the coil is inverted, and the diode becomes forward biased. The diode allows current to pass with minimal resistance and prevents flyback voltage from building up. Hence why it is called a flyback diode.
Tiny flyback diodes prevent huge flyback voltage from damaging your components.
How Electrical Noise Can Interfere with Your Electronics Despite OnBoard Flyback Diodes
You might have thought that placing flyback diodes in your circuit will solve all your electrical noise issues. That’s what I used to believe until I faced a mind boggling issue when a humidity controller that I designed was constantly resetting. This was despite the fact that I placed flyback diodes on every single onboard relay.
The humidity controller was connected to external mechanical relays that controlled industrial heating elements. This routine project turned into a witch hunt for the problem causing the controller to reset. When you have tens of similar setups showing the same symptoms, it’s easy to assume that you’ve messed up the product design.
After hours of trying out various power supplies, cables, grounding methods and electromagnetic interference (EMI) foil, it finally dawned upon me that perhaps it was the external mechanical relays that were causing the problem. True to my suspicion, none of the external relays installed by the third party had any flyback diodes connected in parallel to their inductance coils. The resulting flyback voltages caused electrical interference over the connecting cable and into the humidity controller, thus causing the system reset.
While you have little control over electrical installations performed by the third party, there is no excuse in not adhering to the best practice with flyback diodes in your PCB. For a start, you’ll want to make sure the forward current of the diode is larger than that of the coil. Also, choose a diode that has a reverse voltage that’s higher than the coil’s voltage rating.
The absence of a flyback diode can be your electrical nightmare.
In my practice, I place the flyback diodes as close as possible to the relay. A typical 1N4007 diode serves me well in most applications and it saves me from the problem of having to manually create footprints. More so, having good bill of material software, like Altium’s management tool, makes managing their lifecycle and availability a breeze. This is particularly useful when I repurpose older designs.
Have a question about flyback diodes? Contact an expert at Altium.
Check out Altium in action...
Powerful PCB Design
About the AuthorVisit Website More Content by Altium Designer