A flyback circuit board diode (often called a freewheeling or clamping diode) is placed in reverse bias across an inductive load to safely dissipate stored magnetic energy when the driving current is interrupted. Without it, the collapsing magnetic field generates a high-voltage spike ($V = L \frac{di}{dt}$) that will instantly avalanche and destroy your switching MOSFET or BJT. The direct answer for most 12V DC relay and motor applications is to use a Schottky diode like the 1N5819, wired with the cathode (stripe) facing the positive supply rail and the anode facing the switch drain/collector.
The Flyback Topology: Node Labels and Working Principle
To design this properly, we must define the exact node topology. Let’s map a standard low-side N-channel MOSFET relay driver:
- Node A (VCC): The positive supply rail (e.g., 12V DC).
- Node B (Coil High): The connection point between VCC and one side of the relay coil.
- Node C (Coil Low / Drain): The connection point between the other side of the relay coil and the MOSFET drain.
- Node D (GND): The MOSFET source and system ground.
The circuit board diode is wired in parallel with the inductive load (the coil). The Cathode connects to Node B, and the Anode connects to Node C. During normal operation, Node B is at 12V and Node C is pulled to near 0V when the MOSFET turns on. The diode is reverse-biased and does nothing. When the MOSFET turns off, Node C voltage spikes upward. The diode becomes forward-biased the moment Node C exceeds Node B by the diode's forward voltage ($V_f$), creating a localized loop for the decaying coil current to circulate.
Why This Topology Over the Alternatives?
You might wonder why we use a simple freewheeling diode instead of an RC snubber or a Zener clamp. An RC snubber (resistor and capacitor in series across the coil) requires complex tuning to match the specific inductance and resistance of the load; get it wrong, and you still get voltage ringing. A Zener clamp (a Zener diode in series with a standard diode) forces the coil current to decay faster, which is great for high-speed PWM valves, but it allows the voltage spike to rise to the Zener breakdown voltage (e.g., 24V or 36V) before clamping. For standard electromechanical relays and slow-switching DC motors, the standard freewheeling diode is the undisputed winner: it clamps the spike to a mere 0.3V–0.7V above VCC, requires zero tuning, and costs pennies. For deeper reading on semiconductor switching characteristics, the All About Circuits semiconductor textbook provides excellent foundational theory on junction behavior.
Behavior Table and Extreme Failure Modes
Understanding what breaks at the extremes is what separates a working prototype from a reliable product. Here is the behavior matrix for the flyback topology when components fail or are incorrectly installed.
| Component State | Circuit Behavior | Result / What Breaks |
|---|---|---|
| Normal Operation | Diode reverse-biased during ON state; forward-biased during OFF state. | Coil current decays safely. MOSFET sees maximum $V_{ds}$ of $VCC + V_f$. |
| Diode Open (or missing) | No path for inductive kickback. Node C voltage spikes until it finds a breakdown path. | Catastrophic: MOSFET avalanches and shorts internally. Relay contacts may arc heavily due to slow current decay. |
| Diode Shorted | Node B (VCC) is directly shorted to Node C (MOSFET Drain) through a dead short. | Catastrophic: When MOSFET turns ON, VCC shorts directly to GND. The MOSFET, PCB traces, or power supply will burn out instantly. |
| Diode Reversed | Diode is forward-biased constantly while MOSFET is ON. | Catastrophic: Same as a shorted diode. VCC flows through the diode and MOSFET to GND, destroying the switch. |
| Coil Open | No inductance to store energy. Diode never activates. | Relay fails to pull in. Circuit is otherwise safe; no voltage spike is generated. |
Design Walkthrough: Picking Real Component Values
Let’s design a real circuit using the Omron G5V-2-DC12, a common 12V DPDT signal relay.
1. Calculate the Steady-State Coil Current:
The datasheet lists the coil power consumption at 500mW. Using $P = V \times I$, the steady-state current is $I = 0.5W / 12V = 41.6mA$. The coil resistance is nominally 288Ω.
2. Select the Switching MOSFET:
We need a logic-level N-channel MOSFET. The IRLZ44N is a bench favorite. It has a $V_{ds}$ (Drain-Source breakdown voltage) of 55V and an $R_{ds(on)}$ of 22mΩ at 5V gate drive. It can easily handle the 41.6mA load.
3. Select the Circuit Board Diode:
The diode must handle the peak coil current (41.6mA) and the reverse voltage (12V). A standard 1N4007 rectifier is rated for 1A and 1000V, which is more than enough on paper. However, the 1N4007 has a slow reverse recovery time ($t_{rr}$ of ~30µs). If you are switching the relay rapidly, or if you want to maximize the electromechanical life of the relay contacts, a slow diode allows the coil current to linger, causing the internal relay contacts to arc when they open.
How to Breadboard-Test the Circuit Step-by-Step
Before committing to solder, validate the clamping behavior on a solderless breadboard. You will need a digital multimeter (DMM), an oscilloscope, a 12V bench supply, and a function generator (or an Arduino to generate a PWM signal).
- Wire the Power and Ground: Connect the 12V bench supply positive rail to Node B (one side of the relay coil). Connect the supply ground to Node D (breadboard ground rail).
- Install the MOSFET: Place the IRLZ44N on the breadboard. Connect the Source pin to Node D (GND). Connect the Drain pin to Node C (the other side of the relay coil).
- Install the Diode: Insert the 1N5819 across the coil. Critical check: Ensure the silver stripe (Cathode) is plugged into the same row as Node B (12V), and the Anode is in the same row as Node C (Drain).
- Drive the Gate: Connect your Arduino or function generator to the MOSFET Gate pin via a 100Ω series resistor (to prevent ringing). Add a 10kΩ pull-down resistor from Gate to GND to keep the MOSFET off during microcontroller boot-up.
- Probe with the Oscilloscope: Connect the scope probe ground clip to Node D (GND). Connect the probe tip to Node C (Drain). Set the scope trigger to "Rising Edge" at 15V.
- Apply the Signal and Verify: Send a 1Hz square wave to the gate. When the MOSFET turns off, you should see the voltage at Node C spike to exactly 12.3V (12V supply + 0.3V Schottky $V_f$) and then decay exponentially. If you see a spike exceeding 20V, your diode is either backward, missing, or you are probing the wrong node.
Circuit Board Diode FAQ
Which way does a circuit board diode face on a relay?
The diode must be installed in reverse bias relative to the power supply. The Cathode (marked with a printed stripe on the diode body, or the thick line on the schematic symbol) must point toward the positive voltage rail (VCC). The Anode points toward the switching transistor. If you install it forward, it will create a dead short across your power supply the moment the transistor turns on, likely vaporizing the transistor and melting your breadboard wires.
Can I use a Zener diode instead of a standard circuit board diode?
Yes, but only in a specific configuration known as a "Zener clamp" or "back-EMF snubber." To do this, you place a standard silicon diode in series with a Zener diode, and wire that series pair across the coil. The standard diode blocks the Zener from conducting during the normal ON state. When the MOSFET turns off, the spike must exceed the Zener breakdown voltage (e.g., 24V) before the current can circulate. This higher voltage forces the magnetic field to collapse much faster than a standard freewheeling diode, which is highly desirable for high-speed proportional solenoid valves or fuel injectors where response time is critical. For standard relays, however, the Zener adds unnecessary cost and voltage stress to the MOSFET.
Why is my circuit board diode getting hot to the touch?
A flyback diode should never get hot. It only conducts for a few milliseconds during the turn-off transient, and the average current over time is near zero. If your diode is hot, you have one of three problems: 1) It is installed backward, and it is conducting the full continuous coil current directly to ground (shut down power immediately). 2) You are using an AC supply instead of DC, causing the diode to conduct on every negative half-cycle. 3) The diode is undersized for a high-inductance motor load where the continuous freewheeling current during PWM off-times exceeds the diode's average forward current rating. In PWM motor drives, the diode conducts continuously during the off-cycle; you must size the diode for at least 50% of the motor's full-load continuous current, not just the peak transient.






