A phone charger is a high-frequency switch-mode power supply (SMPS) that converts 120V or 240V AC mains into a regulated 5V to 20V DC output using a flyback transformer and pulse-width modulation. In a real circuit, this topology changes high-voltage alternating current into low-voltage direct current while providing critical galvanic isolation and dynamically negotiating current limits via USB Power Delivery (PD) protocols. People commonly confuse the external 'charger' (the AC-DC power brick you plug into the wall) with the internal charge controller (the Power Management IC inside the phone itself that actually manages the lithium-ion constant-current/constant-voltage charging curve). The brick is just a smart power supply; the phone is the actual charger.
The Core Architecture: Primary, Transformer, and Secondary
Crack open a modern 20W USB-C wall adapter, and you will not find a heavy, 60Hz iron-core transformer. Instead, you will find a high-frequency flyback converter operating between 65 kHz and 140 kHz. The circuit is strictly divided into two sides by an isolation barrier.
The Primary Side (High Voltage)
- Input Protection & Rectification: Mains voltage first hits a fuse and a Metal Oxide Varistor (MOV) for surge protection, then passes through a bridge rectifier (typically a compact MB10F surface-mount package) to convert AC to pulsing DC.
- Bulk Capacitor: A high-voltage electrolytic capacitor (usually rated at 400V or 450V, 10µF to 22µF) smooths the rectified waveform into a stable DC bus.
- PWM Controller & Primary Switch: This is the brain and brawn. Modern chargers use highly integrated ICs like the Power Integrations InnoSwitch3 or TinySwitch families. These chips combine the pulse-width modulation (PWM) controller, the high-voltage MOSFET switch, and primary-side protection circuits into a single package to save board space.
The Flyback Transformer
The transformer is the heart of the SMPS. Unlike a traditional transformer that transfers energy instantly, a flyback transformer stores energy in its magnetic core (specifically in an intentional physical air gap) when the primary MOSFET is ON, and dumps that energy into the secondary winding when the MOSFET turns OFF. It provides the mandatory galvanic isolation, ensuring that a fault on the mains side does not send 120V AC straight into your phone's battery.
The Secondary Side (Low Voltage)
- Rectification: The high-frequency AC pulses from the secondary winding are rectified into DC. Older chargers used Schottky diodes, but modern 20W+ chargers use synchronous rectification (a low-RDS(on) MOSFET) to minimize heat and maximize efficiency.
- Feedback Loop: To maintain a stable output voltage across the isolation barrier, the secondary side uses a shunt regulator (like the TL431) and an optocoupler (like the PC817). The optocoupler uses light to send error signals back to the primary PWM controller without breaking electrical isolation.
- Protocol IC: For USB-C PD chargers, a dedicated microcontroller (such as the HUSB238) sits on the output pins, communicating with your phone via the CC (Configuration Channel) pins to negotiate whether the output should be 5V, 9V, 12V, or 20V.
Inside the Flyback Topology: A Numeric Breakdown
Let's look at the actual math governing the magnetics inside a standard 20W USB-C PD charger configured to output 9V at 2.22A. Understanding these numbers is crucial if you are designing custom power rails or winding your own transformers for a DIY bench supply.
Assumptions:
- Input: 120V AC RMS, which rectifies to roughly 170V DC peak. Under heavy load, the bulk capacitor discharges, dropping the minimum DC bus voltage (V_IN_MIN) to about 100V DC.
- Output: 9V DC.
- Secondary diode forward voltage drop (V_F): 0.5V (Schottky).
- Target Reflected Voltage (V_OR): 90V. This is the voltage spike reflected back to the primary side when the secondary diode conducts. We keep it around 90V to leave safe headroom for a 650V-rated primary MOSFET.
1. Calculating the Turns Ratio (N)
The turns ratio between the primary and secondary windings dictates the voltage step-down. The formula is:
N = V_OR / (V_OUT + V_F)
N = 90V / (9V + 0.5V)
N = 90 / 9.5 = 9.47 : 1
For every 9.47 turns of wire on the primary side, there is 1 turn on the secondary side.
2. Calculating the Maximum Duty Cycle (D)
The duty cycle determines how long the primary MOSFET stays ON. It is worst-case (highest) at the lowest input voltage.
D = V_OR / (V_OR + V_IN_MIN)
D = 90 / (90 + 100)
D = 90 / 190 = 0.473 (47.3%)
At low-line mains, the primary switch is ON for roughly 47% of the switching cycle, storing energy in the core gap, and OFF for 53%, transferring it to your phone.
Where You Meet This in Practice
You rarely need to repair a $15 phone charger; the labor cost exceeds the replacement value. However, understanding the parts of a phone charger becomes highly practical in three specific scenarios:
- Embedded Systems & IoT Prototyping: When building a mains-powered ESP32 smart home sensor, you need to drop 120V AC to 3.3V or 5V DC. Recognizing the flyback topology helps you select the right off-the-shelf isolated module rather than risking a non-isolated capacitive dropper circuit that leaves your microcontroller floating at lethal mains potential.
- Salvaging Components: Dead chargers are goldmines for the workbench. The 400V bulk capacitors, MB10F bridge rectifiers, and TL431 shunt regulators are perfectly fine to harvest and reuse in your own linear or switching power supply builds.
- Diagnosing 'Slow Charging' Issues: If a phone charges slowly on a known-good cable, the issue is often a degraded secondary-side synchronous rectifier or a failing optocoupler inside the brick. The power supply fails to negotiate the higher USB-PD voltage tiers and defaults to a safe 5V/1A fallback mode.
Decision Tree: Choosing the Right Power Module for Your Build
If you are designing a project that requires stepping down voltage, do not attempt to spin your own flyback PCB unless you have extensive magnetics design experience. Use this decision matrix to select the correct pre-certified module.
| Project Scenario | Galvanic Isolation Needed? | Power Level | Concrete Pick (Part/Module) |
|---|---|---|---|
| Mains (120V AC) to 5V logic for an Arduino/ESP32 sensor node enclosed in plastic. | Yes (Mandatory for user safety and noise immunity) | < 5W | Hi-Link HLK-PM01 (Add a 1A fuse and MOV on the AC input side). |
| Mains (120V AC) to 5V/3A to power a Raspberry Pi 4 and a relay board. | Yes | 15W - 25W | Mean Well LRS-35-5 (Enclosed supply) or Mean Well IRM-20-5 (PCB mount). |
| 12V Lead-Acid/LiFePO4 battery to 5V USB logic for a solar telemetry station. | No (Already operating at safe SELV DC levels) | < 15W | MP1584EN Buck Module (Set the trim pot to 5.0V before connecting the load). |
| Mains to USB-C PD (Variable 5V-20V) for a DIY laptop charging dock. | Yes | 65W+ | CUI Inc. SDM65-20-U-P5R (Desktop adapter) or a pre-certified GaN USB-C PD module from a reputable supplier like Digi-Key. |
Frequently Asked Questions
Why do phone chargers squeal or whine when left plugged in without a phone?
This is called 'pulse skipping' or 'burst mode.' To maintain high efficiency at zero or ultra-light loads, the PWM controller turns off for long periods and only fires a single pulse when the output voltage drops slightly. If the switching frequency drops into the human hearing range (typically below 20 kHz), the physical vibration of the transformer windings and ceramic capacitors (due to piezoelectric effects) creates an audible whine. It is normal and not a sign of impending failure.
Can I use a 65W laptop USB-C charger to charge my 20W phone?
Yes, absolutely. The USB-PD protocol IC inside the charger and the PMIC inside the phone perform a digital handshake before any high voltage is applied. The 65W charger will default to 5V until the phone explicitly requests 9V or 12V. The '65W' rating is a maximum capability, not a forced output. For more on protocol negotiation, refer to the USB Implementers Forum Power Delivery specifications.
What is the difference between a flyback charger and a GaN charger?
GaN (Gallium Nitride) refers to the semiconductor material used in the primary switching MOSFETs, not the topology itself. A GaN charger is still a flyback (or sometimes an active-clamp flyback or LLC resonant) SMPS. However, GaN transistors switch much faster and with lower parasitic capacitance than traditional silicon MOSFETs. This allows the charger to operate at much higher frequencies (often 250 kHz to 1 MHz), which drastically shrinks the physical size of the flyback transformer and bulk capacitors. For a deeper technical dive into magnetics design, All About Circuits provides an excellent primer on flyback converter fundamentals.






