The blocks of a power supply
12 minutes · Intermediate
Simulations and quizzes aren't read aloud; pause when you reach them and try them out.
Every circuit you build needs a power supply. But the 220–230 V AC at the wall socket is the exact opposite of what electronic circuits want: a very high, constantly reversing and noisy voltage. A power supply is the circuit that turns it into the clean, steady 5 V (or 3.3 V, or 12 V) a microcontroller wants. In this course you'll learn every step of that conversion.
Conversion in four steps
- Transformer: steps the mains AC down to a lower, safer voltage such as 12 V AC. It also electrically isolates the circuit from the mains.
- Rectifier: using diodes, it either cuts off the negative half-cycles of the AC or flips them positive. The output is now one-way, but in humps.
- Filter: a large capacitor charges at the tops of the humps and discharges in between. The voltage becomes almost flat, leaving a small ripple.
- Regulator: removes the ripple and input variations and holds the output at a fixed value. Even if the load current changes, the voltage doesn't.
Linear and switch-mode supplies
Linear power supply
The classic structure above: 50 Hz transformer + rectifier + filter + linear regulator. It's simple and gives a very clean, quiet output. But it's heavy, large and inefficient: excess voltage turns into heat.
Switch-mode power supply (SMPS)
Phone chargers and laptop adapters work this way. It converts the voltage by switching it tens of thousands of times a second. It's small, light and 85–95% efficient. But the design is complex and there's high-frequency noise on its output.
Values that describe a power supply
| Value | Meaning |
|---|---|
| Output voltage | For example 5 V. On adjustable supplies, a range: 1.25–20 V. |
| Maximum current | The current the supply can deliver without overheating or its voltage dropping. For example 2 A. |
| Ripple | The unwanted AC component on the output, usually in mV. |
| Load regulation | How much does the output voltage change when the load current changes? |
| Efficiency | The ratio of output power to power drawn from the input. The rest turns into heat. |
We don't touch mains voltage in this course
Mains voltage can kill. All the practical work in this course is done with the low-voltage outputs of ready-made, certified adapters: adapters with a 12 V AC output (AC-AC adapters) or 12–24 V DC adapters. Don't open the mains side of a transformer, wind your own or solder to it.Test yourself
1. What is the job of the rectifier?
2. Which block removes the small ripple and variations on the output?
3. What type of power supply is a phone charger usually?
4. What is the biggest disadvantage of a linear power supply?
This was the free first lesson of the course
The remaining 8 lessons of Power Supplies, with their simulations and quizzes, unlock when you buy the course.
See the full course →