# Electron flow: Are these two simulations contradicting each other?

These two videos explain how a diode works:

In the second video, electrons seem to travel from (+) to (-), which looks wrong.

To my understanding, positive ions (-) "get rid" of electrons, while negative ions (+) "accept" electrons. The electron, being a negatively charged particle, travels from (-) to (+). In the second video, electrons seem to travel from (+) to (-).

Please shed some light into my mind.

In a diode, or PN junction, you have two regions:

• region P with an excess of holes: the material is doped with atoms having 3 electrons instead of 4
• region N with an excess of electron: the material is doped with atoms having 5 electrons instead of 4

Each two regions are neutral but when we place them side by side, some electrons and some holes diffuse from one region to the other: it creates a depletion region with no free charge. Once the charges move, it creates a negative potential barrier in the P region and a positive potential barrier in the N region; this potential prevents the diffusion of the charges: it creates a "drift current".

You can polarize the PN junction in two way: direct polarization and reverse polarization. In the direct polarization you apply a positive voltage to the P region: holes and electrons can now enter to the depletion zone (thanks to this positive potential) and the depletion zone and the potential barrier are reduced. In the reverse polarization the potential barrier and the depletion zone are increased.

In conclusion, if you consider electrons, the current flows from - to +. This is also the case of the second video: a negative potential is applied to the N zone, while a positive one to the P zone. The electrons flows from N to P (from - to +).

We are not talking about ions here. If you go to the second video you will hear from 7:51 that she talks about electrons and holes. Electrons are free to move around in the n-type material on one side of the junction, while holes, which are simply an empty space missing an electron, are free to move around in the p-type material.

• n-type: Think of a pure material lattice where one atom is suddenly replaced with an atom of one higher atomic number. This atom has an electron too many in the outer shell. To fit into the lattice, it must give up this electron. So it "pushed" it away. Now this excess electron is more free to move around. Therefore electrons will be charge carriers in this material.
• p-type: If you instead replace an atom with another atom of one smaller atomic number, then it is missing one electron. It has a hole. To fit in, it must take an electron from a neighbour. The neighbour will then take an electron from another neighbour etc. The hole seems to "move around freely", and corresponds to a missing electron, that is a positive charge. We call it a positice charge carrier.

An electron carries a negative charge. A hole corresponds to a positive charge. If electrons move to the right, then negative charge moves right. If holes move to the left then also this corresponds to negative charge to the right.

The stuff that moves from (+) to (-) in the second video is simply positive charge. It can be no other. In different simulations and illustrations you might see either positive or negative charge displayed. It is simply a choice of what to show, and it illustrates the same thing nevertheless. In standard electric circuits with diodes like this, just remind yourself all the time that what is actually moving, is electrons in the wires (towards +), electrons in the n-type (towards +) and holes in the p-type (towards -). All these correspond to the same thing: negative charge towards (+) and positive charge towards (-).