Electrical – understanding of UART , if two devices share a common ground. How do they get to the same voltage level for a save data transmission

communicationdatadigital-communicationsgrounduart

My question is related to the common ground in a UART communication.
So far, what I understand how communication in general works is: Distinguishing the voltage between two cables (one is a GND and one is the data wire).

But if they have two different grounds and two different supply voltage like for example one device has 5V and the other device has 12V.

How can they create a common ground, for a stable data transmission??

Best Answer

Grounds should be established by connecting them together. If they cannot be connected together, galvanic isolation can be employed. The signal levels over cables are typically defined by a standard such as RS-232C (1969).

Discrete circuits or chips such as the antediluvian MC1488/MC1489 and more modern parts such as MAX3232 can be used to convert between TTL/CMOS levels (as would come out of an MCU directly) and RS-232 levels (they also invert), as you would send over a cable into the outside world.

Related Topic