Is it safe to power an Arduino project with a phone charger plugged to wall? - Page 1
Forum section: electronics / beginners

author: engineheat
author_rank: Frequent Contributor
timestamp: March 29, 2019, 02:55:57 pm
content: Those phone chargers that outputs 5V DC via a USB cable, I plan to cut the USB cable wire and power the 5V input of the Arduino Pro Mini with the wires.Is this safe? I need a reliable power supply (no batteries), but I heard it's dangerous to power off the 120V AC for something like this.

author: ebastler
author_rank: Super Contributor
timestamp: March 29, 2019, 03:35:07 pm
content: You are relying on the phone charger to keep you electrically isolated from the mains voltage. So don't use a no-name Chinese charger (or a pirated copy claiming to be Apple product or whatever -- not always easy to spot). If you use a known-good brand name charger, you should be safe.The other danger is that you might harm your Arduino board or homebrew electronics when experimenting. Proper lab power supplies have an adjustable current limit, so if you accidentally create a short circuit on your Arduino board, the power supply will only provide a limited amount of current. The phone charger will provide all the current it can; typically 1 or 2 Ampere. That won't start a fire, butmaydamage electronic components. Given the cost of an Arduino, I would take that risk.

author: engineheat
author_rank: Frequent Contributor
timestamp: March 30, 2019, 11:56:22 am
content: What about a battery bank that outputs 5VDC to charge devices? Do those give max current too? (usually 1 or 2A)

author: bd139
author_rank: Super Contributor
timestamp: March 30, 2019, 12:09:58 pm
content: I have a bunch of Nokia AC11 chargers floating around for this stuff. They’re not too electrically noisy, dirt cheap and aren’t made of poo.Battery banks I’d skip because not all of them have a current limit that works. They can shift quite a bit of energy very quickly.

author: sokoloff
author_rank: Super Contributor
timestamp: March 30, 2019, 12:14:39 pm
content: Quote from: engineheat on March 30, 2019, 11:56:22 amThey have a maxrated current, which is nowhere near the same thing as acurrent limitas you'd find in a typical bench supply.IOW, if you add a load to it, it only promises to deliver at least the rated current without excessive voltage drop. It does not promise to not deliver more...

author: ebastler
author_rank: Super Contributor
timestamp: March 30, 2019, 12:24:10 pm
content: To paraphrase what bd139 and sokoloff said: Battery banks are atually worse when it comes to protecting your Arduino under accidental short-circuit conditions, since they can typically deliver more current than a wall wart.Regarding the user's electrical safety from the mains supply, battery banks obviously eliminate that risk entirely -- as long as you don't charge them while you use them. But if you use a quality charger with your Arduino, the risk of electrocution is negligible. (Except for special use cases: I would not use any device connected to a wall wart while I'm in the bathtub, for example.)

author: DDunfield
author_rank: Regular Contributor
timestamp: March 30, 2019, 04:00:36 pm
content: Quote from: ebastler on March 29, 2019, 03:35:07 pmProbably worth mentioning that even good brand name chargers which do not have a mains ground connection (most USB chargers don't) can present a significant percentage of yours mains as AC voltage at the DC "ground" output relative to mains ground. It is capacitively coupled and very low available current, but can be enough to damage sensitive components/inputs.Dave

author: Seekonk
author_rank: Super Contributor
timestamp: March 30, 2019, 05:16:42 pm
content: I use them all the time. A very few aren't regulated and let the powered device do that. Be aware that the A/D converter uses the 5V as a reference. That means that different supplies can change readings as well as the USB when using the serial monitor.

author: engineheat
author_rank: Frequent Contributor
timestamp: April 03, 2019, 03:35:23 am
content: Quote from: ebastler on March 30, 2019, 12:24:10 pmI'm not so concerned with protecting the Arduino. I'm more concerned with protecting loved ones from getting electrocuted. Also not too concerned with electrical efficiency, so if the battery bank outputs more current than my load requires, I'm not too worried.As far as short circuit protection, I believe a lot of battery banks already have that built in? Also, how about I use a fuse in my design?Thanks

author: radiolistener
author_rank: Super Contributor
timestamp: April 03, 2019, 03:38:47 am
content: I'm using Samsung USB charger for such purposes with no issues.But if you will use cheap Chinese charger it may be dangerous.

author: ebastler
author_rank: Super Contributor
timestamp: April 03, 2019, 04:46:43 am
content: Quote from: engineheat on April 03, 2019, 03:35:23 amThe battery packs should have short circuit protection which protects the battery pack itself (from damaging its output voltage regulator etc.). But they may be able to happily provide currents which can damage components on your circuit in case of a malfunction or misconnection.Adding a fuse to your circuit is certainly a good idea. But a fuse will not limit current as precisely and quickly as a lab power supply; you might still end up with some component mleting quicker than the fuse.In any case, the risk of accidental damage to the circuit from shorts etc. exists mainy during the "tinkering" phase, while you build, test, and modify the circuit. That's when lab power supplies are typically used. Once you have finalized you design, put everything together in a box, and deployed it for others to use, this is not really a concern.

author: radiolistener
author_rank: Super Contributor
timestamp: April 03, 2019, 04:54:53 am
content: Quote from: ebastler on April 03, 2019, 04:46:43 amThe main risk here is people DEATH (!) from electric shock, because these Chinese chargers don't have protection.They are designed to work with gadgets which is almost always are isolated with plastic case.There may be missing short circuit protection, because there is no short circuit in the gadget.And who knows what will happens when you accidentally short out it's output?Fuse will not protect you.

author: ebastler
author_rank: Super Contributor
timestamp: April 03, 2019, 05:14:26 am
content: Quote from: radiolistener on April 03, 2019, 04:54:53 amWhat you say is correct, but has already been discussed in this thread. Use of a quality, brand-name charger, rather than a Chinese no-name product, is the responsible thing to do. (Or use of a batter pack without mains connection.)The "fuse" discussion was related to the secondary question of potential damage to the equipment, especially during the development and testing phase. Please do not muddy the waters by mixing up two aspects which have already been considered separately here.

author: iMo
author_rank: Super Contributor
timestamp: April 03, 2019, 06:11:47 am
content: I've been using several older wall chargers (ADP-5FH Cwith B male usb connector, 5V/1A) for years with almost all my dev boards with no problems so far.

author: Psi
author_rank: Super Contributor
timestamp: April 03, 2019, 06:38:18 am
content: Quote from: engineheat on April 03, 2019, 03:35:23 amPut simply....Every year 1 or 2 people die from picking up their phone while it's plugged into the wall.They get electrocuted because the charger they're using is cheap and has a major fault.Instead of providing a nice 0 volt ground and 5 volt power it's providing something like 225V ground and 230V power ( 230 - 225 is 5 so it's still producing 5V and works to charge the phone) but the person touches it and dies from the voltage between it and ground.So if you want to be extra safe when making something yourself, use an official powerpack from a known brand and not something cheap from china.

author: gf
author_rank: Super Contributor
timestamp: April 04, 2019, 05:26:48 am
content: Why not simply use an insulation tester and check if the particular charger withstands say 500V or 1000V with a sufficiently high insulation resistance?

author: Berni
author_rank: Super Contributor
timestamp: April 04, 2019, 05:43:25 am
content: In general its best to take apart the charger and check how well built it is inside, but the problem is that the way these things are put together makes it a destructive process to disassemble.In general tho the heavier a charger is the better. Every time i picked up a charger that felt oddly light i cracked it open and found utter shit inside before tossing it in the trash can. Supplies with actual heavy transformers inside are even better but they don't really make those anymore.At least the OP is from the US so the 110V is less likely to jump the isolation barrier in a charger designed for universal 110-240V operation as they always tend to be.

author: ebastler
author_rank: Super Contributor
timestamp: April 04, 2019, 05:45:46 am
content: Quote from: gf on April 04, 2019, 05:26:48 amBecause everybody who asks questions about Arduinos and wall warts has an insulation tester at home?Also, how do you know that the el cheapo power supplies are out of spec when they are sold, vs. fail spontaneously at a later point in time? Why not "simply" send you newly bought cheap power supply to a notified body for a full design review and safety test?Seriously, I would recommend to simply buy a brand name charger. With very few exceptions, the big brands have been doing a good job building safe products, because they need to protect their reputation.

author: Berni
author_rank: Super Contributor
timestamp: April 04, 2019, 06:02:32 am
content: Yeah there is no way to easily test it.But you can indeed avoid most of the danger by not using $2 USB chargers off ebay. Things you find in local stores with proper CE UL TUV approval marks on them are a safer way to go. Also chargers that come with name brand phones will generally be well made.Similar for power banks, cheap Chinese ones will not have proper current limiting and might catch fire if shorted. But name brand ones should be safe. Id say try shorting it for half a minute and if it doesn't smoke or catch fire its good. (And do it outside away from anything flammable obviously, a lithium battery fire can be very bad on a wood table)

author: apis
author_rank: Super Contributor
timestamp: April 04, 2019, 07:55:35 pm
content: Your project might still catch fire though. That is the biggest danger if it's something that will not be monitored while it's plugged in imo.

author: ebastler
author_rank: Super Contributor
timestamp: April 04, 2019, 08:04:07 pm
content: Quote from: apis on April 04, 2019, 07:55:35 pmI think setting something on fire with a (safe, decent quality) 1A phone charger is a stretch. That’s assuming that you do not build a big energy store, lithium battery or such into your own electronics, of course.

author: apis
author_rank: Super Contributor
timestamp: April 04, 2019, 08:13:47 pm
content: Many usb chargers can give you 2.5 A, at 5 V it's 12.5 W. If something fails shorted in a plastic or wooden enclosure that could be enough to start a fire. I always use a fuse for peace of mind at least. I'm just saying it's something to keep in mind.

author: radiolistener
author_rank: Super Contributor
timestamp: April 04, 2019, 08:25:49 pm
content: Those, who likes to use cheap power supplies for their hobby projects, may be interested in this power supply boardhttps://www.aliexpress.com/item/XH-M229-Desktop-Computer-Chassis-Power-Supply-ATX-Transfer-Board-Power-Take-off-Board-Power-Output/32875771794.htmlWith this board you can use ATX power supply from computerOf course, the safety rules when you use such devices is your own responsibility.

author: m98
author_rank: Frequent Contributor
timestamp: April 04, 2019, 08:34:52 pm
content: Just use a medical IEC60601-1 certified charger like for example the Friwo FOX6-XM-USB. Similar price as most consumer-brand chargers and still as safe as it gets, if you want the peace of mind.I'm personally fine with just using my regular phone charger for such projects. I also never had a low-power circuit catch fire, but I did find out on a few "learning opportunities", that my laptops USB ports are surprisingly well protected against all kinds of electrical abuse...