# How a Switching Power Supply Works

By C

Topic: Physics &amp; Chemistry

[Open the interactive Jig](https://ask.jig.com/j/YLgDwtZVRKHL)

## Guide

### 1. A tiny box with a big job

A phone charger takes electricity from the wall and turns it into the gentle power a phone can use\. This model is about fifteen times bigger than a real charger\. Let's open it and follow the energy\.

Drag anywhere to turn the model\.

### 2. Wall power wiggles

The socket gives alternating current, or AC: it pushes and pulls back and forth 50 or 60 times a second, at 100 to 240 volts\. A phone needs a steady 5 volts flowing one way, called direct current, or DC\. A fuse and a filter coil guard the entrance\.

Orange dots show AC rocking back and forth\. Pick your country's mains to see it on the screen\.

### 3. Turn it one way

Four diodes, which are one\-way gates for current, form a bridge\. Whichever way the wall pushes, the bridge sends the current out in the same direction\. Now it only flows forward, but in bumps\.

The screen shows the bumps: every push now points up\.

### 4. Fill the tanks

Two big capacitors work like small tanks\. They fill on every bump and top up the gaps between them\. The result is smooth, high\-voltage DC: about 170 volts from 120\-volt mains, or 325 volts from 230\.

### 5. The switch that never rests

Here is the trick that names the design\. A transistor, an electronic switch with no moving parts, turns the power on and off about 70,000 times every second\. A small control chip tells it exactly when\.

Shown here slowed down tens of thousands of times\.

### 6. A tiny transformer

While the switch is on, current builds a magnetic field in the transformer's dark ferrite core\. When it turns off, that energy jumps to a second coil with fewer turns, at a lower voltage\. Fast switching lets a real one be about the size of a sugar cube\.

Blue loops show the magnetic field\. A 50\-hertz transformer for the same job would be far bigger\.

### 7. A safe gap

The wall side and the phone side never touch\. In a real charger about 6 millimetres of empty space separates them, and only magnetism and light cross it\. That gap keeps the cable in your hand safe\.

The glowing line marks the gap cut through the circuit board\.

### 8. Smooth 5 volts out

On the phone side, another diode lets the pulses through one way and more capacitors smooth them out\. A steady 5 volts of DC leaves through the USB socket, ready for a phone\.

Green dots show the low\-voltage power for the phone\.

### 9. Always just right

A tiny chip called an optocoupler watches the output and reports back with light\. When the phone needs more power, the controller keeps the switch on a little longer each time\. The pulses widen, yet the output stays at 5 volts\.

Violet dots are the light signal\. Laptop and TV power supplies use the same switching idea\.
