Simple DC voltage regulator with zener diode and BJT. Output voltage is Zener diode's breakdown voltage minus Vbe (usually 0.7 V). This example has stabilised DC voltage of ~ 5 V. 1 kOhm resistor is the load, 220 Ohm resistor is for proper base bias. The formula for calculating the bias resistor value is:
R= Vs/((Id + IL/(hfe + 1))
where
Vs = stabilied voltage to be maintained across the load
Id = maximum current to be maintained through the zener diode
IL = maximum load current
hfe = BJT forward beta