By shortening the N-type side to the P-type side of a diode with a wire, how does the electric potential looks like in each point of this circuit?

To avoid misunderstanding I'll first start with the notions.

The electrochemical potential (which in semiconductors refers to as the Fermi level) is the sum of the chemical potential and electrical potential (the line integral of the electric field).

Now in this equilibrium state (since only have a diode in the circuit which is not a power source), the voltmeter will measure zero voltage since it actually measures the electrochemical potential which is equal everywhere.

So, my question is, how will the electric potential itself look like in each point of the circuit? Inside the diode it's easy. due to difference in Fermi levels of the different types of the semiconductors we get a depletion region and the electric potential raises from the P-type side to the N-type side and there is also an electric field (this difference, of course, will be compensated by the chemical potential in order to get the equilibrium of the electrochemical potential).

Now, by externally connecting the two sides with a wire (Suppose that the connections to the wires are perfectly ohmic), there will be an electric potential at each point of the wire to. This will cause an electric field outside the diode. What I would expect is that this electric potential will be continuous. Again the chemical potential of the wire will compensate the changes of the electric potential and the electrochemical potential will be equal at each place.

To try and clarify the situation I'm adding a scheme of a PN diode with its potential and I've added the external wire (the two points represented by A are the same). • Why is there a field anywhere outside of the junction of the diode? – Jon Custer Jul 11 '18 at 13:18
• This is part of what I'm asking, but as I wrote, I think it is because there is an electric potential difference between the two sides of the diode (as shown in the figure). – dor gotleyb Jul 12 '18 at 5:48