One Charger Holds 5 Volts in Any Country by Changing How Long Its Switch Stays On
It works like adjusting a shower, except it checks continuously and its switch knows only on or off.

semiconroom.com · How AC Adapters and Chargers Work: From Wall Outlet to 5 V | Semiconductor RoomPlug the same phone charger into a 100-volt outlet in Japan or a 240-volt outlet in Europe and it still puts out about 5 volts. It does not know which country it is in. It just watches what is coming out and fixes mistakes as fast as they happen.
Inside a modern charger, a power transistor acts as a switch that flicks on and off about 50,000 times a second. The longer it stays on during each flicker, the more power moves through to your phone. When the phone suddenly draws more current, the output voltage dips a little. When the wall voltage runs high or low, the output tries to move with it.
A circuit on the phone side of the charger measures the actual output against an unchanging target held inside, second by second and far faster than a person could check. If the output is low, it reports the gap to a control chip on the wall side, and that chip leaves the switch on a little longer. If the output is high, the chip shortens the on time.
Engineers call how much of each cycle the switch spends switched on the duty cycle, and they call the whole loop feedback, because the result feeds back to change the next action. That loop is why input voltage hardly matters. The charger does not aim for a fixed setting, it aims for a fixed result.
It works a bit as a shower does. You sense the stream, and when it runs hot you ease the handle back, and when it runs cold you open it more. The difference is that you check every few seconds and can turn the tap smoothly, while the charger watches continuously and its switch knows only on or off. It sets the amount only by changing the share of on time.
The same trick allows fast charging. Under a standard called USB PD, a phone can request 9 volts or 20 volts instead of 5, and circuitry near the phone plug simply changes the target the feedback loop is chasing.
Questions people ask
How quickly does the charger actually correct itself?
The switch itself flicks about 50,000 times a second, and the control loop can adjust the on time from one cycle to the next. That means a correction can start in far less than a millisecond, long before you would notice a dimming screen or a slowdown in charging.
Does the same system handle fast charging at higher voltages?
Yes. The phone and charger talk over the USB cable, and the charger changes its target voltage from 5 volts to, for example, 9 or 20 volts. The same feedback loop then holds that new target steady by adjusting the switch timing.
Does feedback only fix changes caused by my phone?
Partly. Ordinary wall voltage also wobbles with demand on the grid and with wiring losses, and older chargers passed much of that wobble to the output. The feedback loop cancels most of it, which is also why one charger can be sold for both 100-volt and 240-volt countries.