2
\$\begingroup\$

I'm planning on a home automation system, and two sub-sections will be separated by (say) 100 feet. These will be connected by a low-amp, low-voltage data connection. To avoid running significant power over that distance, I would like the "remote" sub-section to have its own supply, separate from the "primary" sub-section.

Each power supply might be a wall wart, or maybe an ATX supply.

The data connection will run at 3.3V or 5V (relative to ground/reference), and "should" only flow a few nA of current.

Can I safely run a ground wire alongside the data, and tie these two supplies together, to create a common reference for the data voltage? What is the potential for current flowing through that wire, looping through the house's AC main supply system?

I've done some reading, and haven't found an answer that directly matches up to this query about potential current flow over that ground connection. From that reading, it does appear that if I expand to multiple sub-sections, then I should connect the grounds in a "star" fashion, running each tie-in back to my primary.

TIA!

\$\endgroup\$
  • \$\begingroup\$ I'd suggest looking at an industry standard solution such as RS485. Hopefully if everything is on the same mains supply in the same building then the ground won't be floating about too much compared to larger industrial sites where different areas can be on different mains phases etc. \$\endgroup\$ – John U Mar 25 '13 at 11:38
1
\$\begingroup\$

No, I would not tie the grounds together for such a distance. That does make the data connection more tricky though. In your case, the two grounds shouldn't be all that different since presumably they are tied together back at the breaker box in your house. In that case you could use differential signalling, knowing that the common mode offset should stay bounded to a few volts at most.

However, I think real isolation of the data signal is a better idea. If you can use ethernet, then you don't have to do anything further since that is already isolated. Otherwise, it's probably easier to use a opto-coupler at the receiver. The transmitter would send pulses of a few mA, which is enough to light the LED in the opto at the other end.

One simple scheme is to use UARTS, with the line idle level being no current. Cheap optos can be surprisingly slow, so either get fast optos or run the UARTs at a slow baud rate. Even a really slow opto can support 9600 baud well enough, and you can go much faster with the right choice of opto. If you need high data rate, then ethernet starts to sound good.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the all the detail. That's the practical experience I was looking for. I'm using PIC 16F688's as the remotes, and an Arduino as the primary. These all have UARTs in them. Thus, I can certainly switch to RS485 as you and @john-u suggested above. It sounds like you're also suggesting optocouplers within the RS485 link? That seems to skip the whole "differential" voltage scheme(?) My data rate may top out at 100kbit or so, for this portion of the home automation, so I can skip ethernet at this point. \$\endgroup\$ – gstein Mar 25 '13 at 17:59
  • \$\begingroup\$ @gstein: 100 kbit/s is 10 us/bit, so you need to use optos that delay not more than about 2 us or so. Using optos with a bi-directional bus is difficult. You could use one line going out from the main controller that drives optos at each device in parallel, and one line coming back such that any device can drive the receiving opto in the main controller. \$\endgroup\$ – Olin Lathrop Mar 25 '13 at 18:22
  • \$\begingroup\$ The PS2501 available via SparkFun has a typical 3-5 µs switching time. That isn't quite your 2 µs recommendation. So I'll slow it down, or find a faster part. Again: thanks! \$\endgroup\$ – gstein Mar 25 '13 at 18:54

protected by W5VO Mar 25 '13 at 11:36

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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