I'm studying crystalline solar cell and their working principle, but I still don't completely understand the process.
First of all, I understand that we dope a pure crystalline silicon with boron and phosphorus, for example, in order to create a layer where the hole concentration is larger (p-type) and a layer where the electron concentration is larger (n-type). Then, when a net interface between a p-type and a n-type material is created we create a p-n junction, the building block of the basic solar cell. After this interface has been created some holes will move from the p-type to the n-type, while electron will move in the opposite direction, to join the electron and the hole.
So, at the interface the material loses its electronic neutrality and becomes charged. This results in an electric field called depletion layer.
So far it's all pretty much clear, but now:
When a photon of suitable energy (higher than the semiconductor band-gap, which isn't associated at all with the the built-in potential difference, right?) hits the solar cell active layer, an electron is promoted to the conduction band and leaving a hole in the valence band. Now they don't recombines because of the electric filed at p-n auction, so the electron will move to the n-type part. Now, if we connect a wire between the n-type side and the p-type side the electron will flow through it generating current.
My question is: is the electron moving from the n-type to the p-type? Therefore, is the n-type kind of anode where an oxidation is occurring (an electron is leaving to go to the p-type)? What force is making the flow occurs? I don't really get why the electron should return to the initial place where there is an higher voltage potential.
Hope that my doubts are clear. I'm looking forward for your responses!