### Diffusion in Semiconductors

It is seen that in conductor current flow is due to the free electrons. When conductor is subjected to an external voltage, free electrons move from negative to positive terminal with a steady velocity constituting a current. Such a current is called drift current which is due to drifting of free electrons under the externally applied voltage.
In addition to the drift current, there may exist an additional current due to the transport of charges in a semiconductor. Such an additional current is due to the phenomenon called diffusion. This is the characteristic of semiconductor and can not be observed in conductors. The current due to the diffusion is called diffusion current. Basically it is due to nonuniform concentration of charged particles in a semiconductor.
Note : Diffusion is observed in non uniformly doped semiconductors and not in the conductors.
Consider a p-type semiconductor bar which is nonuniformly doped. Along its length, in the direction of x as shown in Fig. 1(a), there exists a nonuniform doping. As x increases, the doping concentration decreases.
To form p-type semiconductor, acceptor impurity is added which creates holes as the majority charged particles. Let p be the concentration of holes. But due to nonuniform doping it is not constant but is changing with respect to x.
Let concentration of holes at x = 0 is P = P(0) and is maximum as bar is heavily doped at x = 0. As x increases, the concentration of holes decreases. The nature of the variation in p against distance x is shown in the Fig. 1(b).
The slope of the graph can be observed from the Fig. 1(b) is the ratio of change in concentration to change in distance. It is called rate of change of concentration or concentration gradient.
...             Slope of graph = Concentration gradient = dp/dx                       ................ (1)
Hence nonuniform doping produces a concentration gradient in a semiconductor. Due to such concentration gradient, holes move from the higher concentration area to the lower concentration area to adjust the concentration. Such a movement of holes, due to the concentration gradient in a semiconductor is called diffusion. Due to the movement of holes, current is constituted in a bar which is called diffusion current. There exists such a diffusion current in n-type semiconductor if it is nonuniformly doped, due to movement of electrons which are majority carriers.
Note : Nonuniform doping creats concentration gradient, due to which diffusion of charge carriers exists.
1.1 Diffusion Current Density
Consider a nonuniformly doped p-type semiconductor bar as shown in Fig 1(a).
The diffusion current density is proportional to the concentration gradient, which is responsible for the diffusion and hence the diffusion current.
...                  Jp  α   dp/dx                                                       ............ (2)
where Jp  = Diffusion current density due to holes
Hence the diffusion current density is expressed by,
Jp  = q Dp    dp/dx
where  Dp  = Diffusion constant for holes expressed in square meters per second (m2/sec).
Note : The current due to holes is in the direction of the conventional current and hence treated as positive. But slope of the graph i.e. dp/dx is negative giving the negative diffusion current density for holes. But to get positive sign for holes, an additional negative sign is used to compensate for negative sign of dp/dx. Hence diffusion current density for holes is mathematically expressed as,
Jp  = - q  Dp    dp/dx                                                      ............. (3)
In case of n-type bar, such diffusion current is due to the electrons. Current due to the electrons is in opposite direction to the conventional current and mathematically treated to be negative. The concentration gradient  dn/dx is negative where n is concentration of electrons.
Hence diffusion current density to electrons is expressed by,
Jn  = + q  Dn                                                               .............. (4)
where Dp  = Diffusion constant for electrons in square meters per second (m2/sec).
The Fig. 2(a) shows the direction of diffusion of holes and corresponding diffusion current density. The Fig. 2(b) shows the direction of diffusion of electrons and corresponding diffusion current density.
 Fig. 1  Diffusion current densities

Observe that the charge carriers whether it is hole or electron, always move from high concentration area towards low concentration area. Hence direction of diffusion is same in both the cases. But resulting current densities have opposite direction.
1.2 Total Current Density Due to Drift and Diffusion
We have seen that the drift current is due to the applied voltage while the diffusion current is due to the concentration gradient. But in semiconductor it is very much possible that both the types of currents may exist simultaneously. In practice is such situation there exists four components of current as the drift current due to electrons and due to holes, while the diffusion current due to electrons and due to holes.
Drift current density due to the electrons and holes can be expressed from equations (3) and (4) as,
Jn  = n q E      and Jp  = p q E
Diffusion current density due to the electrons and holes can be expressed from equations (3) and (4) as,
Jn  = + q Dn dn/dx   and Jp  = - q Dp  dp/dx
Total current density due to the electrons can be expressed as,
Jn  = n q μn E + q Dn dn/dx                               .............. (5)
and Total current density due to the holes can be expressed as,
Jp  = p q μp E + q Dp   dp/dx                           .................. (6)
And hence the total current density due to the electrons and holes (drift + diffusion) is,
J = Jn  +  Jp                                                      ................. (7)