V-I characteristics of a Zener diode and its use as voltage regulator