A mobile charger works on the simple principle of conversion of AC(alternating current) to DC (direct current).This is an animated video on the working of a mobile/smartphone/cellphone charger that converts 220 Volts AC to 5 Volts DC with the help of an optocoupler using Switch Mode Power Supply(SMPS).
Both the transistors, S8050 and 13001, are NPN Bipolar Junction Transistors.The numbers on SMD Resistors are their values in ohm (Ω), not their codes.Correction- In the video the fusible resistor is 2.6Ω and not 260kΩ. Watch the video from Explorer for more info:
As we connect our charger to 220V AC direct from the switchboard the first job of the charger is step down the high 220V in 9V (or 10V in some cases). In transformer there are primary and secondary coils which step up or step down the voltage according to the no of turn in the coils.Selection of proper transformer is very important. Current rating depends upon the Current requirement of Load circuit (circuit which will use the generate DC).
The output after the Rectification is not a proper DC, it is oscillation output and has a very high ripple factor. We don’t need that pulsating output, for this we use Capacitor. Capacitor charge till the waveform goes to its peak and discharge into Load circuit when waveform goes low. So when output is going low, capacitor maintains the proper voltage supply into the Load circuit, hence creating the DC.//via: quora/Rahul Yadav