Derivation of Diode Current Equation? $$I = I_0 \left( e^{qV/kT} - 1\right)$$
Diode Equation is given as above which I just always took it as a fact in my electrical engineering class. But now that I have some very basic knowledge of statistical mechanics from Schroeder's "Introduction to Thermal Physics" book (Chapter 7). I was just curious about how people derived the Diode current equation in the first place using the formulas from the textbook (shown below). I am thinking it had to do with fermi Dirac distribution? 
Also based on these equations how is it that an LED (which is a Diode for example) starts conducting electricity at around 0.6-0.7V. Can we show mathematically why this is the case and this may help me understand semiconductors better?
 There seems to be a correlation from all these formulas but I just could not figure how they arrived at this equation. Thank you for your response in advance.


 A: Derivation of diode current equation, also called Shockley diode equation.
Note 1:
This equation is semi-empirical - it means that it's an educated guess based on theory and observation, it can't be derived only from theory. (It's something common for condensed matter physics - many theoretical equations there are extremely hard to compute, or even worse, they can't be written in simple analytical formula) 
Assumption 1:
Diode is in thermodynamic equilibrium - it means three things:


*

*its temperature doesn't change,

*energy flowing through diode is constant, 

*number of charges is constant.


Diodes are build from semi-conductors, whose mechanism of transporting charges is different from that in metals. 
From Fermi-Dirac statistics emerges that in every semi-conductor when temperature is equal to $0$ K every electron energy state up to some energy level (called Fermi level) are occupied. This means that in semi-conductors there is no free space (energy level) to take. But what happens if we increase temperature? Fermi-Diracs statistic becomes more "blurred" - there starting to appear some lower and upper energy levels than Fermi levels.

Plot of some Fermi-Dirac statistic. 
Moreover, it's important to know, that in semiconductors it's often considered not only electrons as negative charge carriers, but holes as positive carriers too.
Ok, knowing this we could go to part why for example LED's start conducting at $0.6 - 0.7$ V. LED diode start to lumine when electron and hole meet each other and annihilate each other - this process is called radiative recombination.
So... how to make it?
When charges start to flowing thorugh diode they start to sort - negative charges, electron will group up where you have bigger pottential (anode i think?), and holes as possitive charges will group up near cathode. From this you can see that every new electron that you would like to put in diode have to go through wall of electrons inside it. Potential needed to overcome this is equal around $0.6 - 0.7$ V. (and this heavily depends on material and construction of diode)
Ok, so how derive diode equation? 
Fermions are particles that have non-integer spin - as electrons, or holes (holes aren't particles, they are called quasi-particles, pure theoretical entities) 
But what if we assume, that hole and electron moving to each other are just one theoretical particle? 
They will become bosons! (Because sum of fractional spin become integer)
And we have to use Bose-Einstein statistic on them. 
Which is: 
$$ \left< n \right> = \frac{1}{\exp\left(\frac{E-\mu}{kT}\right)-1}$$
where:
$ \left< n \right> $ - average number of particles
$E$ - energy of state,
$\mu$ - chemical potential - equals to zero, cause number of Bosons remain constant,
$k$ - Boltzmann constant,
$T$ - temperature.
Energy can be written using electric potential and electron charge ($q$): $$ E = Uq $$ 
We have:
$$\frac{1}{\left< n\right>} = \exp\left(\frac{Uq}{kT}\right)-1 $$
If we assume, that whenever $\frac{1}{\left< n\right>} $ isn't satisfied, in order to stay in thermodynamic equilibrium diode has to attract charges - in other words some of current flowing through diode will be consumed to maintain equilibrium. We should expect $I$ on one side of equation, and $I_0$ times some damping factor on another. (Where $I_0$ is current flowing into diode, and $I$ is current after it)
The more $\frac{1}{\left< n\right>}$ isn't satisfied, the more current has to flow - means:
$$\frac{1}{\left< n\right>} = I$$ 
So in the end we have:
$$ I = I_{s}\left[\exp\left(\frac{Uq}{kT}\right)-1\right]$$
Note 2:
It isn't the best possible derivation of this equation - there is a more precise way - it has to consider diffusion equations of electrons and holes. 
