Electronic – Ground Loop RS232 between PC and Breadboard


I have a microcontroller circuit on a breadboard that I want to to connect to my PC via a RS-232 interface through a MAX232 IC. The breadboard is connected to an external power supply. One of the pins from the RS-232 needs to be connected to ground. When I connected it to the ground of my breadboard I blew out the fuse in my power supply. I replaced the fuse and did the same thing and it worked. I'm confused about how the power supply in my PC has one ground and the power supply in my breadboard has another, and how the connection could ever work when there are two grounds in the system. When I connect the ground pin of the serial port to the ground rail of my breadboard doesn't this cause a ground loop b/t the PC and the breadboard? Can this fry my PC?

Best Answer

As @dll mentioned, your power supplies might have different potentials they consider to be 0V; usually having a metal casing, I'd expect your PC, however, being connected to an earth wire running in your house's installation, and actually having earth potential (i.e. when you measure the voltage between moist soil and that earth connector, it's ideally 0 V).

Now, your breadboard thing should not have an earth connection, or any absolute reference (unless it has metal casing, roughly speaking); in fact, power supplies that you should use for building stuff with should be galvanically disconnected, meaning that there's no path for DC between the wall plug and your circuit board. Just because you should value your life.

Now, if your (probably not overly powerful) power supply for your bread board device managed to blow the freakingly large fuse on a PC power supply, there's definitely something wrong. You might be using a very cheap power supply, or a very expensive one that lets you select whether you want to use earth potential or be galvanically disconnected. Or your circuit board really just has that much capacitance that connecting it caused a huge amount of inrush current.

In any case, isolating, or at least high-impedance coupling the bus might be a good solution. I think those days, the cheapest, and safest solution is using a USB-to-TTL converter (instead of PC->RS232->TTL). Those are typically powered by the USB ports of the PC. Now, things are fairly easy if you really only use the RXD and TXD lines of UART, as these are unidirectional, and you can just drop in an octocoupler powered from the side that's driving the signal each. Two octocouplers isn't bad. If you do the full RS232 stack, https://en.wikipedia.org/wiki/RS-232#Data_and_control_signals, you'll have more lines to worry about, but everything should still work.

Another hint: if your breadboard needs < 500 mA at 5 V, you can just power it off the 5V USB, and not use a separate power supply.