How photovoltaic cells work
The photovoltaic cells rely on a phenomenon called the photoelectric effect to directly convert sunlight into electricity.
All light carries little bundles of energy called " photons ". When photons strike certain materials they cause it to emit electrons.
Photovoltaic cells are made of two types of materials called p-type and n-type .
P-type material is called an acceptor material because they accept electrons. N-type material emits electrons and is sometimes called an emitter material.
The most common material used is silicon that has impurities mixed with it (this process is called doping). The impurity determines whether the silicon becomes a p-type or n-type material.
When the sunlight strikes the n-type material the photons collide with some of the electrons in this material causing them to move. The electrons move to the p-type material. Any movement of electrical charge produces an electric current. So this is how electricity is produced in a photovoltaic cell.