34

There are a lot of methods to power an Arduino from a large range of voltages:

  • USB cable from PC or from a phone charger or an USB hub
  • step down converters
  • step up converters
  • switching power supply
  • batteries (connected to the power jack or USB or to Vin)

What I can't seem to find is a small 220V-5V converter. I'd like to put an Arduino in the wall, under a light switch, so size matters.

The last resort option is to open a 5V phone charger and replace the metal prongs that go in a socket with two wires, and replace the USB socket with another pair of wires that go the Arduino board, but still, an Arduino Pro Mini or an Arduino Nano is smaller than the phone charger.

Ricardo
  • 3,390
  • 2
  • 26
  • 55
vlad b.
  • 749
  • 2
  • 7
  • 13

14 Answers14

13

I can suggest you to try this : AC DC Step Down Converter

It is as small as the Apple's tiny cube, and it can be placed inside of a wall easily. (I'm personally using this with an arduino micro)

10

Nowadays, most smartphones come with a charger that is linked to the USB plug of the phone.

The charger for my HTC says: 5V, 1A, I guess this voltage must be regulated (but I haven't checked it has the charger is sealed).

enter image description here

The charger itself has a female USB socket on which you can plug any USB cord to link to your Arduino.

IMPORTANT! I have never tried it myself! I would not bet my life on it! It would be wise to check the output voltage is well regulated.

jfpoilpret
  • 9,162
  • 7
  • 38
  • 54
8

The last resort option is to open a 5v phone charger and replace the metal prongs that go in a socket with two wires, and replace the usb socket with another pair of wires that go the arduino board, but still, an Arduino Pro Mini or an Arduino Nano is smaller than the phone charger.

You will probably have to do something like that.

Because of the nature of conversion between AC and DC, there has to be some large parts.* I'm not going to go into the specifics here. There is usually a diode bridge (because AC waveforms reverse the current ~60 times a second) and a transformer (to lower the voltage for the diode bridge). They almost always include a regulator and a capacitor to make sure voltage is exact and it outputs a "clean" power supply.

*Switching power supplies, although considerably more expensive, are a lot smaller and more power efficient.

This adapter seems to be the most compact adapter I can find for 220V. You'll never get something near the size you are desiring, even with a switching power supply. I don't know the size of the Amazon adapter I gave a link for, but in the US (120V), iPhone chargers are very small and they should fit in a standard depth outlet box (with a little room left over for relays and such). If you really need to get everything smaller, I recommend using a ATtiny chip.

How I recommend connecting this:

I would avoid ripping this apart at all costs from a safety perspective. It would be really easy to send 220V to your Arduino if you're not careful. If you absolutely have to, you might want to coat it with some non-conductive epoxy or other coding. Note: this may act as a thermal insulator, therefore reducing the lifespan of the part. You should just coil some wire around the prongs, and then melt a little solder onto each of the terminals. Then, cover that with electrical tape and pigtail (with a wire nut) into a source power line. Note: you probably are doing wiring that could be illegal in your area. Check your local building codes before attempting this.

After that, attach a USB cord to the socket and to the Arduino or the ATtiny/ATmega328 chip 5V/GND input (of coarse, after cutting and stripping one end of the USB cord). I would also, after finalizing all the code and circuitry, seal that with some epoxy or somehow add it to an enclosure to make sure you don't fry your Arduino if a loose wire touches the Arduino circuitry.

If you don't feel safe doing any of the above, don't do it. You can live without a Arduino light switch.

That being said, happy hacking! :P

Anonymous Penguin
  • 6,365
  • 10
  • 34
  • 62
5

I use this one, 5V, 3W, very small, and only $3 on Aliexpress. http://www.hlktech.net/product_detail.php?ProId=54

Devrope
  • 51
  • 1
  • 2
4

Try an LED driver. Their typical output is 11.8V DC, which is in perfect specs for the Arduino. You can find them nowadays in all shapes and sizes, round or square, low profile or boxy. A 500ma version (6W) is more than enough for your needs.

boma40
  • 41
  • 1
4

There are small board-mount AC/DC converters like this one http://www.digikey.com/product-detail/en/BP5063-5/BP5063-5-ND/658569

DrewTM
  • 41
  • 2
4

The smallest is probably a plug-in USB charger such as Apple's tiny cube. The cheapest is bound to be a ~9v (output) wall-wart scrounged from the lost and found in a tourist's/traveller's hotel.

JRobert
  • 15,407
  • 3
  • 24
  • 51
4

An obvious answer has been omitted which is: transformerless power supply. If your average power requirements are low (<10mA) then this is the most compact way to achieve the desired voltage.

For an in-depth study see: http://ww1.microchip.com/downloads/en/AppNotes/00954A.pdf

Another solution: jeelabs.org /2011/11/27/ultra-low-power-supply/

Some limitations:

  • safety - NONE - your circuit might now be floating at line voltage
  • heat dissipation - calculate here: www. daycounter.com/Circuits/Transformerless-Power-Supplies/Transformerless-Power-Supplies.phtml
  • low current - no servos or relays
  • voltage fluctuations on the line might affect the circuit
brainwash
  • 141
  • 1
4

wanted to do a similar thing and I found and just ordered these:

http://uk.farnell.com/recom-power/rac03-05scr-277/conv-ac-dc-3w-90-305v-in-5v-out/dp/2289701

A fully sealed power supply, disk-shaped, 5cm diameter and 11mm thick. THey are available in 3.3V, 5V, and 12V. They are designed to be put inside walls or behind switches.

hobie
  • 487
  • 2
  • 5
  • 12
3

Try something like this. It's 29x15mm and does 220V AC to 5V/3W DC.

2

Nov 2016 Here is a list of compact PCB mounted power supplies that are small (~50mmx25mmx20mm) from Mouser:

http://www.mouser.com/Power/Power-Supplies/AC-DC-Power-Modules/_/N-dv0g5?Ns=Output+Current-Channel+1%7c0&No=25&P=1yxt7eu

These all take in 120-240VAC and provide outputs in the range of 3 - 5 vdc with varying options for current.

The 5V 1A from Meanwell (IRM-05-5) looks like a good deal at $8.52 each. http://www.mouser.com/ProductDetail/Mean-Well/IRM-05-5/?qs=sGAEpiMZZMuWiaalG5TUgH52QN1%252bIKAVmGC9ENLDVf688EuOMfqROg%3d%3d

Paul.

Paul Carew
  • 21
  • 3
2

This looks like the smallest and cheapest one from all of the above mentioned: http://www.ebay.co.uk/itm/AC-DC-Power-Supply-Buck-Converter-Step-Down-Module-5V-700mA-for-Arduino-U-/121355318138

Mate
  • 21
  • 1
2

What if you replace the nearest outlet with some kind of USB Wall Socket and attach to that (either through a standard USB plug, or inside the wall) ?

microtherion
  • 1,512
  • 9
  • 19
1

It's entirely dependent on whether or not you want to isolate the circuit from the mains. You could use a drop resistor a rectifier and a 5v zener diode but I do not recommend this if you are a hobbyist, in fact I don't recommend this at all, but it is done by some manufacturers with appropriate circuit protection.

Wombat
  • 11
  • 3