Grounding of a PCB that communicates with a PC via USB or RS232

atmelgroundingrs232

I have a PCB with an atmega8, communicating with a PC. The signal from TX and RX pins is level-shifted through a MAX232 to standard serial port level, then converted via serial-to-USB commercial device, which connects to the PC. The PCB with the atmega8 and the PCB, holding the MAX232 are powered from the same brick (transformer-based power supply).

Do I connect the GND of MAX232 pcb to ground of the serial port (which goes to the PC)? Do I connect the GND of the atmega8 board to GND on the MAX232 board? I would prefer that it doesn't matter if the two boards are powered from the same PSU or separate.

Best Answer

You need to connect all the grounds together in order for your setup to work correctly.

Do I connect the GND of the atmega8 board to GND on the MAX232 board? I would prefer that it doesn't matter if the two boards are powered from the same PSU or separate.

If you connect the GND of the ATmega board to the GND of the MAX232 board, it doesn't matter if they have the same power supply or different ones. If you will have separate power supplies for both boards, you'd still need to connect the GNDs together.


Your hardware setup seems a bit more complicated than it could be. Currently, you have:

uC board TTL UART <-> TTL-to-RS232 <-> RS232-to-serial-USB <-> PC

Instead, you could do it simpler:

uC board TTL UART <-> TTL-to-serial-USB <-> PC