# For p-n junction, at the depletion region which side is at higher potential?

At depletion region, a potential barrier is setup, E(electric field is from right to left)[according to viewer], but left side is shown to be at higher potential.

Inside a battery, E is in the direction of +ve terminal to -ve terminal.

2nd image source: http://web.mit.edu/sahughes/www/8.022/lec08.pdf

• A battery and a PN junction are different things. There is no voltage across a PN junction. Read here why that is so: electronics.stackexchange.com/questions/106496/… – Bimpelrekkie May 22 '18 at 10:51
• @Bimpelrekkie: The voltage is there, but it can't be measured through an external circuit. – Dave Tweed May 22 '18 at 14:49
• @DaveTweed Since voltage is there, which side is at higher potential? General opposing voltage logic matches with the direction of voltage shown in 1st figure, but when we try to put voltage according to electric field E, it just becomes reverse. – Sahil May 22 '18 at 14:50
• The N side, of course, as shown by the arrow in your diagram, and the fact that it's the side that is depleted of electrons. – Dave Tweed May 22 '18 at 14:54
• In the 1st diagram, E(electric field) is from n side to p side, so should not n side be at higher potential and p at lower?But it is shown opposite(p at higher and n at lower)(which is in fact correct), so where am I mistaken? – Sahil May 22 '18 at 14:57