A diode is used mostly in the circuit so that the current will not flow in the reverse direction, a diode should be place in the circuit to allows the current to flow in one direction but not the other, it can protect components in a circuit that are sensitive to current that flows through them in the wrong direction.
Placing a diode in series it help your small project to stay alive, for example as you can see the illustration below, we’re going to wire a protection diode in series with the LED. The LED is sensitive to current in the reverse direction. It can only handle a certain amount of current in the wrong direction. If enough reverse voltage droops across the LED, the LED will burn down and allow current to flow through in a reverse direction, which can cause the LED burn or damage.
1x 9v Battery
1x Power Diode – from any value of 1400X diode.
1x 470 Ohms Resistor
1x LED (Any Color)
The Schematics Diagram
The Wiring Diagram