How Diodes Work
Diodes: the simplest sort of semiconductor devices. Since diodes are semiconductors, before we discuss about diodes, let’s learn what semiconductors are. In broad terms, a semiconductor is classified between being a conductor and a non-conductor of electricity as it carries out electricity better than non-conductors but not better than conductors of electricity. Most semiconductors are composed by having impurities; which are atoms of another material added to them. This process is referred to as doping.
Additional atoms in doped materials change the balance by either adding free electrons or creating holes where the electrons can go. These alterations can make the material more conductive. Semiconductors that are altered to have extra electrons are called N-type material. In this instance, free electrons are able to move from a negatively charged area to a positively charged area. Semiconductors that have extra holes where the electrons can go are referred to as P-type material as it has extra positively charged particles. Electrons in these materials can jump from hole to hole, moving from a negatively charged area to a positively charged area.
A diode is composed of both, an N-type material which is bonded to a section of 2CL2FM and has electrodes which are known as anode and cathode at each end. This arrangement conducts electricity only in one direction and would not allow any flow in the opposite direction. If no voltage is being applied to the diode, the electrons from the N-type material would move over and fill the holes in the P-type material. Thus forming a depletion zone in which the semiconductor is returned to a state where it acts as an insulator as all the holes are filled with no free electrons which prevents charge from flowing.
Now since the diode is acting as an insulator, how do you get it to conduct electricity? This can be achieved if you can get electrons to move from the N-type area to the P-type area and the holes in the opposite direction. To do this, you connect the N-type area of a diode to the negative terminal of a battery and the P-type area to the positive end. The negative end would repel the free electrons whereas the positive end of the battery would attract them. The same would happen for the holes in the P-type area. If the voltage difference between the electrodes is high enough, it would push the electrons and the holes out of their area and get them to move freely. This would eliminate the depletion zone and with the electrons moving freely and being able to conduct charge. If you were to try and connect the P-type area to the negative terminal of a battery and the N-type area to the positive terminal of the battery, it would increase the depletion zone as the holes and electrons would be attracted to the opposites. No current would be able to flow and now the diode would act as an insulator instead of a conductor.
The use of diodes is to prevent any unwanted charge flowing in the wrong direction due to improper connection. They can protect your electronics from getting damaged.