Electrical – Compact on board AC to 5VDC converter

ac-dc

So I'm playing around with an idea, but I'd like a good, compact way to power it.

In the past I've used old wall warts to provide the power. Just find one with the power output I need, solder the AC power to the plug with some heat shrink tubing to insulate it, and then take the power output and put it where I need.

The problem with that is that they are bulky and hard to fit into a project box, and I'm hoping to have something a bit more professional.

So I started to do a little research and found this: AC/DC Converter, and it looks like it would do what I want in a very small package.

To reiterate, I want to be able to run a couple AC leads in, get DC power out to power circuits and stuff.

Edit:
Some details. I'm looking for a pretty compact solution that provides ~5vdc, ~.2A

The smallest wallwart style adapter I know about is the iphone adapter, and it's a little big. Something small that could be used to power a ESP8266 or Arduino ATMega without having to have a giant enclosure.

I was hoping to find something with a form factor similar to the one in the link, but part of my question is if that's even a possibility.

Edit:

Found this.

https://www.instructables.com/id/ESP8266-Wifi-Switch/

This is very similar to what I want to do, and they use a HLK-PM01 to turn AC power into 5V DC power, and a LD1117V33 change the 5V to 3.3V.

Besides the size, another problem I have with wallwarts is that they aren't consistent. Out of the dozen wallwarts I have laying around, I don't think I have 2 that are exactly the same.
Having a solution where I can order a handful of components and get consistent results is kind of a big deal.

Best Answer

You'll find hundreds of internal, print-mount, closed frame, open frame, ... power supplies on distributors like digikey.

So, as usual, a single property, in this case supply size, is seldom the only thing you look at when choosing a device.

The one you found is not a complete supply. Please at least open the datasheet from the website and look at the schematic... it's really just the controller for a power supply. All the bulky stuff is missing, and you'd have to add it yourself! Which is especially undesirable since that includes a custom flyback transformer.

So, the power supply category is right, but you're not looking into the right device.

Notice that for proper operation, most of the AC/DC converters for board mounting will still need proper fusing, filtering, and output decoupling.

You're typically off much cheaper and safer doing exactly what you did: Use a complete, enclosed, consumer power supply.