A Schottky contact is a contact between a metal and a semiconductor. Typically the crystal structure of the semiconductor does not match to the crystal structure of metals and many defect states are formed at the interface. Due to these defects, the Fermi energy of the semiconductor is pinned close to the middle of the band gap. This bends the conduction band $E_c(x)$ and the valence band $E_v$ near the interface at $x=0$. For a ptype semiconductor, the difference between the Fermi energy of the metal and the valence band of the semiconductor at the interface is called the Schottky barrier height, $\phi_b$. If the Fermi energy of the metal is defined to be zero then,
\[\begin{equation} E_v(0) = \phi_b. \end{equation}\]There is a depletion region of width $W$ close to the interface. Further away from the interface in the semiconductor, the energy of the valence band is a constant and $N_A\approx p =N_v\exp\left(\frac{E_vE_F}{k_BT}\right)$. This can be solved for the valence band energy in the ptype semiconductor far from the interface,
\[\begin{equation} E_v(W) = k_BT\ln\left(\frac{N_v(T)}{N_A}\right)eV. \end{equation}\]Here $N_v(T)$ is the effective density of states of the valence band, $N_A$ is the donor concentration, $T$ is the absolute temperature, $k_B$ is Boltzmann's constant, $e$ is the elementary charge, and $V$ is the bias voltage that is applied. By definition, the bias voltage is positive when the diode is forward biased. In the depletion region the energy of the conduction band is,
\[\begin{equation} E_v(x) = \frac{e^2N_A}{2\epsilon}(Wx)^2+E_v(W)\qquad 0 < x < W. \end{equation}\]At $x=0$ this expression can be used to solve for $W$,
\[\begin{equation} W = \sqrt{\frac{2\epsilon(V_{bi}V)}{eN_A}}. \end{equation}\]Where the builtin voltage is $eV_{bi}=\phi_bk_BT\ln\left(\frac{N_v(T)}{N_A}\right)$. The electric field is minus the derivative of the electrostatic potential,
\[\begin{equation} E(x) = \frac{eN_A}{\epsilon}(Wx)\qquad 0 < x < W. \end{equation}\]The charge density is given by Gauss's law $\frac{dE}{dx}=\frac{\rho}{\epsilon}$, \[\begin{equation} \rho = eN_A \qquad 0 < x < W. \end{equation}\]
The form below can be used to plot the band diagram of a Schottky contact using the depletion approximation.
$E_g=$ eV $W=$ μm $V_{bi}=$ V $C_j=$ nF/cm²
Band diagram

CurrentVoltage Characteristics
 
Charge density

Electric field
