Skip to content
Electronics Basics

Diode

12 min read · Beginner

Diodes Explained: How They Work, Types, Circuits, and Testing

A diode is a semiconductor component designed to conduct current more readily in one direction than the other. That one-way behavior makes diodes useful for rectifying AC, protecting circuits against reverse polarity, steering signals, clamping voltage, detecting signals, and producing light. The familiar LED is also a diode, but it emits light when current flows through it in the forward direction.

A basic diode has two terminals: anode and cathode. In the usual forward-biased condition, the anode is at a sufficiently higher voltage than the cathode, allowing substantial current to flow. In reverse bias, current is normally very small until the reverse voltage approaches the device's breakdown region. This is a simplified model; real diodes have voltage drops, leakage, capacitance, switching limits, and thermal constraints.

Diodes are not perfect electrical check valves. They have a forward voltage that depends on current, temperature, and device construction. They also have a maximum forward current, reverse-voltage rating, power dissipation limit, and sometimes a reverse-recovery specification. Exceeding these limits can destroy the component or affect nearby circuitry.

This guide explains diode polarity, common types, practical circuits, calculations, multimeter testing, and troubleshooting. Examples focus on low-voltage electronics. Do not use an ordinary diode as a substitute for a correctly rated mains rectifier or safety component; high-voltage power supplies require appropriate design, insulation, protection, and expertise.

1. Anode, cathode, and the diode symbol

The anode and cathode identify the two terminals. On many through-hole axial diodes, a band printed near one end marks the cathode. In the schematic symbol, the bar represents the cathode. However, physical packages vary, and surface-mount parts may use different markings. Confirm an unfamiliar part with its datasheet rather than guessing from appearance.

For a conventional forward-biased silicon diode, the anode is at a higher potential than the cathode. A typical small-signal silicon diode may show a forward voltage around 0.6–0.8 V at a modest current, but that is only a rough rule of thumb. Schottky diodes often have a lower forward drop; LEDs have a forward voltage that varies with color and construction. The datasheet's forward-voltage curve is the reliable reference.

In reverse bias, the diode blocks most current under normal operating conditions, but leakage is not exactly zero. When the reverse voltage exceeds the rated operating region, breakdown can occur. A standard rectifier diode may be damaged if breakdown current is not limited, while a Zener diode is designed to operate in a controlled reverse-breakdown region within specified current and power limits.

A useful habit is to mark polarity on a sketch before building. On a breadboard, identify the cathode band or LED flat edge only as a clue, then confirm the part's datasheet. For a polarized LED, the longer lead is often the anode on an untrimmed new component, but leads may have been cut, and some packages make polarity harder to see.

2. How forward and reverse bias behave

A semiconductor diode contains a p-n junction or another semiconductor structure that creates an asymmetric current-voltage relationship. Forward bias reduces the junction barrier, allowing current to rise rapidly once the applied voltage is sufficient. Reverse bias increases the barrier and usually leaves only a small leakage current until the reverse breakdown region is reached.

A diode's forward voltage is not a fixed threshold switch. Current increases continuously with applied voltage, and a small change in forward voltage can cause a large change in current. That is why an LED connected directly to a voltage source without a resistor or current driver can draw destructive current. The source's internal resistance is not a reliable current limiter.

Temperature affects diode behavior. For a silicon junction at a given current, forward voltage generally decreases as junction temperature rises. This can contribute to current-sharing problems when multiple diodes or LEDs are placed in parallel without individual current control. LEDs in parallel should normally have suitable current regulation or individual series resistors rather than relying on identical nominal forward voltage.

Reverse voltage also matters. If a diode's reverse-voltage rating is exceeded, it may enter breakdown and fail. A diode used across an inductive load must be chosen for the voltage transient and current it will encounter. Read the datasheet for maximum repetitive reverse voltage, average and surge current, forward voltage, reverse leakage, thermal resistance, and any switching specifications relevant to the application.

3. Common diode types

Rectifier diodes are used to convert AC into pulsating DC and are designed for power-related current and voltage conditions. They may have slower switching characteristics than small-signal diodes, so the right type depends on frequency and load.

Small-signal diodes are intended for lower-current switching, detection, and signal steering. The 1N4148 is a common example, but its ratings must still be checked for the circuit.

Schottky diodes use a metal-semiconductor junction and often provide a lower forward voltage and fast switching. They can have higher reverse leakage and lower reverse-voltage ratings than some silicon rectifiers, so they are not universal replacements.

Zener diodes are designed to operate in reverse breakdown to provide a reference or clamp voltage over a specified current range. A Zener needs current limiting, usually through a resistor or current-regulating circuit. Its voltage changes with current and temperature, and its power rating must not be exceeded.

Light-emitting diodes (LEDs) convert electrical energy into light. Their forward voltage varies by color, current, and construction. They need current limiting or a suitable driver. High-power LEDs require thermal management.

Photodiodes convert incident light into an electrical current and are used in light sensing, optical communications, and measurement. Their output depends on illumination and circuit configuration.

TVS diodes are designed to clamp transient overvoltage events. They must be selected for the protected circuit's normal voltage, transient waveform, energy, and required clamping level. A TVS is not a replacement for every fuse, surge protector, or insulation barrier.

4. Use a diode to rectify AC

Rectification converts an alternating input into a unidirectional output. A half-wave rectifier uses one diode to pass one half-cycle and block the other. A bridge rectifier uses four diodes so that current through the load has the same direction during both input half-cycles. The bridge output is pulsating DC, not a perfectly steady voltage.

A filter capacitor can reduce ripple by storing energy near the waveform peaks and supplying the load between them. A regulator may be needed to maintain a stable output as input voltage and load change. Rectifier selection must consider peak inverse voltage, average current, surge current, heat dissipation, frequency, and the transformer or source characteristics.

A common error is assuming the DC output equals the AC adapter's printed voltage. AC ratings are often RMS values, while a smoothing capacitor charges toward the waveform peak, less diode drops and losses. The actual voltage also depends on load and regulation. An unregulated transformer adapter may produce a substantially higher output at light load than at its rated load.

For learning rectification, use an isolated low-voltage AC source and components rated for it. Do not build an exposed mains rectifier on a breadboard. Mains circuits can be lethal, and the capacitor after a rectifier can retain energy even after power is disconnected. Use a certified enclosed supply for practical electronics projects.

5. Reverse-polarity protection and flyback diodes

A series diode can protect a simple circuit from reversed supply polarity, but it causes a forward-voltage drop and dissipates power. At higher currents, that loss can be significant. A correctly designed MOSFET-based ideal-diode circuit can reduce the drop, but it must be selected and implemented for the input range and fault conditions. Protection should be considered part of the system design rather than added blindly.

An inductive load such as a relay coil, solenoid, or motor stores energy in its magnetic field. When current is interrupted, the collapsing field can generate a voltage spike. A flyback diode placed across a DC coil provides a path for the current to decay and clamps the voltage to a relatively low level. For a typical low-side-switched DC relay, the diode's cathode is connected to the positive supply side of the coil and the anode to the transistor-switched side. Verify the actual topology before wiring.

The diode must be rated for the coil current and the transient energy. A basic flyback diode can slow relay release because it allows current to decay more slowly. Some systems use a Zener or TVS clamp when faster release is required, but the transistor's voltage rating and clamp design then become especially important.

Do not add a diode across every load without checking its nature. A diode directly across an AC coil can short part of the AC cycle and is generally inappropriate. AC loads require the suppression method specified by their manufacturer and application. For microcontroller projects, use a transistor or driver rated for the load and keep high-current paths separate from sensitive signal wiring.

6. LEDs: calculating the series resistor

An LED should usually be driven with a controlled current. For a simple DC supply and series resistor, estimate the resistor using R = (V_supply − V_F)/I_LED, where V_F is the LED forward voltage at the intended current. Then check the resistor's power and choose a suitable standard value.

Example: a red LED has an approximate forward voltage of 2.0 V and is to be driven from 5 V at about 8 mA. The resistor estimate is (5 − 2)/0.008 = 375 Ω. A nearby 390 Ω resistor gives an approximate current of 7.7 mA under the assumed forward voltage. Actual current varies with the LED's voltage, supply tolerance, and resistor tolerance, so confirm the result in the real circuit.

The resistor power is P = I²R. At 7.7 mA through 390 Ω, the dissipation is approximately 0.023 W, so a standard 0.125 W or 0.25 W resistor would generally provide margin in this simple example. Check the resistor's actual rating and environmental conditions.

For a microcontroller, confirm that the GPIO pin's output voltage and current limits are respected. The board's absolute maximum current is not necessarily the recommended operating current, and total port or package current limits can also apply. For brighter LEDs, LED strips, or high-power emitters, use a suitable constant-current driver rather than drawing substantial current directly from a GPIO.

Never parallel bare LEDs and expect them to share current evenly. Small forward-voltage differences can cause one LED to take more current and heat up, increasing imbalance. Use separate resistors or a driver designed for the LED arrangement.

7. Test a diode with a multimeter

Many digital multimeters include a diode-test mode. With the circuit unpowered and the diode isolated enough to avoid misleading parallel paths, place the red probe on the anode and black probe on the cathode. A typical silicon diode may display a forward voltage drop. Reversing the probes should usually display open circuit or an out-of-range indication for an ordinary diode. The exact display depends on the meter and device.

This test is a useful first check, not a complete guarantee. In-circuit resistors, other semiconductor junctions, capacitors, and parallel paths can change the reading. If results are confusing, remove at least one lead from the circuit after safely disconnecting power. For high-power components, use an appropriate tester and procedure.

A diode that reads near zero in both directions may be shorted, though the surrounding circuit can mimic this. A diode that reads open in both directions may be open or may require more test voltage than the meter supplies. LEDs may glow faintly during diode test if the meter provides enough voltage; some blue or white LEDs may not light because their forward voltage exceeds the meter's test capability.

Before testing any board, disconnect its power source and check for stored energy. Do not use resistance or diode mode on an energized circuit. For mains equipment or high-voltage supplies, internal capacitors can remain charged and the circuit may be dangerous even when unplugged. If you are not qualified to service the equipment, do not open it.

8. Troubleshooting diode-related faults

LED does not light: Check polarity, series-resistor value, supply voltage, breadboard row connections, and the GPIO state. Verify that the LED is not damaged and that the GPIO can safely source or sink the intended current. Measure voltage across the LED and resistor while the circuit is powered only at a safe low voltage.

Diode becomes hot: Check for excessive forward current, wrong polarity in a protection arrangement, a shorted load, or insufficient current limiting. Calculate power using the current and forward drop, and check the package's thermal rating. Disconnect power if a component overheats.

Rectifier output is too low: Check the input waveform and RMS voltage, diode drops, load current, transformer rating, filter capacitor, and regulator dropout. A bridge has two conducting diode drops in each current path. A large capacitor can cause high surge current at startup, so the source and rectifier must be designed for it.

Transistor fails when switching a relay: Confirm whether the coil is DC or AC, the flyback diode orientation, transistor pinout, load current, and voltage rating. A reversed flyback diode can effectively short the supply when power is applied. The suppression component must match the load and switching strategy.

Circuit works at low current but fails at higher current: A small-signal diode may be unsuitable for the load. Check continuous and surge-current ratings, reverse voltage, thermal resistance, and PCB/wiring capability. Replace it with an appropriate device only after checking the circuit requirements.

9. Choosing a replacement diode

Start with the circuit function. A rectifier, signal diode, Zener, Schottky, LED, and TVS diode are designed for different jobs; they are not interchangeable solely because they have two terminals. Match the required function, polarity, package, pinout, voltage rating, current rating, forward drop, switching behavior, leakage, and thermal conditions.

For a rectifier, check repetitive peak reverse voltage, average forward current, surge current, and reverse recovery where relevant. For a Zener, check nominal voltage, test current, tolerance, dynamic resistance, power rating, and temperature coefficient. For a TVS, check stand-off voltage, breakdown range, clamping voltage at the expected surge current, and energy or pulse rating. For an LED, check color, luminous intensity, viewing angle, forward current, and thermal design.

A replacement with a higher current rating is not automatically a safe fit. It may have different capacitance, switching speed, forward drop, package, or pin arrangement. A physically larger part may not fit or may need a different thermal path. Compare the datasheets rather than relying on a generic cross-reference alone.

If a diode failed, investigate the cause before installing another one. Excessive reverse voltage, inductive spikes, current overload, poor thermal design, and incorrect wiring can cause repeat failures. A replacement will likely fail again if the underlying condition remains. Use a current-limited supply for initial low-voltage testing and check for shorts before applying full power.

10. Frequently asked questions and quick review

Does a diode stop all reverse current? No. Ordinary diodes have reverse leakage, and the leakage varies with temperature and voltage. Above the rated reverse region, breakdown may occur and can damage a diode not designed for that mode.

Can I use a diode instead of a resistor for an LED? No. A diode's forward voltage does not reliably limit LED current. Use a series resistor or a suitable current driver.

Why does a silicon diode show about 0.7 V? That is a common approximate forward drop at some currents and temperatures, not a universal fixed value. Use the datasheet curve for design.

Can a 1N4148 replace a power rectifier? Not automatically. A small-signal diode may lack the required current, surge, or thermal ratings. Choose parts based on the circuit's worst-case conditions.

Why is a flyback diode connected across a relay coil? It provides a path for inductive current when the switch turns off and limits the voltage spike. Its orientation and ratings are critical.

Practical checklist

  • Identify anode and cathode before connecting the diode.
  • Check forward current, reverse voltage, power, and thermal ratings.
  • Use current limiting for LEDs and current limiting for Zener circuits.
  • Add inductive-load suppression that matches the actual load type.
  • Test unpowered circuits and respect stored-energy and mains hazards.

A diode's behavior is simple enough to demonstrate on a breadboard, but reliable design requires more than knowing which way the symbol points. Polarity, current, voltage, heat, switching behavior, and the exact application determine whether the component will work safely.