# Simple SMPS power supply using buck converter

I'm a pretty new hobbist in this field. I wanted to try to create a simple and cheap power supply that transforms 220 V, 50 Hz AC into 15 V, 8 A DC, but I really can't understand how.

I've tried the most simple approach using a full-bridge rectifier, a transformer, and a capacitor, but this way it seems very difficult to find a transformer that has such power and that is affordable and moreover, the efficency is very low.

Thus I've tried to search for alternatives and I started learning about SMPS. I planned to make the same power supply as an SMPS using a 555 timer to produce the switch signal, but I struggle to determine the capacity and the inductance of the capacitor and inductor, respectively.

I've been trying with buck converters: are they suitable for this job (I want to keep the circuit as simple and cheap as possible)? How can I calculate the output current of the converter, such that, if I know the output voltage and the power, I can adjust the components?

If this approach is not suited for the job, can it be feasable to first step down the voltage to some value between 220 V and 15 V using a transformer and then use the buck converter circuit?

• Are you sure you can design a safe SMPS? I recommend to buy one. Even if you did design one, the simplest approach is to use a specific chip and use the examples of chip manufacturer, instead of trying to hack it together by using an 555. Commented Jan 28, 2023 at 16:15
• I know book recommendations are discouraged, but arrl.org/news/new-book-power-supplies-explained-now-shipping Commented Jan 28, 2023 at 16:23
• The 555 would sound like the least sensible chip for this… like @Justme says, there's dedicated chips that do all you need to design an actual power supply, and it's really not clear to me how you're going to do something like at least rudimentary overcurrent protection to avoid catastrophic failure with a 70 years old comparator/timer IC? That feels like asking "I want to build a safe car; I think I should be using this Emmentaler cheese, as it comes in wheels, and cars needs wheels, right?" Commented Jan 28, 2023 at 16:34
• I'm torn between discouraging you for safety reasons, and encouraging you to be fearless. If you're going to go down this path, start by learning everything you can about shop safety around this level of voltage -- because it can kill you in seconds, or burn your house down. Then be prepared for a lot of failures before you succeed. At a minimum, you'll need an isolation transformer, an oscilloscope rated for at least 10x the bandwidth of your switching frequency (more is better), safety glasses, and a fire extinguisher. And good judgement, and a work area clear of flammables. Commented Jan 28, 2023 at 17:01
• I've been trying with buck converters: are they suitable for this job? <-- well, you've discounted transformers earlier in your question and, buck converters don't use a transformer but, you need a transformer to provide AC to DC isolation. Result: use a proper SMPS flyback design. You can get flyback designs that cope with an output load of 120 watts. However, they are definitely not for beginners. Commented Jan 28, 2023 at 17:01

"Simple" does not go with "off-line* power converter". It also doesn't go with a 120W switching power supply.

And note that if all you want is one supply that's capable of 15V and 8A, the easiest and cheapest way to do that -- assuming you live somewhere that has access to them -- is to go shopping on a surplus electronics website, or go dumpster-diving (or ask nicely) at a repair depot.

Even low-power power (up to 10W or so) supply design tends to be a bit of a specialty. Off-line supply design tends to be an advanced topic, even for professionals. You need to get the actual supply part right, you need to do it with dangerous voltages running around, if you're ethical you need to get the end-user safety part right, and if you're going to sell it (or the product it's in) you need to get the regulatory compliance right.

All in all, there is a very good reason that every electronics distributor in the world carries a wide selection of manufactured off-line supply circuits in the form of wall-warts, bricks, and modules. It's also why so many things out there are powered by wall-warts or bricks (or have a 3rd-party module built in) rather than powered by a supply designed by the manufacturer.

But, to sorta answer your question: no, you do not want to use a buck converter for an off-line, 220VAC to 15VDC converter. First, because buck converters are not isolated and unless you have a very specialized use where the electronics can be at line voltage you do want isolation. A flyback design allows for isolation. Second, because when the voltage ratio gets to be around 5:1 or 10:1, a flyback converter makes more sense anyway.

Note that if you're determined, you could use and old-style linear supply (with a big, hard-to-find transformer) with an unregulated 24VDC output, and buck that down to 15V. That's how this sort of thing was done in the 1980's.

"How to build an off-line power supply" probably occupies half a book, assuming you're already at the very advanced hobbyist or are halfway through a program of study in a university. So I can't tell you everything you need to know in this post -- I'm just going to outline it.

But if you're determined, the general top-level design of a 120W off-line power supply will be:

## Note that the front end is not isolated from line voltage, and presents all kinds of shock hazards

On the high voltage side

I'm totally leaving aside the topic of how to make this safe. It involves all the usual construction details of working with off-line voltages: make it sturdy, make it so that no one (not even you) can touch any "hot" circuit elements, make it so that it's obvious to any would-be repair people that accessing the "hot" circuit elements is not a normal user activity (i.e., make it so they have to remove multiple screws and take things apart).

You need:

• A rectifier. These are probably the same old bridge rectifiers that we've been using since the 1950's (earlier if you count vacuum tubes). The output would be strongly pulsating DC.
• Probably -- perhaps even optionally -- a power factor correction pre-regulator -- I'm not sure where regulations kick in on this. This would extract power from the rectifier's pulsating DC in a way that doesn't generate current harmonics. The output would be a (probably) 300-ish volt rail with respect to local (to the line-powered section) ground.
• Some sort of local "bootstrap" supply, to get things going and supply the (probably) 12V DC needed by local circuitry.
• The switches, that chop the local DC supply and apply it to a flyback transformer.
• The transformer primary. This transformer can be far smaller than a transformer that runs at 50Hz, roughly in proportion to the switching frequency.
• At least some of the control circuitry.

In the middle

Part of safe design is making sure that the middle part provides a galvanic barrier between line and user. Most developed countries have regulations for this that are actually pretty sensible. If you happen to live somewhere that doesn't have clear regulations, you may consider it ethical to follow European and North American standards -- if you can meet both of those at the same time, you should be good the world over.

• The transformer core
• Some sort of communications medium for control signals. This varies from supply to supply, but the state of the output needs to be communicated back to the high voltage side, or the transistor control pulses do.

On the low-voltage side

• The transformer secondary
• The output rectifiers and filtering
• The rest of the control circuitry

* "Off-line" in power converter talk means "gets power off the lines".

• Thank you for your answer, your warnings make sense and you're right: I shall learn more and return here afterwards. Anyway thanks for your patient! (Just to be clear: the intention was not to sell the power supply in any sense, it is just a power supply I needed to power up a peltier cell to realize the cooling system for a cloud chamber, and I though it would have been more exciting to build one myself) Commented Jan 28, 2023 at 17:16
• Well, the reason for the long answer was that I wanted to leave the decision to you. You'd certainly come out the other end with more knowledge than you had going in! Commented Jan 28, 2023 at 18:26