How Solar Cells Work
Solar cells are devices which convert solar energy directly in electricity, either directly via the photovoltaic effect, or indirectly by first converting the solar energy to hear of chemical energy.
Solar cells are made of silicon, one of the most abundant elements on Earth. Pure silicon has four outer valence electrons that can form tetrahedral crystal lattices. Pure silicon is a poor conductor of electricity since none of the electrons are free to move about.
The electron clouds of the crystalline sheets are stressed by adding trace amounts of elements that have three or five outer shell electrons that will enable electrons to move. The nuclei of these elements fit well in the crystal lattice, but with only three outer shell electrons, there are too few electrons to balance out, and "positive holes" float in the electron cloud. With five outer shell electrons, there are too many electrons. The process of adding these impurities on purpose is called "doping." When doped with an element with five electrons, the resulting silicon is called N-type ("n" for negative) because of the prevalence of free electrons. Likewise, when doped with an element of three electrons, the silicon is called P-type. The absence of electrons (the "holes") define P-type.
The combination of N-type and P-type silicon cause an electrostatic field to form at the junction. At the junction, electrons from the sides mix and form a barrier, making it hard for electrons on the N side to cross to the P side. Eventually equilibrium is reached, and an electric field separates the sides.
When photons (sunlight) hits a solar cell, it's energy frees electron-holes pairs. The electric field will send the free electron to the N side and hole to the P side. This causes further disruption of electrical neutrality, and if an external current path is provided, electrons will flow through the path to their original side (the P side) to unite with holes that the electric field sent there, doing work for us along the way. The electron flow provides the current, and the cell's electric field causes a voltage. With both current and voltage, we have power, which is the product of the two.
By wiring solar cells in series, the voltage can be increased; or in parallel, the current. Solar cells are wired together to make a solar panel, and solar panels can be joined to create a solar array.