0
\$\begingroup\$

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.

\$\endgroup\$
  • 4
    \$\begingroup\$ Use a generic supply, like a usb charger. Diy mains adapters are neither simple or efficient. \$\endgroup\$ – Passerby Dec 29 '15 at 1:16
  • \$\begingroup\$ 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. \$\endgroup\$ – MarkU Dec 29 '15 at 1:27
  • 1
    \$\begingroup\$ Related: electronics.stackexchange.com/questions/34745/… \$\endgroup\$ – MarkU Dec 29 '15 at 1:28
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – helloworld922 Dec 29 '15 at 2:19
  • 1
    \$\begingroup\$ @passerby nor safe in many cases. Just saying. \$\endgroup\$ – Asmyldof Dec 29 '15 at 2:24
1
\$\begingroup\$

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...

\$\endgroup\$
4
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ Dismantling devices that use mains voltages is dangerous and should be attempted with care.. Your answer simplifies a potentially lethal task. \$\endgroup\$ – David Dec 29 '15 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.