Excess electrons in the n layer move across the i layer to fill holes in the p layer. This gives the p layer a negative charge and the n layer a positive charge. The charge imbalance is a somewhat stable and permanent characteristic of the cell. It sets up the voltage which drives a current composed of the electrons freed by photons. When an electron is freed by a photon, it moves towards the n layer because opposite charges attract.
Electrical contacts draw off the freed and separated electrons to create a flow of electric current.
The current flows out of the cell through a connecting wire. There are several types of solar cells. Amorphous cells are made by vapor deposition of thin layers on a substrate. The energy from the sun can be captured and put to work indirectly or directly. Photosen sitive chemicals in plants convert solar energy into chemical energy in the form of carbohydr ates.