Line voltage to 5V DC without old cell phone charger

djsfantasi

Joined Apr 11, 2010
9,163
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.
But he wants to fit this into an electrical wall box. See post #1.

OP, how much space do you have? There is not much space left after you account for the outlet. Second, I believe that code requires that that space be available for the wires and heat dispersal.

Also, mixing low voltage wiring (power, Arduino and its outputs) with mains wiring is dangerous. I believe they must be physically isolated, as in a separate box.

Have you checked with an electrician?
 

Thread Starter

benalsop

Joined Dec 31, 2015
13
But he wants to fit this into an electrical wall box. See post #1.

OP, how much space do you have? There is not much space left after you account for the outlet. Second, I believe that code requires that that space be available for the wires and heat dispersal.

Also, mixing low voltage wiring (power, Arduino and its outputs) with mains wiring is dangerous. I believe they must be physically isolated, as in a separate box.

Have you checked with an electrician?

Maybe I should clarify a few things. First off I am not going directly in the wall. I am building a separate unit. I will use an old grounded computer/extension cord (cut) and wire it into and extended extra deep gang box which will contain the PCB with the arduino, z-wave radio, and relay, as well as the phone charger and of course the outlet. So the extension cord will be split and run to the phone charger as well as through the relay to the outlet. This whole unit will eventually be plugged into a wall outlet. Make sense? So I may be crowded but not as bad as you may think. I'm not worried about the look of it for now as it will be behind furniture powering a lamp.
 

#12

Joined Nov 30, 2010
18,224
I used some blue plastic electrical boxes when I added buck transformers for my HID lights. They might have been a 6 inch cube if I remember correctly. No reason you can't find similar, genuine, UL approved boxes at Home Despot or Lowers Home Improvement Store.;)
 

Thread Starter

benalsop

Joined Dec 31, 2015
13
But he wants to fit this into an electrical wall box. See post #1.

OP, how much space do you have? There is not much space left after you account for the outlet. Second, I believe that code requires that that space be available for the wires and heat dispersal.

Also, mixing low voltage wiring (power, Arduino and its outputs) with mains wiring is dangerous. I believe they must be physically isolated, as in a separate box.

Have you checked with an electrician?

Also, the only people I have checked with that have any expertise in the area is this good forum, so agree that I should probably consult a pro. Having said that, you can purchase readily available smart wall switches for hard wired lighting that have z wave embedded that you simply replace a wall switch with so you must be able to mix low and high voltages in the same small box (again, that's not what I am after with this at this point).
 

Thread Starter

benalsop

Joined Dec 31, 2015
13
I used some blue plastic electrical boxes when I added buck transformers for my HID lights. They might have been a 6 inch cube if I remember correctly. No reason you can't find similar, genuine, UL approved boxes at Home Despot or Lowers Home Improvement Store.;)

Precisely what I will do...
 

djsfantasi

Joined Apr 11, 2010
9,163
Thanks for your clarifications. I was just trying to be careful and responding to potential dangers.

I overstated when I said possibly separate boxes. The important concern is that the wiring is isolated from each other (low/high). This can be done in the same box, by an insulating divider. I suspect that is what the commercial smart wall switches do. Their molded cases contain separate compartments for low voltage circuitry and high voltage wiring. I once made low voltage controlled outlets for a Haunted House (grossing $14,000/night, so it wasn't a hobby endeavor). I used the plastic utility boxes that @#12 mentioned, but with an internal divider. All had to be inspected several times by the municipality.
 

Thread Starter

benalsop

Joined Dec 31, 2015
13
Thanks for your clarifications. I was just trying to be careful and responding to potential dangers.

I overstated when I said possibly separate boxes. The important concern is that the wiring is isolated from each other (low/high). This can be done in the same box, by an insulating divider. I suspect that is what the commercial smart wall switches do. Their molded cases contain separate compartments for low voltage circuitry and high voltage wiring. I once made low voltage controlled outlets for a Haunted House (grossing $14,000/night, so it wasn't a hobby endeavor). I used the plastic utility boxes that @#12 mentioned, but with an internal divider. All had to be inspected several times by the municipality.
That's very helpful, will look into an insulated divider...haunted house sounds like it was a cool setup. Thanks for the advice and ideas!
 

#12

Joined Nov 30, 2010
18,224
an insulating divider.
Huge machines I work on have a relatively tiny area surrounded by sheet metal where these transitions occur. I am amazed that they are not even close to air-tight.

Oh well. Manufacturers get away with things I would not do because I'm picky about details.
 
Top