Atlas Robotics
Electronic ComponentsBasic

What is a diode? An electronic one-way valve essential for relay and motor control

Atlasbot · 20/8/2026 · 9 min read

What is a diode? An electronic one-way valve essential for relay and motor control
Diode only allows current to flow in one direction — from Anode to Cathode

The diode is one of the most basic electronic components, but is behind one of the most common hardware errors when making robots: forgetting the protection diode when controlling a relay or motor via a transistor, burning that transistor the first time it is turned off.

What is a diode?

Diode is a 2-legged semiconductor device (Anode and Cathode) that only allows current to flow in in only one direction — from Anode to Cathode when polarized in the correct direction (forward). In the opposite direction (reverse bias), the diode almost completely blocks the current, acting like a one-way valve in an electrical circuit.

When forward biased, a typical silicon diode has a fixed forward voltage drop of about 0.7V — meaning it always "dissipates" about 0.7V regardless of the current flowing through it (within normal operating limits). Schottky diodes have a lower voltage drop (~0.3V), often used when needing to reduce energy loss.

In short: Diode = 1-way valve for current, with a fixed voltage drop of ~0.7V (silicon) when conducting - these are 2 numbers to remember when designing a circuit with a diode.

LED is also a type of diode

LED (Light Emitting Diode) is essentially a diode that lights up when current flows in the correct direction - this is why LEDs only light up when installed in the correct polarity (Anode/Cathode), and also need a current limiting resistor like every other diode when operating (see Voltage/Current/Power article to calculate the appropriate resistance).

Flyback diode — the most important application in robotics

Coils (like in relays, DC motors, solenoids) when suddenly interrupted, will create a current Very large reverse voltage pulse (due to electromagnetic induction, following Lenz's law) — this pulse can be many times higher than the original power supply voltage, enough to destroy the transistor/MOSFET controlling that coil if there is no protection.

A protection diode (flyback diode / freewheeling diode) in parallel with the coil solves this problem — when the coil is disconnected, the reverse voltage pulse finds a safe "discharge" path through the diode instead of discharging through the control transistor.

        ┌──[ Relay/motor coil ]──┐
        │                              │
   VCC ─┤ ├─ Control transistor
        │                              │
        └──[ Protection diode, reverse direction ]┘
        (Cathode connects to VCC, Anode connects to transistor side)

Technical details

Formulas

When diodes are connected in series in a circuit (eg: anti-reverse diode), the fixed voltage drop across the diode (~0.7V with silicon diode) must be subtracted from the actual voltage supplied to the load behind:

Vout = Vin − Vf(diode)

For example: 12V battery source, through an anti-reverse polarity diode (Vf = 0.7V)
Vout = 12V − 0.7V = 11.3V supplied to the rear circuit

With large load currents, this voltage drop also leads to power dissipation on the diode (P = Vf × I) - the larger the current, the hotter the diode, you need to choose a diode with a rated current that is enough to exceed the actual load current.

Parameters

Forward voltage drop (Vf) and maximum withstand current vary significantly between diode types — choosing the wrong type is a common cause when the protection diode still burns even when installed correctly:

Diode typeTypical VfMaximum current reference
Regular silicon diode (1N4007)~0.7V~1A
Small signal diode (1N4148)~0.7V~200mA
Diode Schottky (1N5819)~0.3V~1A
Red/yellow LED1.8 – 2.2VSeveral tens of mA (depending on type)
Blue/white LED3.0 – 3.3VSeveral tens of mA (depending on type)

Practical applications

In addition to the flyback diode role mentioned above, another common application in AMR robots is the reverse-polarity protection diode — connected in series between the battery input and the main circuit, the diode only allows current to flow in the correct direction if the battery is plugged in with the correct polarity, and completely blocks the current if someone accidentally connects the (+)/(-) wires in reverse when changing the battery or charging — an operation error that can easily occur in real life. operating conditions, especially with connectors that do not have an anti-reverse insertion mechanism.

Practical example: relay control circuit has protection diode

Without protection diode:
  Turn on relay → OK
  Turn off the relay → reverse voltage pulse from the coil → 
  The control transistor may fail immediately or gradually over time

There is a protection diode (connected in parallel and in the opposite direction of the relay coil):
  Turn on relay → OK (diode does not conduct because of reverse polarity at this time)
  Turn off the relay → reverse voltage pulse → diode conducts, "discharges" safely → protected transistor

Most off-the-shelf relay modules have built-in protection diodes on the board — but when designing your own relay/motor/solenoid control circuit from separate components, this is a mandatory step that cannot be overlooked.

Common mistakes

  • Install the diode in reverse direction — the diode will completely block the current instead of conducting, the circuit will not work; With the protection diode installed backwards it does not protect anything at all. Always check the color line (Cathode pin marking) on ​​the diode body before soldering.
  • Forget the protection diode when making your own relay/motor control circuit via transistor — the most common reason why the control transistor/MOSFET "slowly dies" after a few turns on/off, or dies immediately.
  • Choosing a diode that does not have enough current to handle — each diode has a maximum current limit (Ampere units) written in the datasheet — using a small diode (eg: 1N4148 signal diode, can only handle ~200mA) to protect a circuit with a large current (eg: a motor with a few Ampere) will cause that diode to burn out.
  • Confusing LED with regular rectifier diode in calculating voltage drop — LED has different voltage drop depending on color (usually 1.8V-3.3V, not fixed 0.7V like regular silicon diode) — using the wrong value when calculating current limiting resistor will give wrong results.

Conclusion

The diode is simple but plays the most important protective role in any circuit that controls a coil load (relay, motor, solenoid) — without it, failure of control components is just a matter of time. The next article in this section is about Transistors - components that often stand right next to diodes in small power load control circuits.

Get new articles and lessons by email

When a new technical article or course module is published, Atlas Robotics sends you a short email. No spam.

Unsubscribe any time with the link in each email. See our Privacy policy.

What is a diode? An electronic one-way valve essential for relay and motor control — Atlas Robotics