# Diffusion current

Diffusion current is a current in a semiconductor caused by the diffusion of charge carriers (electrons and/or electron holes). This is the current which is due to the transport of charges occurring because of non-uniform concentration of charged particles in a semiconductor. The drift current, by contrast, is due to the motion of charge carriers due to the force exerted on them by an electric field. Diffusion current can be in the same or opposite direction of a drift current. The diffusion current and drift current together are described by the drift–diffusion equation.
It is necessary to consider the part of diffusion current when describing many semiconductor devices. For example, the current near the depletion region of a p–n junction is dominated by the diffusion current. Inside the depletion region, both diffusion current and drift current are present. At equilibrium in a p–n junction, the forward diffusion current in the depletion region is balanced with a reverse drift current, so that the net current is zero.
The diffusion constant for a doped material can be determined with the Haynes–Shockley experiment. Alternatively, if the carrier mobility is known, the diffusion coefficient may be determined from the Einstein relation on electrical mobility.

## Overview
### Diffusion current versus drift current

The following table compares the two types of current:
    Diffusion current Drift current Diffusion current = the movement caused by variation in the carrier concentration. Drift current = the movement caused by electric fields. Direction of the diffusion current depends on the slope of the carrier concentration. Direction of the drift current is always in the direction of the electric field. Obeys Fick's law: $J=-qD{\frac {d\rho }{dx}}$ Obeys Ohm's law: $J=q\rho \mu E$

### Carrier actions

No external electric field across the semiconductor is required for a diffusion current to take place. This is because diffusion takes place due to the change in concentration of the carrier particles and not the concentrations themselves. The carrier particles, namely the holes and electrons of a semiconductor, move from a place of higher concentration to a place of lower concentration. Hence, due to the flow of holes and electrons there is a current. This current is called the diffusion current. The drift current and the diffusion current make up the total current in the conductor. The change in the concentration of the carrier particles develops a gradient. Due to this gradient, an electric field is produced in the semiconductor.

## Derivation

In a region where n and p vary with distance, a diffusion current is superimposed on that due to conductivity. This diffusion current is governed by Fick's law:
    $F=-D_{\text{e}}\nabla n$
where:
    F is flux.
    D$_e$ is the diffusion coefficient or diffusivity
    $\nabla n$ is the concentration gradient of electrons
    there is a minus sign because the direction of diffusion is opposite to that of the concentration gradient
The diffusion coefficient for a charge carrier is related to its mobility by the Einstein relation:
    $D_{\text{e}}={\frac {\mu _{\text{e}}k_{\text{B}}T}{e}}$
where:
    k$_B$ is the Boltzmann constant
    T is the absolute temperature
    e is the electrical charge of an electron
Now let's focus on the diffusive current in one-dimension along the x-axis:
    $F_{x}=-D_{\text{e}}{\frac {dn}{dx}}$
The electron current density J$_e$ is related to flux, F, by:
    $J_{\text{e}}=-eF$
Thus
    $J_{\text{e}}=+eD_{\text{e}}{\frac {dn}{dx}}$
Similarly for holes:
    $J_{\text{h}}=-eD_{\text{h}}{\frac {dp}{dx}}$
Notice that for electrons the diffusive current is in the same direction as the electron density gradient because the minus sign from the negative charge and Fick's law cancel each other out. However, holes have positive charges and therefore the minus sign from Fick's law is carried over.
Superimpose the diffusive current on the drift current to get
    $J_{\text{e}}=e\mu _{\text{e}}nE+eD_{\text{e}}{\frac {dn}{dx}}$ for electrons
and
    $J_{\text{h}}=e\mu _{\text{h}}pE-eD_{\text{h}}{\frac {dp}{dx}}$ for holes
Consider electrons in a constant electric field E. Electrons will flow (i.e. there is a drift current) until the density gradient builds up enough for the diffusion current to exactly balance the drift current. So at equilibrium there is no net current flow:
    $e\mu _{\text{e}}nE+eD_{\text{e}}{\frac {dn}{dx}}=0$

## Example

To derive the diffusion current in a semiconductor diode, the depletion layer must be large compared to the mean free path. One begins with the equation for the net current density J in a semiconductor diode,
| $J=qn\mu E+qD{\frac {dn}{dx}}$ | (1) |
where D is the diffusion coefficient for the electron in the considered medium, n is the number of electrons per unit volume (i.e. number density), q is the magnitude of charge of an electron, μ is electron mobility in the medium, and E = −dΦ/dx (Φ potential difference) is the electric field as the potential gradient of the electric potential. According to the Einstein relation on electrical mobility $D=\mu V_{t}$ and $V_{t}=kT/q$. Thus, substituting E for the potential gradient in the above equation (1) and multiplying both sides with exp(−Φ/V$_t$), (1) becomes:
| $Je^{-\Phi /V_{t}}=qD\left({\frac {-n}{V_{t}}}*{\frac {d\Phi }{dx}}+{\frac {dn}{dx}}\right)e^{-\Phi /V_{t}}=qD{\frac {d}{dx}}(ne^{-\Phi /V_{t}})$ | (2) |
Integrating equation (2) over the depletion region gives
    $J={\frac {qDne^{-\Phi /V_{t}}{\big |}_{0}^{x_{d}}}{\int _{0}^{x_{d}}e^{-\Phi /V_{t}}dx}}$
which can be written as
| $J={\frac {qDN_{c}e^{-\Phi _{B}/V_{t}}\left[e^{V_{a}/V_{t}}-1\right]}{\int _{0}^{x_{d}}e^{-\Phi ^{*}/V_{t}}dx}}$ | (3) |
where
    $\Phi ^{*}=\Phi _{B}+\Phi _{i}-V_{a}$
The denominator in equation (3) can be solved by using the following equation:
    $\Phi =-{\frac {qN_{d}}{2E_{s}(x-x_{d})^{2}}}$
Therefore, Φ* can be written as:
| $\Phi ^{*}={\frac {qN_{d}x}{E_{s}}}\left(x_{d}-{\frac {x}{2}}\right)=(\Phi _{i}-V_{a}){\frac {x}{x_{d}}}$ | (4) |
Since the x ≪ x$_d$, the term (x$_d$ − x/2) ≈ x$_d$, using this approximation equation (3) is solved as follows:
    $\int _{0}^{x_{d}}e^{-\Phi ^{*}/V_{t}}dx=x_{d}{\frac {\Phi _{i}-V_{a}}{V_{t}}}$,
since (Φ$_i$ − V$_a$) > V$_t$. One obtains the equation of current caused due to diffusion:
| $J={\frac {q_{2}DN_{c}}{V_{t}}}\left[{\frac {2q}{E_{s}}}(\Phi _{i}-V_{a})N_{d}\right]^{1/2}e^{-\Phi _{B}/V_{t}}(e^{V_{a}/V_{t}}-1)$ | (5) |
From equation (5), one can observe that the current depends exponentially on the input voltage V$_a$, also the barrier height Φ$_B$. From equation (5), V$_a$ can be written as the function of electric field intensity, which is as follows:
| $E_{\mathrm {max} }=\left[{\frac {2q}{E_{s}}}(\Phi _{i}-V_{a})N_{d}\right]^{1/2}$ | (6) |
Substituting equation (6) in equation (5) gives:
| $J=q\mu E_{\mathrm {max} }N_{c}e^{-\Phi _{B}/V_{t}}(e^{V_{a}/V_{t}}-1)$ | (7) |
From equation (7), one can observe that when a zero voltage is applied to the semi-conductor diode, the drift current totally balances the diffusion current. Hence, the net current in a semiconductor diode at zero potential is always zero.
The equation above can be applied to model semiconductor devices. When the density of electrons is not in equilibrium, diffusion of electrons will occur. For example, when a bias is applied to two ends of a chunk of semiconductor, or a light is shining in one place (see right figure), electrons will diffuse from high density regions (center) to low density regions (two ends), forming a gradient of electron density. This process generates diffusion current.