Forums

Network of MCUs with centralized power supply

Started by pozz May 9, 2016
I'm going to develop a network of 10-30 electronic nodes based on MCU.
The distance between them could 100m maximum.
There is a single centrale power supply unit (PSU) that gives power to 
nodes through a low-voltage 12-18Vdc plus/minus cables.

I'm thinking about a two-wires half-duplex RS485. I'll have 4 cables 
(+/- for power and A/B for signals) and the advantage of differential 
signals that should be more immune to external electromagnetic interference.

However the classical scenario for RS485 is a network of nodes where 
each node has a *different local PSU*. Indeed, there are many 
considerations about grounding, shielding and avoiding ground loops. 
Should I connect the ground between nodes? Should the ground be 
connected to earth through a short or a resistor or a capacitor? Should 
a shield be used? Where the shield should be connected? Should the 
shield be connected to ground/earth on one/both sides? And so on...
I read some documents and there are many different "point of views"... :-)

However my situation is different. I'll have a *central* PSU, so I must 
cable ground and the positive rail. The remote nodes aren't locally 
connected to earth (directly or through any other resistive, inductive 
or capacitor coupling).

FIRST QUESTION
In this situation, is a single-ended signal (RS232) similar to 
differential signals (RS485)?
I know differential is better because an interference is coupled to both 
signals as a common mode voltage that the differential receiver doesn't 
consider. But I have ground cable too. So an interference is coupled to 
*ground and signal* at the same time. The single-ended receiver measures 
the difference between signal and ground, so the common mode voltage 
created by the interference is subtracted anyway.

SECOND QUESTION
Shield is typical connected to ground (or earth?) only at one side to 
avoid ground loop antenna. This is true if the remote node has a local 
earth connection. In my case the remote node is "floating" respect the 
earth, so there's no risk of ground loop antenna if the shield is 
connected to ground at both sides.
Is this correct?
On 5/9/2016 3:17 AM, pozz wrote:
> I'm going to develop a network of 10-30 electronic nodes based on MCU. > The distance between them could 100m maximum. > There is a single centrale power supply unit (PSU) that gives power to > nodes through a low-voltage 12-18Vdc plus/minus cables. > > I'm thinking about a two-wires half-duplex RS485. I'll have 4 cables > (+/- for power and A/B for signals) and the advantage of differential > signals that should be more immune to external electromagnetic > interference. > > However the classical scenario for RS485 is a network of nodes where > each node has a *different local PSU*. Indeed, there are many > considerations about grounding, shielding and avoiding ground loops. > Should I connect the ground between nodes? Should the ground be > connected to earth through a short or a resistor or a capacitor? Should > a shield be used? Where the shield should be connected? Should the > shield be connected to ground/earth on one/both sides? And so on... > I read some documents and there are many different "point of views"... :-) > > However my situation is different. I'll have a *central* PSU, so I must > cable ground and the positive rail. The remote nodes aren't locally > connected to earth (directly or through any other resistive, inductive > or capacitor coupling). > > FIRST QUESTION > In this situation, is a single-ended signal (RS232) similar to > differential signals (RS485)? > I know differential is better because an interference is coupled to both > signals as a common mode voltage that the differential receiver doesn't > consider. But I have ground cable too. So an interference is coupled to > *ground and signal* at the same time. The single-ended receiver measures > the difference between signal and ground, so the common mode voltage > created by the interference is subtracted anyway.
It doesn't work that way. The ground and signal wires have different impedances, so the induced voltage will be different. In a differential pair both wires carry the same sort of signal, so the induced voltage will be similar and the noise will subtract out.
> SECOND QUESTION > Shield is typical connected to ground (or earth?) only at one side to > avoid ground loop antenna. This is true if the remote node has a local > earth connection. In my case the remote node is "floating" respect the > earth, so there's no risk of ground loop antenna if the shield is > connected to ground at both sides. > Is this correct?
There is nothing special about the shield. You just said above you intend to use a ground wire in your cable. Why wouldn't that cause a ground loop if you think the shield can? But yes, if you have no ground connection on the remote end other than the ground in your cable then it should not cause a ground loop. -- Rick C
On Mon, 9 May 2016 09:17:28 +0200, pozz <pozzugno@gmail.com> wrote:

>FIRST QUESTION >In this situation, is a single-ended signal (RS232) similar to >differential signals (RS485)? >I know differential is better because an interference is coupled to both >signals as a common mode voltage that the differential receiver doesn't >consider. But I have ground cable too. So an interference is coupled to >*ground and signal* at the same time. The single-ended receiver measures >the difference between signal and ground, so the common mode voltage >created by the interference is subtracted anyway.
Don't forget any power supply (current) noise from each of your nodes. Due to the resistance of the 0 V connector, there are going to be some voltage noise across the cable, adding to the RS-232 serial ground. To eliminate any problems due to the node current noise, RS-485 would be preferable. For instance DeviceNet uses a two pair cable, one pair carrying the power supply an the other carrying the CANbus data (which is essentially RS-485), so I guess you might find it useful to study DeviceNet wiring conventions.
pozz <pozzugno@gmail.com> wrote:
> I'm going to develop a network of 10-30 electronic nodes based on MCU. > The distance between them could 100m maximum. > There is a single centrale power supply unit (PSU) that gives power to > nodes through a low-voltage 12-18Vdc plus/minus cables.
Is it a good idea to try to re-invent the wheel? I would probably go for ethernet with power-over-ethernet. The folks who designed that have already considered your worries and use isolation everywhere (both the data and power are transferred over a balanced link and isolated at the device). Look, for example, at the Arduino line and the Arduino Ethernet Shield with PoE option. The central node can use an off-the-shelf power-over-ethernet switch.
On Mon, 9 May 2016 09:17:28 +0200, pozz <pozzugno@gmail.com> wrote:

>I'm going to develop a network of 10-30 electronic nodes based on MCU. >The distance between them could 100m maximum. >There is a single centrale power supply unit (PSU) that gives power to >nodes through a low-voltage 12-18Vdc plus/minus cables.
If the node current consumption is less than 4 mA, you could even use a 4-20 mA current loop directly or in HART style. You would only need a single pair for each node.
On 09/05/2016 08:17, pozz wrote:
> I'm going to develop a network of 10-30 electronic nodes based on MCU. > The distance between them could 100m maximum. > There is a single centrale power supply unit (PSU) that gives power to > nodes through a low-voltage 12-18Vdc plus/minus cables. > > I'm thinking about a two-wires half-duplex RS485. I'll have 4 cables > (+/- for power and A/B for signals) and the advantage of differential > signals that should be more immune to external electromagnetic > interference. > > However the classical scenario for RS485 is a network of nodes where > each node has a *different local PSU*. Indeed, there are many > considerations about grounding, shielding and avoiding ground loops. > Should I connect the ground between nodes? Should the ground be > connected to earth through a short or a resistor or a capacitor? Should > a shield be used? Where the shield should be connected? Should the > shield be connected to ground/earth on one/both sides? And so on... > I read some documents and there are many different "point of views"... :-) > > However my situation is different. I'll have a *central* PSU, so I must > cable ground and the positive rail. The remote nodes aren't locally > connected to earth (directly or through any other resistive, inductive > or capacitor coupling). > > FIRST QUESTION > In this situation, is a single-ended signal (RS232) similar to > differential signals (RS485)? > I know differential is better because an interference is coupled to both > signals as a common mode voltage that the differential receiver doesn't > consider. But I have ground cable too. So an interference is coupled to > *ground and signal* at the same time. The single-ended receiver measures > the difference between signal and ground, so the common mode voltage > created by the interference is subtracted anyway. > > SECOND QUESTION > Shield is typical connected to ground (or earth?) only at one side to > avoid ground loop antenna. This is true if the remote node has a local > earth connection. In my case the remote node is "floating" respect the > earth, so there's no risk of ground loop antenna if the shield is > connected to ground at both sides. > Is this correct?
Classic RS485 is not a two-wire-only network, a third wire is needed that is variously named reference, shield, ground, earth, common, return or 0V. If you look at typical RS485 chips you will see they have a common mode range of a many volts, meaning the signal carrying pair of wires must remain within that range of the common wire. By having a central power supply you are making life *much* easier than the situation where nodes are separately powered. Where separate power supplies are used the common connection could be paralleled with all sorts of other pathways, some of which may be electrical equipment earthing straps carrying interference and noise. Hence the quite large common mode range demanded of the interface chips. It is up to you whether or not your network common anywhere connects to the rest of the planet or building around it. For electrical safety in specific locations some jurisdictions may require the network to be fully earth-free. If the cabling has a shield then it makes sense to either use that shield as the common (you can think of it as acting as magnetic and electric field shield) or at least connect it to common somewhere (then it is just an electric field shield). If the shield is used in parallel with one of the internal wires, like one side of the pair carrying power, then strictly speaking yes you are creating a loop. But the area of that loop is small, it will not be ideal for low-level signals but for a robust scheme like RS485 it should be fine. I find it can be helpful to sketch the circuit showing all ground connections as wires - without using any ground symbols. Then imagine all those ground wires have resistance or are cut by magnetic flux and then consider the effects on the circuit. Happy networking! piglet
Il 09/05/2016 10:33, Rob ha scritto:
> pozz <pozzugno@gmail.com> wrote: >> I'm going to develop a network of 10-30 electronic nodes based on MCU. >> The distance between them could 100m maximum. >> There is a single centrale power supply unit (PSU) that gives power to >> nodes through a low-voltage 12-18Vdc plus/minus cables. > > Is it a good idea to try to re-invent the wheel? > > I would probably go for ethernet with power-over-ethernet. > The folks who designed that have already considered your worries and > use isolation everywhere (both the data and power are transferred > over a balanced link and isolated at the device). > > Look, for example, at the Arduino line and the Arduino Ethernet Shield > with PoE option. > > The central node can use an off-the-shelf power-over-ethernet switch.
Ethernet has some somedrawbacks in my application: - higher node cost (compared to RS485 transceivers) - PCB space - cabling (star topology with a centrale switch) - higher central node cost (PoE switch) - more complex network stack (IP and TCP/UDP) - more complex MCU
Il 09/05/2016 10:40, upsidedown@downunder.com ha scritto:
> On Mon, 9 May 2016 09:17:28 +0200, pozz <pozzugno@gmail.com> wrote: > >> I'm going to develop a network of 10-30 electronic nodes based on MCU. >> The distance between them could 100m maximum. >> There is a single centrale power supply unit (PSU) that gives power to >> nodes through a low-voltage 12-18Vdc plus/minus cables. > > If the node current consumption is less than 4 mA,
Unfortunately, it's not the case... you could even use
> a 4-20 mA current loop directly or in HART style. You would only need > a single pair for each node.
pozz <pozzugno@gmail.com> wrote:
> Il 09/05/2016 10:33, Rob ha scritto: >> pozz <pozzugno@gmail.com> wrote: >>> I'm going to develop a network of 10-30 electronic nodes based on MCU. >>> The distance between them could 100m maximum. >>> There is a single centrale power supply unit (PSU) that gives power to >>> nodes through a low-voltage 12-18Vdc plus/minus cables. >> >> Is it a good idea to try to re-invent the wheel? >> >> I would probably go for ethernet with power-over-ethernet. >> The folks who designed that have already considered your worries and >> use isolation everywhere (both the data and power are transferred >> over a balanced link and isolated at the device). >> >> Look, for example, at the Arduino line and the Arduino Ethernet Shield >> with PoE option. >> >> The central node can use an off-the-shelf power-over-ethernet switch. > > Ethernet has some somedrawbacks in my application: > - higher node cost (compared to RS485 transceivers) > - PCB space > - cabling (star topology with a centrale switch) > - higher central node cost (PoE switch) > - more complex network stack (IP and TCP/UDP) > - more complex MCU
Of course it depends on the application... using off-the-shelf available hardware can be cheaper than developing your own even when it is more complex. Users may appreciate the use of standardized UTP cabling which is already available, although you could use it for RS485 as well. The use of an off-the-shelf PoE switch avoids the certification of power supplies and the switch can be replaced by a dual-power-supply or secondary DC power type when the customer wants more reliability. Arduino uses an "intelligent" ethernet chip that already contains the TCP/IP stack so it can interface with the microcontroller at the socket level, which may even reduce your software complexity. (no need to develop link level protocol code)
On 5/9/2016 12:17 AM, pozz wrote:
> I'm going to develop a network of 10-30 electronic nodes based on MCU. > The distance between them could 100m maximum. > There is a single centrale power supply unit (PSU) that gives power to nodes > through a low-voltage 12-18Vdc plus/minus cables.
"plus/minus"... relative to *what*? Are you planning on transformer coupling the data lines to the nodes? Otherwise, how will you ensure you meet the common mode limitations of any balanced (or unbalanced) interface?
> I'm thinking about a two-wires half-duplex RS485. I'll have 4 cables (+/- for > power and A/B for signals) and the advantage of differential signals that > should be more immune to external electromagnetic interference. > > However the classical scenario for RS485 is a network of nodes where each node > has a *different local PSU*. Indeed, there are many considerations about > grounding, shielding and avoiding ground loops. Should I connect the ground > between nodes?
Where's the ground? You described "plus/minus" and "A/B". How does "ground" figure into this?
> Should the ground be connected to earth through a short or a > resistor or a capacitor? Should a shield be used? Where the shield should be > connected? Should the shield be connected to ground/earth on one/both sides? > And so on... > I read some documents and there are many different "point of views"... :-) > > However my situation is different. I'll have a *central* PSU, so I must cable > ground and the positive rail. The remote nodes aren't locally connected to > earth (directly or through any other resistive, inductive or capacitor coupling).
And, can you ensure that they never fail in a way that creates a path to "earth"?
> FIRST QUESTION > In this situation, is a single-ended signal (RS232) similar to differential > signals (RS485)?
No.
> I know differential is better because an interference is coupled to both > signals as a common mode voltage that the differential receiver doesn't > consider. But I have ground cable too. So an interference is coupled to *ground > and signal* at the same time. The single-ended receiver measures the difference > between signal and ground, so the common mode voltage created by the > interference is subtracted anyway.
Wires are not "ideal conductors". In a balanced interface, the two complementary signals are sourced similarly and sunk similarly (to each other). The power signals (whether you call them plus/minus or power/ground) are sourced -- and sunk -- differently (than the data signals). Also, note that a bus configuration means every node sees a different IR drop relative to your central power supply. Remember, ALL of the power dissipated in each node has to come down those power lines so "ground" differs from one node to the next. [The same is also true of a star configuration -- though each arm is more easily characterized as it depends only on it's *single* node]
> SECOND QUESTION > Shield is typical connected to ground (or earth?) only at one side to avoid > ground loop antenna. This is true if the remote node has a local earth > connection. In my case the remote node is "floating" respect the earth, so > there's no risk of ground loop antenna if the shield is connected to ground at > both sides. > Is this correct?
Again, are you sure there is no path to earth possible? My incoming telephone (land) line is isolated from earth. Until it fails, over time. Then, the noise floor swamps any signal. Of course, you can claim its "broken" in that case. Fine. How do you expect things to behave when "broken"? If you encounter a hard short to earth at a remote node and end up with a few volts developed across the "ground" connector, what will happen? Have you considered how your devices will react to nearby lightning strikes? (100m is an awfully big antenna into each device!) You've not discussed data rates. You might consider transformer coupling the data lines at each node so you can more safely accommodate a larger common mode range. Even a small audio transformer could suffice. If you want to be clever, you could also deliver power as AC and alter the frequency/phase to support broadcast data (or timing) FROM the central/master node.