Any variation of the charge within a p-n diode with an applied voltage variation yields a capacitance wich must be added to the circuit model of a p-n diode. The capacitance associated with the charge variation in the depletion layer is called the junction capacitance, while the capacitance associated with the excess carriers in the quasi-neutral region is called the diffusion capacitance.
Both types of capacitances are non-linear so that we will derive the small-signal capacitance in each case. We will find that the junction capacitance dominates for reverse-biased diodes, while the diffusion capacitance dominates in strongly forward-biased diodes. The total capacitance is the sum of both.
Expressions for the capacitances are obtained by calculating the change in charge for a change in applied voltage, or:
The junction capacitance is calculated using the expression for the parallel plate capacitance. This might at first seem unexpected since the charge is distributed throughout the depletion layer. However, when applying small voltage variations one finds that charge is only added and removed at the edge of the depletion region so that the capacitance simply depends on the dielectric constant, the area and the depletion layer width, yielding:
A capacitance versus voltage measurement can be used to obtain the built-in voltage and the doping density of a one-sided p-n diode. Plotting one over the capacitance squared one expects a linear dependence as expressed by: