Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Electronics Basics

Flyback Diode: Protecting Relay and Motor Driver Circuits

Flyback Diode: Protecting Relay and Motor Driver Circuits

March 11, 2026 /Posted byJayesh Jain / 0

If you have ever had an Arduino, ESP32, or transistor mysteriously die after driving a relay or DC motor, there is a very good chance it was killed by a flyback diode — or rather, the absence of one. The flyback diode (also called a freewheeling diode, snubber diode, or suppressor diode) is one of the most important yet overlooked protection components in any circuit involving inductive loads. This guide explains exactly what a flyback diode does in a circuit, why it is essential, and how to select and place one correctly.

Table of Contents

  1. The Problem: Inductive Kickback Explained
  2. What Is a Flyback Diode?
  3. Flyback Diode in Relay Circuits
  4. Flyback Diodes in Motor Driver Circuits
  5. How to Select the Right Flyback Diode
  6. Correct Placement and Orientation
  7. Alternatives to Flyback Diodes
  8. Common Mistakes and Troubleshooting
  9. Frequently Asked Questions

The Problem: Inductive Kickback Explained

To understand why flyback diodes exist, you must first understand inductive kickback. An inductor (a coil of wire — including relay coils, motor windings, and solenoid coils) stores energy in a magnetic field when current flows through it. The energy stored is:

E = ½ × L × I² (where L is inductance in Henries, I is current in Amps)

When you suddenly switch OFF the current (a transistor turns off, a relay control switch opens), this stored energy must go somewhere. The inductor fights the sudden change in current by generating a voltage spike — sometimes called a back-EMF spike — in the opposite polarity to the original supply voltage. This spike can be:

  • Extremely high voltage: Spikes of 100V–400V are common when switching 12V relay coils with fast transistors. The spike magnitude depends on how fast the current is interrupted: V = L × (dI/dt). A transistor can switch in nanoseconds, making dI/dt enormous.
  • Short duration but high energy: Even a 1ms spike at 200V carries enough energy to destroy a GPIO pin rated at 5V absolute maximum.
  • Radiated EMI: Fast voltage spikes radiate electromagnetic interference that can corrupt nearby SPI/I2C communication or reset a microcontroller mid-operation.

In India’s maker community, fried Arduino Uno boards from unprotected relay modules are extremely common — almost a rite of passage for beginners. The flyback diode prevents all of this.

What Is a Flyback Diode?

A flyback diode is a standard rectifier diode placed in reverse bias (reverse parallel) across an inductive load. During normal operation, it is reverse-biased and passes no current — it is completely transparent to the circuit. When the inductive kickback spike occurs (reversing polarity), the diode instantly becomes forward-biased and provides a low-impedance path for the stored inductive energy to circulate as current through the coil and diode, dissipating harmlessly as heat in the coil resistance.

This process clamps the voltage spike to approximately +0.7V above the supply rail (one diode forward drop), protecting every component connected to the switching node.

The name flyback comes from flyback transformers in old CRT televisions, where similar energy recovery principles were used. Other names include:

  • Freewheeling diode — describes the current circulating freely through the coil
  • Catch diode — catches the energy before it can damage anything
  • Suppressor diode — suppresses the voltage spike
  • Snubber diode — though technically snubbers are RC networks; the term is sometimes loosely applied
BC547 NPN Transistor

BC547 NPN 100mA Transistor TO-92 (Pack of 10)

Use a BC547 to switch relay coils from 3.3V/5V microcontroller GPIO pins. Always pair with a flyback diode across the relay coil for safe operation.

View on Zbotic

Flyback Diode in Relay Circuits

Relay circuits are the most common place you will use a flyback diode in hobbyist electronics. A typical relay control circuit using an NPN transistor looks like this:

+12V ────────────┬─── Relay Coil ───┬────────────── Collector (NPN)
                 │                  │
                 │           D1 (1N4007)         ← Flyback diode
                 │           Anode at Collector
                 │           Cathode at +12V
                 │                  │
                 └──────────────────┘

Base ←── 1kΩ ─── GPIO (MCU)
Emitter ─────── GND

The flyback diode (D1) is placed with its cathode (+) at the positive supply rail and its anode (–) at the collector (switching) node. This is reverse-biased during normal on-state operation. When the transistor switches off:

  1. Relay coil current tries to continue flowing (Lenz’s law)
  2. Collector voltage rises rapidly (would normally spike to hundreds of volts)
  3. When it reaches +12V + 0.7V = 12.7V, the flyback diode conducts
  4. Current circulates through the coil → diode → +12V rail, dissipating energy in coil resistance
  5. The transistor collector never sees more than 12.7V — safely within any typical NPN transistor’s VCEO rating

The relay pull-in and release times are slightly affected by the flyback diode. With a flyback diode, energy dissipation is slower (lower dI/dt), so the relay releases slightly more slowly (~5–50ms longer). For most applications this is irrelevant. If fast relay release is critical (e.g. safety systems), use a Zener + diode combination (explained in the alternatives section).

Flyback Diodes in Motor Driver Circuits

DC motor windings are also inductive loads. Every time PWM switching changes the motor current, a kickback occurs. Motor driver ICs handle this in one of two ways:

Integrated Flyback Diodes

Most modern motor driver ICs (DRV8833, TB6612FNG, L293D, L298N) include built-in flyback diodes (also called body diodes or free-wheeling diodes) across each switching transistor. These are rated for the IC’s current rating and work for motors within specification. You do not need external flyback diodes with these ICs under normal operating conditions.

When External Diodes Are Still Needed

  • High-current motors: If motor peak current exceeds the IC’s built-in diode rating (e.g. stall current spikes), external diodes in parallel reduce stress.
  • Discrete transistor H-bridge circuits: If you build an H-bridge using individual MOSFETs (IRF540, IRLZ44) without integrated gate drivers, you must add external flyback diodes across each MOSFET’s drain-source unless the MOSFET datasheet confirms adequate body diode current rating.
  • Relay-based motor direction control: Old-school motor control using two relays and a switch still needs flyback diodes across each relay coil.
2N2222 NPN Transistor

2N2222 NPN Transistor (Pack of 20)

A classic general-purpose NPN transistor for switching relay coils, solenoids, and small motor loads. Always use with a flyback diode for reliable, long-lasting circuits.

View on Zbotic

How to Select the Right Flyback Diode

Selecting a flyback diode involves three key parameters:

1. Reverse Voltage Rating (PIV / VRRM)

The diode must withstand the supply voltage in reverse bias. Use a diode rated at at least 2× the supply voltage as safety margin. For 12V relay circuits → minimum 24V rating. The 1N4007 (1000V) is often used simply because it is universally available in India for ₹1–2 each.

2. Forward Current Rating

The diode must carry the full inductor current when conducting. For a relay coil drawing 100mA, a 1A diode like the 1N4001 is more than adequate. For a motor drawing 5A peak, you need a diode rated for at least 5A (use 1N5408 or Schottky like SB560).

3. Recovery Speed

For low-frequency switching (relay on/off, slow motor PWM below 1 kHz), any standard rectifier diode (1N4001–1N4007) works fine. For high-frequency PWM (above 20 kHz as used in modern motor controllers), use a Schottky diode. Schottky diodes have ultra-fast reverse recovery (nanoseconds vs microseconds for standard diodes) and lower forward voltage drop (0.3V vs 0.7V), making them far more effective at high switching frequencies. Common Schottkys in India: 1N5819, SS14 (SMD), SB540.

Diode Type VRRM IF Best For
1N4001 Standard 50V 1A 5V relays, low freq
1N4007 Standard 1000V 1A Any relay up to 400V coil
1N5819 Schottky 40V 1A High-freq PWM, 12V motors
SB560 Schottky 60V 5A High-current motors, SMPS

Correct Placement and Orientation

Getting the orientation right is critical. Placing the flyback diode backwards will short the power supply and immediately destroy something.

The rule: Cathode (marked with a silver/white stripe on the diode body) goes to the POSITIVE supply rail. Anode goes to the switching node (transistor collector or drain).

Physical placement tips:

  • Place the diode as close as possible to the inductive load (relay coil or motor terminals), NOT near the transistor. The goal is to minimise the loop area of the spike-suppression current path.
  • On a breadboard, place the diode directly across the relay coil pins or motor terminal strip.
  • On a PCB, keep trace lengths from diode to coil terminals under 20mm.
  • For SMD designs at high frequencies, use SS14 or similar SOD-123 Schottky diodes and place them directly at the load pads.
10CM Male To Male Breadboard Jumper Wires

10CM Male To Male Breadboard Jumper Wires – 40Pcs

Build and test your relay flyback diode circuits on a breadboard quickly with these quality jumper wires. 2.54mm pitch fits all standard breadboards.

View on Zbotic

Alternatives to Flyback Diodes

While the simple flyback diode is adequate for most applications, sometimes you need more sophisticated suppression:

1. Zener + Diode Combination

Place a Zener diode (say, 24V) in series with a standard diode in the flyback position. The Zener clamps the spike at (Vsupply + Vzener) instead of (Vsupply + 0.7V). For a 12V circuit with a 24V Zener, the spike clamps at 36V. This is harder on the transistor than a simple diode, but the inductor energy dissipates much faster — achieving faster relay release times. Useful when you need both protection and fast release.

2. RC Snubber Network

A resistor (10Ω–100Ω) in series with a capacitor (10nF–100nF) across the inductive load. RC snubbers are better at suppressing high-frequency oscillations and ringing than diodes. Commonly used on AC relay coils and transformer primaries where a diode cannot be used (AC reverses polarity).

3. TVS Diode (Transient Voltage Suppressor)

A bidirectional TVS diode is a rugged, fast-acting clamping device. It clamps at a defined breakdown voltage on either polarity. More expensive than a standard diode but excellent for protecting GPIO pins on circuits with long cable runs to inductive loads, where spikes can couple in from both directions.

4. MOV (Metal Oxide Varistor)

Used for AC line transient suppression and sometimes for 230V relay coils. Not suitable as a primary flyback solution for DC circuits — TVS or RC snubbers are preferred there.

100nF Ceramic Capacitor

0.1/100nF Multilayer Ceramic Capacitor (Pack of 50)

The capacitor in RC snubber circuits across relay coils and motor terminals. Suppresses high-frequency ringing that simple flyback diodes do not address.

View on Zbotic

Common Mistakes and Troubleshooting

  • Diode installed backwards: The most common mistake. If your power supply immediately trips or gets very warm when the circuit powers on, suspect a reversed flyback diode. The diode becomes forward-biased at all times, shorting the supply. Always double-check orientation with a multimeter diode test mode before powering up.
  • Diode too slow for high-frequency PWM: If a standard 1N4007 (1µs reverse recovery) is used in a 50kHz PWM circuit, it conducts for part of each cycle in the wrong direction, causing significant power loss and heat. Switch to a Schottky diode.
  • Diode too far from the load: Long wires from diode to relay coil create a significant parasitic inductance in the snubber loop, reducing the diode’s effectiveness. Move the diode as close to the coil as physically possible.
  • Forgetting diodes on all coils: A relay module with 4 relays needs a flyback diode on every relay coil — not just one. Check your relay module schematic to confirm all coils are protected.
  • Assuming motor driver modules include protection: While most IC-based motor drivers (L298N, DRV8833) include internal diodes, some cheap L293D modules omit external motor terminal decoupling. Add 100µF + 100nF across the motor power input on the driver board.

Frequently Asked Questions

Q1: Do relay modules bought from Amazon/Flipkart in India include flyback diodes?

Most commercial relay modules (the blue PCB type with optocoupler) include a flyback diode on each relay coil. Check the module schematic — look for a diode symbol across the relay coil in the circuit diagram. Some very cheap modules omit them to save cost. When in doubt, add your own 1N4007 across the relay coil terminals (the two pins that connect to the coil, usually labelled A1/A2 or visible on the PCB).

Q2: Can I use an LED instead of a diode as a flyback indicator?

Yes, and it is a useful debugging trick. An LED placed in the flyback diode position will glow briefly when the relay switches off, visually confirming flyback energy is being suppressed. Use any standard LED rated at 20mA — the brief flash will not harm it. However, LEDs have a higher forward voltage (1.8V–3.5V) than diodes, so spikes are clamped at a higher voltage. For robust protection, use a proper rectifier diode, not an LED.

Q3: How does a flyback diode protect against EMI?

Fast voltage spikes radiate electromagnetic energy. By clamping the spike to just 0.7V above supply, the flyback diode drastically reduces the amplitude and dV/dt of the transient. This reduces both conducted and radiated EMI on nearby signal wires and PCB traces — important for keeping SPI/I2C sensors working reliably near relay and motor circuits.

Q4: Do I need a flyback diode for solenoids and electromagnets?

Yes, absolutely. Solenoids and electromagnets are highly inductive (typically much more so than relay coils) and generate large kickback spikes when switched off. Use the same approach: 1N4007 for low-frequency switching, Schottky for high-frequency. For large solenoids (12V, 2A+), use a 3A or 5A rated diode.

Q5: Does a flyback diode slow down the relay?

Yes, slightly. A simple flyback diode (1N4007) increases relay release time by 5–50ms in most circuits (depends on relay inductance and coil resistance). If fast release is critical, use a Zener + diode combination (Zener in series with regular diode) to increase the spike clamp voltage — this dissipates energy faster and reduces release time, at the cost of higher stress on the switching transistor.

Protect Your Projects with the Right Components

Get transistors, diodes, resistors, capacitors, and breadboard supplies from Zbotic.in — trusted by Indian makers for quality components with fast delivery.

Shop Protection Components

Tags: flyback diode, freewheeling diode, inductive load, motor driver protection, relay circuit
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
Electromagnetic Brake for DC M...
blog electromagnetic brake for dc motor holding position safely 596942
blog common ground in electronics why it matters in your circuit 596947
Common Ground in Electronics: ...

Related posts

Svg%3E
Read more

Coffee Roaster: Temperature Profile Controller Build

April 1, 2026 0
Table of Contents Why Build a Coffee Roaster? Roasting Temperature Profiles Components for the Build Thermocouple Placement PID Profile Controller... Continue reading
Svg%3E
Read more

Sous Vide Cooker: Precision Temperature Water Bath

April 1, 2026 0
Table of Contents What Is Sous Vide Cooking? Precision Temperature Requirements Components for the Build PID Temperature Controller Water Circulation... Continue reading
Svg%3E
Read more

Kiln Controller: High-Temperature Pottery Automation

April 1, 2026 0
Table of Contents What Is a Kiln Controller? Temperature Requirements for Ceramics Components for High-Temperature Control K-Type Thermocouple and MAX6675... Continue reading
Svg%3E
Read more

Heat Gun Controller: Temperature and Airflow Regulation

April 1, 2026 0
Table of Contents What Is a Heat Gun Controller? Temperature and Airflow Regulation Components for the Build PID Temperature Control... Continue reading
Svg%3E
Read more

Soldering Iron Station: PID Temperature Controller Build

April 1, 2026 0
Table of Contents Why Build a Soldering Station? PID Temperature Control for Soldering Components Required Thermocouple Sensing at the Tip... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now