0

In short, I'd like to power Arduino-like devices (small PIC devices as well) run off of a mains socket at 240VAC - which obviously can't be done with a simple wire. I assume I'd need an output anywhere between 3 and 5 volts DC.

I don't want to use a generic plug power supply as they're usually designed for higher current outputs (I'd probably need 500mA at most - the processor and a couple of LED indicators), can cost a reasonable amount and I'd like to up my electronics knowledge/DIY skills by creating something myself (even if it is just a couple of soldering joints).

Also, when I say "best", I mean either the simplest to build or most efficient (or a combination of both).

My apologies for the generic question, I've just never done this sort of thing and I'm not sure how to word it properly.

Karl
  • 45
  • 1
  • 4
  • 4
    Use a generic supply, like a usb charger. Diy mains adapters are neither simple or efficient. – Passerby Dec 29 '15 at 01:16
  • A supply rated "5V @ 500mA" will supply 5V to the load, at any current between 0mA and 500mA. The supply only gives as much current as the load takes, as long as the load current is less than the supply's rated output current. – MarkU Dec 29 '15 at 01:27
  • 1
    Related: http://electronics.stackexchange.com/questions/34745/choosing-power-supply-how-to-get-the-voltage-and-current-ratings – MarkU Dec 29 '15 at 01:28
  • @MarkU I realise that, but supplies capable of providing higher current tend to cost more (and they start at like 1.5A from what I've found) and are apparently more inefficient. – Karl Dec 29 '15 at 01:29
  • 1
    It's hard to beat the economy of scale; a supply you design yourself and build one or two of is almost certainly going to cost more for the same performance than one made in the millions. – helloworld922 Dec 29 '15 at 02:19
  • 1
    @passerby nor safe in many cases. Just saying. – Asmyldof Dec 29 '15 at 02:24
  • Mean-well sells a line of chasis-mount, open frame, and fully enclosed smp supplies at 1-3A in a variety of output voltages (and adjustable) for $10-20, you can't possibly hope to beat that in cost, efficiency, safety, and convenience if you roll your own. – crasic Dec 29 '15 at 19:18
  • e.g. [this](http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_1919043_-1) – crasic Dec 29 '15 at 19:19
  • @crasic I've found and used them for larger projects before, but I was just wondering if there was a smaller and cheaper alternative for devices which require just a few hundred milliamps. – Karl Dec 29 '15 at 19:52
  • @Karl you should peruse the catalog of any major distributor, many manufacturers have small current options including fully encapsulated (small cube) and other small form factors and bare PCB's – crasic Dec 29 '15 at 19:55

3 Answers3

4

For safety, you'll need to use a transformer. You probably can't find one that is smaller than 500 mA @ 5 V capable. If you use a simple bridge rectifier and 7805 LDO, you'll have a system that is larger, less efficient and has worse wasted power than nearly any simple cellphone power adapter.

jp314
  • 18,395
  • 17
  • 46
1

The way you would need to do it is design a flyback SMPS - This is what is in every USB charger ever made... So why design it again when you can just pick one up for 5$ somewhere, the design will be long, and if not done right, it could be deadly.

Keep in mind 5V @ 500mA is not really 'low power' that was the normal USB supply for the last ~10 years. That is 2.5W...

I'll also add they are fairly efficient. A well designed USB charger with synchronous rectification should be >80% efficiency. You will be hard pressed to get this level of efficiency from your first custom design...

MadHatter
  • 3,506
  • 1
  • 19
  • 45
1

You can use a transformer for isolation and safety, and then rectify it with a full-bridge before doing DC-DC conversion. The whole conversion would probably be best done with a simple SMPS topology like @MadHatter suggested. Flyback is probably the simplest and integrates the transformer into the design for you.

You can get some off-the-shelf parts and build it yourself or just grab the parts out of a 5V USB charger. Check out some datasheets online because you may just be able to get a few samples from digikey.

Is fabbing a small PCB out of the question for you? Would probably be a pretty quickly design.

jonnyd42
  • 323
  • 1
  • 3
  • 11
  • Dismantling devices that use mains voltages is dangerous and should be attempted with care.. Your answer simplifies a potentially lethal task. – David Dec 29 '15 at 21:33