# In band diagram, why the Fermi energy (EF) is constant along the device?

In band diagrams of PN/PIN junctions etc. the Fermi energy level ($E_F$) is drawn as constant along the device (see image). (source)

Why is it constant? What does it represent?

• The Fermi level is a measure of the electron energy. If it was higher or lower some where then electrons would move from the high energy spot to the lower one.. and that motion would then continue till the fermi level was the same everywhere. It's a bit like water seeking the lowest level in a bowl. The wiki article is OK, en.wikipedia.org/wiki/Fermi_level – George Herold Dec 5 '14 at 20:14
• @GeorgeHerold, do you mean that the same energy would be needed for a photon to excite an electron at any point along the device? if yes, then what's the difference between $E_F$ and $E_{Fn},E_{Fp}$? – Sparkler Dec 5 '14 at 20:17
• Excite an electron across the band gap? I don't know what Efn,Efp are? The Fermi level (in my limited understanding) is about which states are filled. – George Herold Dec 5 '14 at 23:23
• Oh I see, Re: Efn and Efp. The applied voltage is all across the depletion region. Energy is qV. I should say it is a bit confusing to talk about the fermi level in the gap and filled states, when there are no states in the gap. – George Herold Dec 6 '14 at 2:17
• @GeorgeHerold, on the other hand, if the Fermi level doesn't fall in the band gap, then the material doesn't act much like a semiconductor. – The Photon Dec 6 '14 at 3:06

$$F_n = \frac{D_n}{k_BT} n \frac{\mathrm{d}E_F}{\mathrm{d}x}$$
In equilibrium (zero bias), $F_n = 0$ and therefore $E_F=\text{const}$.