Connect with us

Is it safe (for the equipment) to power Raspberry Pi with 5V offset 240VAC inputs

Discussion in 'Power Electronics' started by SakerCobalt, Dec 17, 2020.

Scroll to continue with content
  1. SakerCobalt


    Dec 17, 2020

    I have a project where I am using 240VAC (1phase) to supply a Mean Well IRM-01-5 AC to DC converter which then supplies an Arduino and Raspberry Pi ZeroW.

    I want to measure the voltage across the lines, so I am only planning to use the 2 line voltages so I can power the AC to DC converter and supply the voltage to be sampled. My sampling is a voltage divider across the 2 AC lines arbitrarily designating one of them as ground.

    The IRM-01-5 appears to isolate the input from output, so I am thinking about connecting the DC ground to one of the input lines which will make a common DC ground bus. I am thinking that will be ok on the power supply, and my DC bus will give me 5V, but it will be riding on a 240VAC waveform.

    I probably won't do this, but I am unsure what potential issues this could cause other than shocking anyone that touched the raspberry pi while this setup is running.
  2. Bluejets


    Oct 5, 2014
    Just use transformer isolation and be safe.
    Non-isolated supplies are definetely not for the open wiring environment nor the amatuer.
    Martaine2005 likes this.
  3. SakerCobalt


    Dec 17, 2020
    I decided to just measure 120V and connect all the ground together with the earth ground of the line I am measuring. Still wondering if the above would work or if it would cause unanticipated problems. Looking at my setup, everything on the pi/arduino side is electrically isolated, so as long as it isn't touched, would it work?
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    A bad decision. You thereby created direct connection between the normally safe 5 V side and mains. This can be lethally dangerous.
    It will work, but it is definitely unsafe. I repeat: don't do it. The power supply is isolated for a good reason. don't break that isolation barrier.
    Use a transformer as suggested by @Bluejets .

    If you insist on not using a transformer, we can't keep you from doing so. In that case I urge you to make the connection in the following way:
    Calculate Rburden such that measured voltage /mains = Rburden / (Rburden + 300 kΩ). Use 1/4 W leaded resistors, place them physically in series in a layout as shown in the schematic. Use higher values like 475 kΩ if possible (will depend on Rburden and the voltage divider ratio you can accept). The higher the ratio the better.
    You gain a little bit of safety with this arrangement because current will be limited by the series resistors in each leg. Also, should one resistor develop a short circuit, the other resistors will still offer some limited protection by limiting the current.
    BUT: In any case this is still a direct connection to mains and is possibly dangerous. I definitely do not recommend to use it. I repeat: use a transformer. A few coins well invested in your safety.
    Or use an isolation amplifier - but I guess that is too expensive if you don't even want to afford the small cost of a transformer.
    Martaine2005 likes this.
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