Connect with us

Mains Voltage

Discussion in 'Power Electronics' started by AGrimReaper, Sep 4, 2018.

Scroll to continue with content
  1. AGrimReaper

    AGrimReaper

    5
    0
    Jun 13, 2015
    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: Sep 4, 2018
  2. Kabelsalat

    Kabelsalat

    160
    29
    Jul 5, 2011
    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.
     
    AGrimReaper, hevans1944 and davenn like this.
  3. davenn

    davenn Moderator

    13,837
    1,952
    Sep 5, 2009
    Buy a AC to 5V plugpack (wallwart) and plug into an existing outlet


    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
     
    hevans1944 likes this.
  4. davenn

    davenn Moderator

    13,837
    1,952
    Sep 5, 2009
    After a conversation with the OP, I have reopened the thread :)

     
  5. Bluejets

    Bluejets

    4,854
    1,017
    Oct 5, 2014
    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: Sep 6, 2018
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    11,522
    2,654
    Nov 17, 2011
    Use a switching power supply that fits into the outlet opening.
    Here's an example for european style outlets, You'll surely be able to find a matching item for US style outlets.
     
    AGrimReaper likes this.
  7. kellys_eye

    kellys_eye

    4,275
    1,147
    Jun 25, 2010
    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.
     
  8. AGrimReaper

    AGrimReaper

    5
    0
    Jun 13, 2015
    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.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-