Appearing voltage when connecting different grounds
If your system draws current from a source with a cable with impedance R_cable, you may have a difference between the ground of two system, the maximum voltage is R_cable * I_peak

This problem is related to wiring but you can compensate it in your design.

Methods can improve your design


use differential data transfer instead of transferring analog or TTL/CMOS voltage
Isolate your power system, and install ground between isolated circuit








simulate this circuit &ndash; Schematic created using CircuitLab

when the isolated circuit gets a common GND2 signal, they don't transfer power current from this wire and your design is stable for signaling. 


transfer current instead of voltage, for example, 4_20mA (current can compensate in the transmitter)


In some cases, you can compensate for the error but the circuit and cable length should be fixed.

There are many methods you can use, some of them presented here.