The Circuit Design
The function of the various components used across the various stages of the above shown voltage controlled transformerless power supply circuit may be understood from the following points:
The mains voltage is rectified by the four 1N4007 diodes and filtered by the 10uF/400V capacitor.
The output across the 10uF/400V now reaches around 330V which is the peak rectified voltage achieved from the mains.
The voltage divider network configured at the base of the TIP122 makes sure that this voltage is reduced to the expected level or as required across the power supply output.
If a 12V is required the 10K pot may be set to achieve this across the emitter/ground of the TIP122.
The 220uF/50V capacitor ensures that during switch ON the base is rendered a momentary zero voltage in order to keep it switched OFF and safe from the initial surge in-rush.
The inductor further ensures that during the switch ON period the coil offers a high resistance and stops any inrush current to get inside the circuit, preventing a possible damage to the circuit.
For achieving a 5V or any other attached stepped down voltage, a voltage regulator such as the shown 7805 IC may be used for achieving the same.