Interfacing two circuits with two power supplies (ground loop current)

Hi all,

I'm new to all of this, and all of the answers I have found are for different scenarios.

I have a hot tub with it's own control circuit. It's powered from an 18V AC transformer, rectified and converted to 5V for the ICs. The main relay is triggered by what appears to be a FET, triggered on 5V.

I am attempting to piggyback on the controller with an Arduino on it's own 5V switched power supply to :

  • Trigger the FET
  • Read voltages from an LM34 the controller is using to sense temperature

To do any of these things, the circuits need to share a ground, as far as I know.

I measured the voltages between the two grounds and read 0V with a multimeter. However, with a scope, I'm measuring 18V AC, with a really odd waveform (apparently the result of a non linear load on the transformer).

How does one interface these two circuits, if they are on separate power supplies?

Assuming that the control circuit is actually on a transformer, you need to connect the grounds. Until you do so, you will not get an accurate reading with a multimeter or an oscilloscope.

The relay provides isolation so you don't need to common up anything on the contact side of the relay. How are you going to do "- Trigger the FET " from the Arduino with the FET already connected up to some other control circuit?

Vaj : my worry is that there is a voltage offset between both circuit grounds. Since they share another common wire at some point (they are both running of the 120v mains) I'm afraid I might have significant ground loop current. Hence why I tried to measure the voltage between the two grounds on the scope. The very high scope impedance limits the current and allows me to see the voltage offset...that's when I measured 18v...and that's what worries me.

Mike : I probably should have provided a diagram (my background is physics and not electronics, so diagrams are not my forte). The main relay is controlled by a fet on the main control board. I'd like to trigger it with my arduino. In that sense, since both circuits are connected to the relay coil, in some manner, they aren't isolated. I was hoping to send 5V from the arduino to the fet on the main control board to trigger the relay. The only way I can do that is if the arduino and the main board share a ground. I'm just worried about connecting the grounds together. The same applies to reading the lm34...it's powered by the main board, but I'd like to read it with the arduino...again, this will connect two circuits on two supplies together...worrying me about ground loop current.

I assume there is a way to do this, I just don't know enough about electronics to risk it. If both systems were off the same power supply, or one was on a battery, I wouldn't worry. However, since one is off a transformer and the other one off a switched mode supply, I have no idea how their grounds interact.

Thanks for all the help!

Connecting electronics directly to the mains supply is always fraught with difficulties.... perhaps you could have a go at a circuit diagram?

regards

Allan

Both supplies should have isolation. The 18V difference could be just the point where the 2 grounds float to. Connecting them together may only draw a few µA.

Here's a simple test to see how much ground current there would be if the grounds are connected together. Connect a 1K 1/2W resistor between both grounds. Using a multimeter, measure the voltage across the resistor. Whatever you read represents both the current draw (mA) and voltage. The voltage should drop below a few volts. For example, if you read 1V, then the ground current will be 1mA when the grounds are shorted together. The difference should not remain at 18V or there's an isolation problem.

How are you powering the Arduino? If you are in the USA, the hot tub MUST be on a GFI protected circuit, unless you wired it up yourself. So, the Arduino power must be on the GFI protected circuit, as well.

Paul

my background is physics and not electronics, so diagrams are not my forte

Can't see that follows, my background is in Physics also.

I was hoping to send 5V from the arduino to the fet on the main control board to trigger the relay.

So given all the concern above I will add another one. How do you know that the FET on your board will turn on with 5V? That voltage will only work if you have a logic level FET. If you have a normal FET you will need to drive this to 10V.
Also by having two signals going to the same FET what happens if one is HIGH and the other is LOW? Something melts that is what happens.

The oscilloscope will see ac waveform due to stray capacitances with the mains. The multimeter sees
just the DC offset.

If at least one supply is isolated, common the grounds. If not, you use opto-isolations.

To test if a supply is isolated, disconnect, measure resistance between mains neutral and output ground,
it should be inifinite if isolated.

Note even an insolated supply can deliver a measurable AC current due to capacitive coupling, it can be
enough to be easily felt.

Since this is involving water I would expect all the supplies to be earthed and it seems sensible to earth your
low voltage ground to the same point.

Hi all, thanks for all the input

allanhurst:
Connecting electronics directly to the mains supply is always fraught with difficulties.... perhaps you could have a go at a circuit diagram?

I actually spend a good 30 mins drawing one on a web app, only to have it shutdown, delete my work and ask me for a paid account, before I could save the circuit.

Paul_KD7HB:
How are you powering the Arduino? If you are in the USA, the hot tub MUST be on a GFI protected circuit, unless you wired it up yourself. So, the Arduino power must be on the GFI protected circuit, as well.

Essentially, I'm tapping the 5V PS for the arduino into the mains lines going to the transformer in the main controller. That line is already connected to a GFI for the pump.

Grumpy_Mike:
Can't see that follows, my background is in Physics also.
So given all the concern above I will add another one. How do you know that the FET on your board will turn on with 5V? That voltage will only work if you have a logic level FET. If you have a normal FET you will need to drive this to 10V.
Also by having two signals going to the same FET what happens if one is HIGH and the other is LOW? Something melts that is what happens.

I've never had to draw complex circuit diagrams, so many of the symbols are new to me. Knowing the difference between a FET and a JFET on sight is not easy.

As for the FET turning on, I measured 4.91V to the gate when it triggers the relay. I have no clue if it's a FET a JFET or whatnot. It's a 3 terminal SM component covered in varnish making it unreadable. Just assumed it was a FET.

To protect agains the HIGH and LOW being sent at the same time, I have two Schottky diodes in place to stop either the arduino's HIGH reaching the original IC's low, or vice versa.

MarkT:
The oscilloscope will see ac waveform due to stray capacitances with the mains. The multimeter sees
just the DC offset.

If at least one supply is isolated, common the grounds. If not, you use opto-isolations.

To test if a supply is isolated, disconnect, measure resistance between mains neutral and output ground,
it should be inifinite if isolated.

Note even an insolated supply can deliver a measurable AC current due to capacitive coupling, it can be
enough to be easily felt.

Since this is involving water I would expect all the supplies to be earthed and it seems sensible to earth your
low voltage ground to the same point.

AFAIK, there is galvanic isolation, since one of the supplies is off a transformer. I'm just uneasy connecting things when I measure such voltages between the two grounds...however, I might just try what dlloyd suggested...I just assumed this would already be happening with the scope's impedance, but maybe it's not "draining the stray capacitance" fast enough. As for earthing the ground, that involves earthing the original circuit's transformer too...wouldn't that trigger the GFI?

Thanks for all the help, I guess I'll give it a go with a resistor and see.

Knowing the difference between a FET and a JFET on sight is not easy.

Who mentioned JFETs? It was not me.

To protect agains the HIGH and LOW being sent at the same time, I have two Schottky diodes in place to stop either the arduino's HIGH reaching the original IC's low, or vice versa.

New information that would have been good to know from the start.

I actually spend a good 30 mins drawing one on a web app, only to have it shutdown, delete my work and ask me for a paid account, before I could save the circuit.

Using pen and paper minimizes the risk of the paper shutting down before you photograph it and post the results.

Grumpy_Mike:
Who mentioned JFETs? It was not me.
New information that would have been good to know from the start.
Using pen and paper minimizes the risk of the paper shutting down before you photograph it and post the results.

Correct about the diodes, although they are independent of the grounding issue. Reading the LM34 requires a common ground too.

As for the diagram, I'm just saying I have limited experience with the more complicated symbols and the proper conventions. I stuck to an online tool since I was pretty sure I'd need a lot of revisions, given my limited experience.

Here is a rough draft. D1 and D2 are the two diodes I inserted to avoid collisions between HIGH and LOW from the arduino and the microcontroller. What concerns me is connecting the Arduino ground and the microcontroller ground.

Macgyverman wrote (in part):

vaj : my worry is that there is a voltage offset between both circuit grounds. Since they share another common wire at some point (they are both running of the 120v mains) I'm afraid I might have significant ground loop current. Hence why I tried to measure the voltage between the two grounds on the scope. The very high scope impedance limits the current and allows me to see the voltage offset...that's when I measured 18v...and that's what worries me.

The measured 18 volts is not meaningful. The two circuits are joined by a high impedance, much higher than that of the multimeter and perhaps on the order of that of the oscilloscope. Until you can make or identify a meaningful connection, the measurements can not and will not make sense.

By the way, mains power, other high voltages, and high currents can be dangerous. Please take precautions!

Good Luck!

Here is a rough draft. D1 and D2 are the two diodes I inserted to avoid collisions between HIGH and LOW from the arduino and the microcontroller.

While that will protect the microcontroller and the Arduino when both are off the FET gate is effectively floating. You need at least a 10K resistor pull down on the gate of the FET. Also the diodes will rob a bit of voltage from the gate. It would be good to know the exact part number to see if it will turn on at 4.6 or so volts.

What concerns me is connecting the Arduino ground and the microcontroller ground.

If the diagram is correct then it should be no problem both systems are isolated from the mains.
Have you got a part number for the switching regulator feeding the Arduino. It is unlikely that it won't be isolated inside with an input rating of 120V AC.

Grumpy_Mike:
While that will protect the microcontroller and the Arduino when both are off the FET gate is effectively floating. You need at least a 10K resistor pull down on the gate of the FET. Also the diodes will rob a bit of voltage from the gate. It would be good to know the exact part number to see if it will turn on at 4.6 or so volts.
If the diagram is correct then it should be no problem both systems are isolated from the mains.
Have you got a part number for the switching regulator feeding the Arduino. It is unlikely that it won't be isolated inside with an input rating of 120V AC.

You're correct, I was drawing from memory this morning, there is effectively a pulldown, although it drains through the relay instead of to ground. However, my understanding is that it does the same. I unfortunately didn't save the diagram, but the red mark would be where the relay is.

I don't have an actual part number for the arduino supply, I'm repurposing a USB charger.

Thanks for all the help guys, I really appreciate the guidance as I figure this stuff out. It's been bugging me for years to not know much about electronics. This whole floating thing and capacitance...I understand the theory, but have little experience with AC circuits...they can get quite complicated.

I'll have a look at connecting the grounds.