In this animation, we will show how charge carrier diffusion motion against an electric field generated by the diffusion motion of the carriers results in a depletion zone at the junction between p-doped and n-doped semiconductors. The reason for the electric field is that diffusion of `n` and `p` charge carriers into the junction region effectively cancels the fixed charges, `i`, of the dopant ions making them neutral. You might ask "which ion will become neutralized?". First I need to say that at room temperature (T=300 Kelvin), not all of the impurities are ionized. In fact at this temperature for donor impurity Phosphorous (P) which has ionization energy, 0.044 electron volts (eV), the ionized fraction is `N_(ions)/N_("donors")=exp(-E_D/k_BT)=exp(-0.044/0.026)=0.183` `E_D=0.044` is the ionization energy of the donor in Silicon and where `k_BT=0.026` where `k_B` is the Boltzmann constant. For the acceptor impurity Boron (B) the ionization energy is 0.045 eV so the ionized fraction is `N_(ions)/N_("acceptors")=exp(-0.045/0.026)=0.177`. From this we conclude that for low ionization energy impurities in Silicon, there is a large fraction of impurity atoms. These un-ionized atoms scatter the carriers. They also provide sites for the carrier electron or carrier hole to jump to. While the host crystal is not specified in this document, the most reasonable choice here would be very high purity single crystal Silicon since almost all computer semiconductors are Silicon. Silicon has a band gap of about 1.14 electron volts at toom temperature so temperature effects are quite small compared to Germanium which has a band gap of 0.67 electron volts.
At the animation start you see two blocks. The one on the left represents the donor (n) doped crystal. The one on the right represents the acceptor (p) doped crystal. At start I've chosen to make the initial ion and carrier distribution regimented. While this is not the way carriers and ions will be in real cyrstals, it has the following two advantages:
1.It is easy to see that the number of carriers equals the number of ions in each of the two blocks so both blocks are electrically neutral and neither initially supports and electric field. This is also true at the start of diffusion which occurs as soon as the blocks come in contact with each other.
2. With a regimented initial distribution, after fusing the two blocks and diffusion has occured, it is easy to see the depletion zone is almost vacant of carriers which is NOT the case for random distributions of carriers and ions.
After the blocks contact each other, motion of the carriers (but not the ions since they are fixed) starts. This generates an electric field in the junction region which repels both carrier types. Depletion Width is the term which applies to this junction region. In the animation and the plots pertaining them, the positive carriers and ions are colored red and the negative carriers and ions are colored black as in all battery coloring conventions. After fusing of the two blocks, an electric field (green plot) occurs and is plotted Vs position. This causes carriers of both signs to be repelled from the depletion zone.The electric field Vs x position is plotted in green. The density distribution of negative carriers is plotted in black and that of positive carriers is plotted in red. The density distribution of the sum of both carriers is plotted in blue. In addition, the voltage potential Vs position due to the electric field is plotted in purple.
For this animation the actual electric field that is developed by the charge motion is not used. An electric field does develop right after fusing the junction and its sign is correct. However, it gets continually broader as time goes on so it does clearly show the depletion zone effect as clearly as I would like. So, as a charge repelling electric field, I have reverted to the electric field that is shown as a red inverted V in Canvas 1. You will notice that, in the junction region, the actual electric field, plotted in green, closely mathches the red plot.