Maker Pro
Maker Pro

Mains Voltage

AGrimReaper

Jun 13, 2015
5
Joined
Jun 13, 2015
Messages
5
For one of my projects, I plan to have a custom PCB with an ESP32 (or something similar), in a wall box. I'm not entirely sure how I can power this, but I was thinking main's voltage since a line will be near where I want it to go. My question is, how do I get mains voltage to become 5v DC? Am I being stupid and is there a better more recommended way to power my circuit board? Can this even be up to code for inspections?
 
Last edited:

Kabelsalat

Jul 5, 2011
182
Joined
Jul 5, 2011
Messages
182
I have to be honsest : Given the level of experience you appear to have, I strongly recommend to not "play" with any mains voltage.

Why do I say this: Because even minor currents through the body may have long term consequenses of your health - so it's generally not worth the risk.
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
My question is, how do I get mains voltage to become 5v DC? Am I being stupid and is there a better more recommended way to power my circuit board?

Buy a AC to 5V plugpack (wallwart) and plug into an existing outlet

I have to be honest : Given the level of experience you appear to have, I strongly recommend to not "play" with any mains voltage.


I have to agree with this comment .... please use normal methods and DONT start playing with mains voltages
else you may have a short life in this world



thread closed

Dave
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
After a conversation with the OP, I have reopened the thread :)

.......(a little edit) ...... I'm plenty experienced with handling mains voltage. I've run lines. I've hooked up breakers. My inexperience does not include the inability to properly handle and be safe with mains voltage. My inexperience comes to being applicable to actually using mains voltage.

I've created circuit boards, I've fabbed circuit boards. Both etching, and ordering online. My main issue is that while I can create basic circuits, I've never really learned how everything... works. That's why I opened that thread in the first place. Because I'm certain I'll be plenty safe using mains. I respect it, like any electrician should.
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
Either way, the plug pack is still the best option like you said.

I take it you would remember the tv advert, Norm, and I know boats??

In my experience, the more some will complain about questioning their ability, the less they know and the more dangerous they can be. Many times it's not them who get hung up but some innocent kid or bystander.
 
Last edited:

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Any mains powered device used outdoors should be powered from a source that is protected by an RCD (residual current device also known as Earth leakage protection and other monikers like it) this will interrupt/disconnect the mains supply in the event of any threat to life and should ALWAYS be used for outdoor power supplies.

Google 'IP standards' to understand the level of environmental protection required, from 'showerproof' to 'fully submersible' - your housing will need the appropriate IP rating and matching cable in let's/outlet glands.

There are already many 'outdoor mains supply extension's devices/boxes on the market that contain mains sockets and space to fit your own stuff. Use one!

DO NOT BODGE A SOLUTION TO THIS ON PAIN OF DEATH.
 

AGrimReaper

Jun 13, 2015
5
Joined
Jun 13, 2015
Messages
5
I think in the end I'll be going the adapter route. I was recommended scrapping a small usb charger, and 3D printing a smaller case for it. This should work until I'm able to actually make my own circuit.
 
Top