  We show that in a simple experiment at undergraduate level, suitable to be
performed in classes of science and engineering students, it is possible to
test accurately, on a popular 1N4148 p-n diode, the range of the junction
currents where the Shockley equation model can be considered satisfactory. The
experiment benefits from a system of temperature control and data collection
driven in a LabVIEW environment. With these tools a large quantity of data can
be recorded in the temporal frame of a lab session. Significant deviations of
the experimental I-V with respect to the ideal behaviour curve predicted by the
Shockley equation are observed, both at low and high current. A better
agreement over the entire range is obtained introducing, as is customary, a
four parameters model, including a parallel and a series resistance. A new
iterative fitting procedure is presented which treats the I-V data of different
regimes on the same level, and allows a simultaneous determination of the four
parameters for each temperature selected. Moreover, the knowledge of the
temperature dependence of saturation current is used to estimate the energy gap
of silicon. The connection of a macroscopic measure with a microscopic quantity
is another valuable feature of this experiment, from an educational point of
view.
