The image above is from the book "The Electronics companion". Can someone please explain why the barrier potential of a pn junction cannot be measured due to the presence of the contact potential?
The reason you cannot measure the potential is due to the ohmic contacts forming schottky diodes at the semiconductor-metal junctions which hides the built in voltage (just as shown in the band diagram).
The built in voltage is present even in the absence of current. As you increase the external voltage (the voltage you read with a voltmeter) you counter the built in voltage and reduce the width of the depletion region, causing more carriers to flood across the junction.
You might wonder why the metal-semiconductor junctions completely cancel the built in junction. The reason is that the metal-p contact potential is a function of the doping in the p material. The pn built in voltage is also a function of the doping in the p material and the doping in the n material. And finally the n-metal contact potential is a function of the doping in the n material. If the metal is the same on either end (same material properties) then these three values cancel out.