A silicon atom has 14 electrons, which are distributed on three electron layers. The two electron layers inside have been filled, and only the outermost layer lacks four electrons to be half full. In order to achieve a stable structure of the full-electron layer, each silicon atom can only combine with its four adjacent atoms to form a shared electron pair. From the plane, it looks like all the atoms are holding hands, interlacing and colluding to form its unique crystal structure, and fix each electron in a specific position and cannot move freely like free electrons in good conductors such as copper. Therefore, it is determined that silicon is not a good conductor of electricity. The silicon that is actually used in solar cells is specially processed, that is, a doping process is adopted.
The main structure of silicon semiconductor is shown in Figure 1. In Figure 1, the positive charge represents the silicon atom, and the negative charge represents the four electrons surrounding the silicon atom. When the silicon crystal is doped with other impurities, such as boron, phosphorus, etc., when boron is doped, there will be a hole in the silicon crystal. At this time, the semiconductor is called a P-type semiconductor, as shown in Figure 2.


In Figure 2, the positive charge represents the silicon atom, and the negative charge represents the four electrons surrounding the silicon atom. The gray one represents the doped boron atom, because there are only 3 electrons around the boron atom, which will form a hole state while forming a covalent bond with the silicon atom. As shown in Figure 2, the black one is a hole. The hole becomes very unstable because it has no electrons, and it is easy to absorb electrons and neutralize, forming a P-type semiconductor.
When an element with one more valence electron (such as phosphorus) is added to silicon, only 4 of the 5 electrons in the outermost layer can form a shared electron pair with adjacent silicon atoms. The remaining one electron cannot form a covalent bond, but it is still bound by the impurity center, but it is much weaker than the constraint of the covalent bond. As long as a small amount of energy is free, one electron will become very active. The semiconductor at this time is called an N-type semiconductor, as shown in Figure 3. The gray ones are phosphorus nuclei, and the black ones are extra electrons.

When the P-type and N-type semiconductors formed by silicon doping are combined, a special thin layer is formed in the area of the interface between the two semiconductors. The P-type side of the interface is negatively charged and the N-type side is positively charged. This is because P-type semiconductors have many holes, and N-type semiconductors have many free electrons, and there is a difference in concentration. The electrons in the N area will diffuse to the P area, and the holes in the P area will diffuse to the N area. Once diffused, an “internal electric field” from N to P is formed, thereby preventing the diffusion from proceeding. After reaching the equilibrium, such a special thin layer is formed, which is the PN junction, as shown in Figure 4.

When the doped silicon wafer is exposed to light, in the PN junction, the holes of the N-type semiconductor move to the P-type region, and the electrons in the P-type region move to the N-type region, thereby forming a current from the N-type region to the P-type region. Then an electromotive force difference is formed in the PN junction, which forms a power supply, as shown in Figure 5.

Read more: PN junction energy band and contact electromotive force difference and photoelectric effect