2
\$\begingroup\$

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?

\$\endgroup\$
  • \$\begingroup\$ (a) "connect to my PC via a RS-232 interface" - Is this a laptop or desktop PC? (b) Does its power supply have a mains earth connection? (c) "The breadboard is connected to an external power supply" - Please supply a photo of that power supply, including its mains plug pins and any symbols from the manufacturer (e.g. one square inside another square) near where they list certifications like UL, CE etc. (d) "I blew out the fuse in my power supply" - Which power supply, PC or breadboard? (e) Please supply a photo of where that fuse is located (mains? DC output? elsewhere?). \$\endgroup\$ – SamGibson May 29 '16 at 10:52
  • \$\begingroup\$ a) this is a laptop. b) no, c) 2AMP regulated DC power supply that is plugged into the wall with a two pronged plug; no symbols on it, lost spec sheet, d) the breadboard one, e) fuse is at the back of the breadboard power supply. \$\endgroup\$ – czachoczacho May 29 '16 at 15:52
  • \$\begingroup\$ Thanks. Based on your answers to (a) & (b) there cannot be any ground loop, because the laptop has no ground connection through its power supply in the first place. Unfortunately, without the photos that I asked for, I cannot be sure of enough details of your breadboard power supply to give a confident answer - I don't want to guess. When I asked for photos, it was because I really do need them in order to understand this "breadboard power supply" enough. All I will say is that the lack of any certification symbols on a mains power supply, is a concern IMHO. \$\endgroup\$ – SamGibson May 29 '16 at 22:47
2
\$\begingroup\$

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.

\$\endgroup\$
2
\$\begingroup\$

A ground is, in your case, the reference point in an electrical circuit from which voltages are measured. This is defined as 0V but in reality there is no absolute 0V. It is relative. You don't have +5V you have +5V relative to the ground of a certain system.

If you now have two grounds they will represent two different 0 because you generated it with two different power supplies. They each represent 0 but in reality the two grounds can be really different or just a bit. It is this difference that can harm and form a ground loop as you will have a electrical flow.

If your system works then you are lucky but to make sure that there is no problem I would use a optical isolated RS-232. Those a RS-232 cables designed specifically to be optical isolated and thus you can work with two different grounds.

\$\endgroup\$
  • 1
    \$\begingroup\$ That's kind of the expensive solution. \$\endgroup\$ – Marcus Müller May 29 '16 at 8:48
  • 1
    \$\begingroup\$ kind of expensive if you can't wait two weeks for shipping, else about $5 on aliexpress, \$\endgroup\$ – Jasen May 29 '16 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.