# Line voltage to 5V DC without old cell phone charger

#### 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,743
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,743 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 ?

#### MikeML

Joined Oct 2, 2009
5,444
Is OP doing anything concerning ADC ?
TS said Arduino, but didn't specifically mention ADC...

#### 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?

#### 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?

#### dl324

Joined Mar 30, 2015
12,275
Analog to Digital Converter. You may also be referred to as OP (Original Poster) by people who have been using forums for awhile...

#### AnalogKid

Joined Aug 1, 2013
8,834

#### JonnyS

Joined Dec 28, 2015
27

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

#### benalsop

Joined Dec 31, 2015
13

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