Maker Pro
Maker Pro

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

SakerCobalt

Dec 17, 2020
2
Joined
Dec 17, 2020
Messages
2
upload_2020-12-17_11-41-59.png

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.
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
Just use transformer isolation and be safe.
Non-isolated supplies are definetely not for the open wiring environment nor the amatuer.
 

SakerCobalt

Dec 17, 2020
2
Joined
Dec 17, 2020
Messages
2
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?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
I decided to just measure 120V and connect all the ground together with the earth ground of the line I am measuring.
A bad decision. You thereby created direct connection between the normally safe 5 V side and mains. This can be lethally dangerous.
Looking at my setup, everything on the pi/arduino side is electrically isolated, so as long as it isn't touched, would it work?
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:
upload_2020-12-18_18-40-20.png
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.
 
Top