How do diodes (pn junction) work?
PN junction: putting a P-type material next to N-type material to form the PN junction P-type is where you have more “holes”; N-type is where you have more electrons in the material. Initially, when you put them together to form a junction, holes near the junction tends to “move” across to the N-region, while the electrons in the N-region drift across to the p-region to “fill” some holes. This current will quickly stop as the potential barrier is built up by the migrated charges. So in steady state no current flows. Then now when you put a potential different across the terminals you have two cases: 1. +ve end to P-type, -ve end to N-type: The electric field from the external potential different can easily overcome the small internal field (in the so-called depletion region, created by the initial drifting of charges): usually anything bigger than 0.6V would be enough. The external field then attracts more e- to flow from n-region to p-region and more holes from p-region to n-region an