Sometimes you don't have any transformer but you have to make a power supply. Don't worry here is the solution to this. Through the transformerless power supply, you can convert the 220V AC to 12V/6V DC.
What is the Transformerless Power Supply?
A transformerless power supply converts High AC input voltage (120V or 230V) to the desired output DC low voltage (3V or 5V or 12V) with low current output in milliamps.
The output current of this power supply is very less i.e. in milliamps.
Components Required-
104J, 400V capacitor
100V, 25V capacitor
4x1N4007 diode