Is the syncing of two circuits ground needed?

I'm working on a project to interface with a piece of software that switches a DB9 serial pin 4 to high on a PC. I'd like to use this HIGH signal as an input on an Arduino which will be powered from separate power supply.

Since the PC and Arduino will be sourcing power from different outlets possibly circuits in the structure, do I need to somehow sync their ground reference? If so how?

Pin 5 on the serial port is GND and I'm wondering if I can just tie that to the Arduino GND?

P.S. I understand that the serial pin 4 voltage output maybe as much as 5v-12v and will use a voltage divider (two resistors) to keep the magic smoke inside the Arduino.

histo:
Pin 5 on the serial port is GND and I'm wondering if I can just tie that to the Arduino GND?

Not only can you, you should do that, otherwise the Arduino won't know if pin 4 of your serial port is high or low WRT ground.

I understand it's needed to complete the circuit. The question is since the PC and the Arduino have different power supplies plugged into different outlets and possibly circtuits will the GND reference be different enough to cause a problem?

histo:
I understand it's needed to complete the circuit. The question is since the PC and the Arduino have different power supplies plugged into different outlets and possibly circtuits will the GND reference be different enough to cause a problem?

If you tie them together, there will be no difference in the ground reference. That's another reason why they must be connected.

You are referring to a "ground loop" where the grounds are connected together, but also connected through the power supplies and mains. Or perhaps through other common power supply connections.

Well, the answer is that if there are any differences in the ground potentials causing current flow, you have a bigger problem in itself and one that will not be solved by not connecting the signal grounds together.

If you are operating over long distances, this is addressed by using RS-485 systems or optical fibre. In the meantime - just connect the grounds together! :smiley:

Thank you all for the help and patience.