The potential barrier at p-n junction is due to
In a p-n junction, there exist a concentration difference of charge carriers in the given junctions. A covalent bond is formed when an electron from n-section diffuses into the p-section in a process called electron hole recombination. Accumulation of electric charges of opposite polarities creates a potential barrier between the two sections of the junction. This electric field setting up a potential barrier in the junction which opposes further diffusion is due to the fixed acceptor and donor ions on either side of the junction.