Pn junction open circuit