Line voltage to 5V DC without old cell phone charger

Thread Starter

benalsop

Joined Dec 31, 2015
13
hi all,
I'm trying to make a small AC/DC converter to power my arduino smart outlet I am building. I want to tap off the line voltage that is right there in the outlet to power the arduino so I can encapsulate it all in a gang box. I've been looking around the web for info but seems like the only thing I can find is people taking apart old cell phone chargers and using the board(s) inside. Well this could be fine and good it would be nice if I could simply recreate what is in a typical cell phone charger on a small board. Is this possible? Does anybody have a schematic for this type of thing they could share? Thoughts in general? All the "normal" power supplies have big transformers in them and that won't due for this small application.
 

R!f@@

Joined Apr 2, 2009
9,918
Welcome to AAC

Taking apart a cell phone charger is the best idea. Since recreating a small line voltage SMPS is not easy job. Lot of facts to consider. And Vero boarding a circuit which carries 200 to 300VDC voltage is not safe and easy.
If you can make a PCB than just trying to reverse engineer a phone charger. Even this requires knowledge on PCB art work making software
 

MikeML

Joined Oct 2, 2009
5,444
I can go to my local Habitat for Humanity Thrift shop and buy dozens of retired cell phone chargers for $1. If doing anything involving the Arduino ADC, I would recommend getting a 5V iron-transformer version (not a switcher). It is tough to get the SMPS switching noise out of low-level analog stuff...
 

Thread Starter

benalsop

Joined Dec 31, 2015
13
Welcome to AAC

Taking apart a cell phone charger is the best idea. Since recreating a small line voltage SMPS is not easy job. Lot of facts to consider. And Vero boarding a circuit which carries 200 to 300VDC voltage is not safe and easy.
If you can make a PCB than just trying to reverse engineer a phone charger. Even this requires knowledge on PCB art work making software


Thanks so much for the quick reply! I guess I'll just start with a cell phone charger since the rest seems out of my league (for now). Seems like many people would want to do this so I wondered why there was so little info on it...
 

R!f@@

Joined Apr 2, 2009
9,918
Wher
I can go to my local Habitat for Humanity Thrift shop and buy dozens of retired cell phone chargers for $1. If doing anything involving the Arduino ADC, I would recommend getting a 5V iron-transformer version (not a switcher). It is tough to get the SMPS switching noise out of low-level analog stuff...
Is OP doing anything concerning ADC ?
 

Thread Starter

benalsop

Joined Dec 31, 2015
13
Lots of acronyms in here that as a beginner I don't understand, though I certainly appreciate the comments. How does one tell the difference between an iron transformer type vs switching type, will the former have small coils in it like the big transformer type of power supplies?
 

Thread Starter

benalsop

Joined Dec 31, 2015
13
Ok I'm slow maybe, just realized TS=me, lol. I am using arduino pro mini and relay to switch on/off an outlet (with z-wave radio) controlled by Vera. What is ADC?
 

AnalogKid

Joined Aug 1, 2013
11,037
Every manufacturer of offline switcher control chips has lots of design aids, app notes, etc. The hard part is the transformer. You can't grow one for 100 times the cost of one that is in production a 100,000 pieces per week. And then there's all that safety stuff. Cell phone chargers are $2 on ebay with free shipping. Only way to go.

ak
 

Thread Starter

benalsop

Joined Dec 31, 2015
13
Thanks everybody!! It's great that so many of you take the time to chime in and help, much appreciated. Since I'm a beginner and not everything you are saying makes sense to me I'll definitely take your advice and use one of my old chargers for the first one. What you are all saying certainly explains why I can't find much info on DIY versions. Still waiting on a bunch of parts from China but I'll post some results when I get through it!
 

GopherT

Joined Nov 23, 2012
8,009
Snip
Again, the best approach is to include the charger inside of your box and call it a day.
Thanks everybody!! It's great that so many of you take the time to chime in and help, much appreciated. Since I'm a beginner and not everything you are saying makes sense to me I'll definitely take your advice and use one of my old chargers for the first one. What you are all saying certainly explains why I can't find much info on DIY versions. Still waiting on a bunch of parts from China but I'll post some results when I get through it!
Welcome to the forums, @benalsop. Just a bit of advice. The concept of powering a low voltage device from your outlet WITHOUT a transformer is foolish and deadly. Danny's comments are a violation of this site's terms of service because the site members agree that this is really bad advice. Please don't do it.
 
Last edited by a moderator:

dannyf

Joined Sep 13, 2015
2,197
Still waiting on a bunch of parts from China
Just a word of caution on those made-in-China chargers: many of them are NOT isolated.

If I were you, I would get a brand name phone charger - you sure have many of them laying around, or at a recycling place, or a big-box electronics store, or a phone store, etc. Buy a brand name one so you don't worry about it.

For something like this, buying China isn't worth the risk, in my view.
 

Thread Starter

benalsop

Joined Dec 31, 2015
13
Welcome to the forums, @benalsop. Just a bit of advice. The concept of powering a low voltage device from your outlet WITHOUT a transformer is foolish and deadly. Danny's comments are a violation of thus site's terms of service because the site members agree that this is really bad advice. Please don't do it.

I won't be trying to do it without a charger, no worries
 

Thread Starter

benalsop

Joined Dec 31, 2015
13
Just a word of caution on those made-in-China chargers: many of them are NOT isolated.

If I were you, I would get a brand name phone charger - you sure have many of them laying around, or at a recycling place, or a big-box electronics store, or a phone store, etc. Buy a brand name one so you don't worry about it.

For something like this, buying China isn't worth the risk, in my view.

The China shipment isn't the charger, those I have and can get here, I was referring to arduino clones, and other assorted boards I ordered, but thx for the extra advice...
 

#12

Joined Nov 30, 2010
18,224
Designing and building a tiny power supply is a giant Pain In the Butt compared to buying one at a Thrift Store for $1. DIY makes about as much sense as starting with a sugar beet when you want a jelly bean. Go buy a pound of either product and you will get better results than anything you can make at home.
 

baylf2000

Joined Sep 16, 2015
1
Firstly, can I say that as an absolute beginner, you really should stay well away from mains voltages. I know we all hear this all the time, but I have seen first hand not only how deadly those voltages can be directly, but also indirectly. What may look safe and work in the short term could very easily fail in a horrible fashion once you've put it away in a box, perhaps in the middle of the night, and lead to a house fire with horrible consequences.

Pulling apart old phone chargers is not much safer than making your own. There are lots of things that can go wrong.

There are several brands of small, fully isolated, fully regulated and fully enclosed PCB mounted switched mode power supply modules available that cost less than the components you would need to draw any current directly from the mains line.

I use one which costs under 5 EUR in single units (or under 4 EUR in lots of 5), is PCB mounted, and only 31.7 x 26.7 x 21.8mm. There are lots of output voltages available (3.3V, 5V, 6V, 9V, 12V etc) and they supply between 4.5W and 9W.

The are also fully approved by all the relevant world approval bodies for safety and electrical noise emissions etc.

The brilliant part about these things is that they are fully enclosed modules, so all the nasty stuff is kept enclosed inside the little case, and they are fully isolated, meaning there is not part of your circuit that is connected to mains voltages. You still need to manage the connections between the two "LIVE" and "NEUTRAL" pins on the module and the mains itself, so you still need to be very careful.

As a new member, I'm not sure if the forum rules allow me to post the specific details. I'd appreciate some feedback on that. I don't have any commercial relationship with the company.
 

Thread Starter

benalsop

Joined Dec 31, 2015
13
Firstly, can I say that as an absolute beginner, you really should stay well away from mains voltages. I know we all hear this all the time, but I have seen first hand not only how deadly those voltages can be directly, but also indirectly. What may look safe and work in the short term could very easily fail in a horrible fashion once you've put it away in a box, perhaps in the middle of the night, and lead to a house fire with horrible consequences.

Pulling apart old phone chargers is not much safer than making your own. There are lots of things that can go wrong.

There are several brands of small, fully isolated, fully regulated and fully enclosed PCB mounted switched mode power supply modules available that cost less than the components you would need to draw any current directly from the mains line.

I use one which costs under 5 EUR in single units (or under 4 EUR in lots of 5), is PCB mounted, and only 31.7 x 26.7 x 21.8mm. There are lots of output voltages available (3.3V, 5V, 6V, 9V, 12V etc) and they supply between 4.5W and 9W.

The are also fully approved by all the relevant world approval bodies for safety and electrical noise emissions etc.

The brilliant part about these things is that they are fully enclosed modules, so all the nasty stuff is kept enclosed inside the little case, and they are fully isolated, meaning there is not part of your circuit that is connected to mains voltages. You still need to manage the connections between the two "LIVE" and "NEUTRAL" pins on the module and the mains itself, so you still need to be very careful.

As a new member, I'm not sure if the forum rules allow me to post the specific details. I'd appreciate some feedback on that. I don't have any commercial relationship with the company.

Thanks for the info here. I think it is perfectly fine to share more details about what you are referring to. I'd love a link to see an example! Not quite following how this would work for me inside a gang box if not connected to 110V line inside, but maybe I'm missing something from your description.

By the way, thx for all the safety concerns from everybody. I'm sure you are all picturing a 12 year old kid here playing with matches, but that is not the case. I will be ultra careful and won't be doing anything that I am not 100% confident about. That's why I am asking a lot of questions before I get started.
 
Top