Author Topic: Searching for bus!  (Read 3555 times)

0 Members and 1 Guest are viewing this topic.

Offline snxTopic starter

  • Contributor
  • Posts: 47
  • Country: ch
Searching for bus!
« on: April 12, 2019, 02:21:35 pm »
Hello,

For a new project i want to implement a bus system to transmit data from a node to a master.  The hardware layout is like the following:

- From the master device (which contains bus master + psu) a cable runs either as a "stub" or as a ring
- The length of the stub would be maximum 20m, if ring 40m
- The power voltage over the cable can be anything between 9 and 30V. The node device uses 3.3V, so a DCDC is already neccesary.
- The stub from the main cable to each node is around 3meters


The bus would have to have the following tasks:

- Nodes transmit their state in the bus, which are picked up by the master
- Nodes have a STM32F4 MCU
- Nodes should not have to "initialize" on the bus or have to keep continous link. The goal is to init bus transmission, transmit, and then forget about the bus. Similar to putting data on a uart

Additional informations:

- Nodes do not need to know about other nodes
- The bus does not have to be bidirectional, but it can be.


In any case, a bus topology that would support "bus over power" would be preffered, since it would save wires, and the connection would be way easier, because just two wires could be connected with a "cut on" connector.

What topology would be suitable?
 

Offline tsman

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: gb
Re: Searching for bus!
« Reply #1 on: April 12, 2019, 02:27:48 pm »
CAN bus
 

Online newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: Searching for bus!
« Reply #2 on: April 12, 2019, 03:16:10 pm »
Also, RS-485 as physical layer could be an option.
Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: legacy

Offline snxTopic starter

  • Contributor
  • Posts: 47
  • Country: ch
Re: Searching for bus!
« Reply #3 on: April 12, 2019, 05:51:32 pm »
Yes, can but would be an option, but i've read that the stub lenght should not be more than 50cm? :/

Maybe it would be possible to adapt this to can bus?
http://www.ti.com/lit/ug/tidu160/tidu160.pdf
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6719
  • Country: nl
Re: Searching for bus!
« Reply #4 on: April 12, 2019, 10:47:18 pm »
Combined power/data usually uses either high frequency, complex frequency modulated (power line communication) or very high power signalling (1-wire/LIN, the instantaneous power consumption from the signalling far exceeds that of the power consumption of everything on the bus when there is no signalling).

It's hard to isolate the power from the signalling.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Searching for bus!
« Reply #5 on: April 12, 2019, 11:09:08 pm »
Combined power/data usually uses either high frequency, complex frequency modulated (power line communication)

Right. High speed PLC modems are complex and expensive. Even low speed is not trivial, needs magnetics: https://www.mouser.com/new/NXP-Semiconductors/nxptda5051amodem/

I would drop "data over power" requirement, run separate data and power pairs over 2pair UTP cable, use CAN or just addressable (9-bit) RS485 with simple polling or token arbitration. Something like this stack for example (just googled it): https://sourceforge.net/projects/ulan/ there shall be more "lightweight protocol stacks" around
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9008
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Searching for bus!
« Reply #6 on: April 13, 2019, 01:21:43 am »
What about use RF oscillators and receivers connected to UARTs?
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1535
  • Country: au
Re: Searching for bus!
« Reply #7 on: April 13, 2019, 02:04:09 am »
In any case, a bus topology that would support "bus over power" would be preffered, since it would save wires, and the connection would be way easier, because just two wires could be connected with a "cut on" connector.

That gets trickier, but the CAN and RS485 transceivers can come in highly tolerant versions.
I've seen some designs that have a nominally 12V biased cable, that briefly flips to being data. Diodes + caps + current limiters extract power for hold-over times.

Usually extreme care in the timing means the bus-data-drivers never try to drive into a 12V power cable, but the better ones can tolerate should it happen accidentally.

Yes, CAN bus would be an option, but i've read that the stub lenght should not be more than 50cm? :/

CAN bus is OR tied and uses bit-level arbitration, so that does impose some length-speed trade offs.

If you are sending data long distances, you could also look at SENT encoding, which places edges precisely, to encode nibble (4 bits) into Single edge time location.
That has less RFI issues than simple data streams.
 

Offline Dielectric

  • Regular Contributor
  • *
  • Posts: 127
  • Country: 00
Re: Searching for bus!
« Reply #8 on: April 13, 2019, 12:04:58 pm »
If you don't need a lot of bandwidth, something like DCC might work:

https://en.wikipedia.org/wiki/Digital_Command_Control
 

Offline snxTopic starter

  • Contributor
  • Posts: 47
  • Country: ch
Re: Searching for bus!
« Reply #9 on: April 13, 2019, 04:15:50 pm »
Bus over power would be prefferable. I've seen alot of systems that actually use stuff like this. Like PLC, or another system i know is "Siedle", which is a network of intercomm systems. They have speaker mircophone modules with integrated I/O's for door control. Also actually a voice transmission is possible, and the system works like a charm.  In our case, the bus would be used in a very very low duty cycle. Imagine a group of 30 devices on a single "gateway"/busmaster. Each device would only send 3 transmissions in an average time frame of 3hrs. The transmission contain only very few data (16 bytes + adress bytes)

The bus over power, would bring the application alot of benefits. Since this would be a module to sell for a comercial product, you have to weight-in the commercial factors.

Imagine you simply can run 2 generic power wires to the device, stubs could be simply be connected by "cut in" connectors that would connect to a bigger main wire. We use this connectors for another project that only needs power. This task is rather simple can can be done by almost everyone.

Now 4-wire solution would require the main loop cable to fan out to some kind of connector, which would be connected to stub. In its simplest form, this would be a screw clamp. Since most busses need twisted pair or anything like this, instead of wires, a cable would be required, this also would bring de-isolation work, and complexitiviy because of the bus wires, that would have to be connected right.

Maybe on devices in numbers <10, it wouldnt make any major difference in mounting costs. But when speaking in numbers of 1500 devices per customer, splitted in to 15-30 devices per group, the installation cost for a 4-wire system would increase alot, therefore make it more expensive, and less likely to be sold.


As far as i found, there are a few ICs that are specially made for my problem.

Like the AFE031 from Texas
http://www.ti.com/lit/ds/symlink/afe031.pdf

Any infos about possibility of using this devices ?

 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6719
  • Country: nl
Re: Searching for bus!
« Reply #10 on: April 13, 2019, 05:13:45 pm »
You'd still have to do OFDM and a protocol stack yourself. If you want an integrated solution you're looking at something like ST7590/ATPL230A ... 5 Euro ICs in volume.
« Last Edit: April 13, 2019, 05:17:54 pm by Marco »
 

Offline aldi

  • Contributor
  • Posts: 21
  • Country: nl
Re: Searching for bus!
« Reply #11 on: April 13, 2019, 05:17:25 pm »
Maybe KNX? Take a look at the STKNX from ST, pretty cheap at $3 in volume.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Searching for bus!
« Reply #12 on: April 13, 2019, 06:35:45 pm »
If you want an integrated solution you're looking at something like ST7590/ATPL230A ... 5 Euro ICs in volume.

IMHO both are overkill (aimed at AC mains electricity meters). TDA5051A is better match. There's CY8CPLC20 as well.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1535
  • Country: au
Re: Searching for bus!
« Reply #13 on: April 13, 2019, 08:36:07 pm »
As far as i found, there are a few ICs that are specially made for my problem.

Like the AFE031 from Texas
http://www.ti.com/lit/ds/symlink/afe031.pdf

Any infos about possibility of using this devices ?
Clearly, those do work, targeting mains powered parts. There, you cannot practically 'break the mains' in order to send data, so you carrier modulate the cables instead.
How much power do your nodes need ?
If it is typical MCU levels, you can break your 12V supply and send data in short bursts. Even LIN bus may work in your case, as the data rates seem low.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Searching for bus!
« Reply #14 on: April 14, 2019, 12:21:15 am »
Like the AFE031 from Texas
Clearly, those do work, targeting mains powered parts.

AFE is just that - Analog FrontEnd. Bunch of amplifiers for TX and RX, maybe some ADC/DAC. No modem which is main part of any transceiver.

Quote
If it is typical MCU levels, you can break your 12V supply and send data in short bursts.

How do you suggest to "break" supply both ways? Like Maxim/Dallas 1-wire? - Bad idea. It would work for single & simple remote sensor, but would be nightmare to make it work for 30 "smart" nodes.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6719
  • Country: nl
Re: Searching for bus!
« Reply #15 on: April 14, 2019, 02:18:13 am »
Not really a problem with a master/slave solution. The master puts a message on the bus indicating the slaves can start sending, after that you use I2C/CAN bus method for avoiding collisions (ie. start with an identifier and yield if another slave pulls the bus down where you would not).

If you wanted to do it without high power consumption during transmission you could do it like this : master makes the power supply high impedance and pulls the bus down, slaves switch off their power connections, master sends, one of the slaves can send, all the power connections get switched back on and the master puts power back on the bus with low impedance. Rinse, repeat.
« Last Edit: April 14, 2019, 02:25:14 am by Marco »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Searching for bus!
« Reply #16 on: April 14, 2019, 08:41:28 am »
master makes the power supply high impedance and pulls the bus down, slaves switch off their power connections, master sends, one of the slaves can send, all the power connections get switched back on and the master puts power back on the bus with low impedance. Rinse, repeat.

Good one. It could be solution indeed. Master sends query to one particular sensor using "on/off" power modulation. When sensors of the bus receives poll query (no matter which one addressed), they all immediately disconnect their power from the bus for defined & fixed time, master changes bus into "high impedance RX mode" so one addressed sensor can reply using "open/short" modulation.
 

Offline snxTopic starter

  • Contributor
  • Posts: 47
  • Country: ch
Re: Searching for bus!
« Reply #17 on: April 14, 2019, 11:34:41 am »
The nodes need usually 3-5mA @ 3.3V at most of the case, and in some states where action happens, the current will go up to 100mA @3.3V.

The supply voltage can be anything between 4V and 36V, since the step-down converter will be designed to the requirements of the bus. A higher voltage (like >12V, preffered 24V) is desired, because it requieres actuall current on the bus (30 Nodes * 3.3V*0.1A = 10W, which would result in about 500mA @ 24V, mostly every standart wire could carry this).

As stated bevore, the data transfer is neither high speed, nor high data. As far as i saw, most power line communication ic's are built for AC, not DC


I had my own theory of implementing a bus, but surely, a already available solution would overcome my idea in any ways, yet here is my idea.

Imagine a 24V Signal. Now to start a bus transmission, the node would raise the voltage to 25V giving 1V as a LOW signal. High bytes would put another 1V up, so you get 2V for a high signal. By raising the voltage to 25V, other devices would see "that the bus is already in use".
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Searching for bus!
« Reply #18 on: April 14, 2019, 02:04:14 pm »
As stated bevore, the data transfer is neither high speed, nor high data. As far as i saw, most power line communication ic's are built for AC, not DC

Fact that you see AC circuits in application notes does not mean that those IC's cannot be used for DC. Yes, some hi-end AC PLC IC's may have mode to communicate near AC zero crossing, but I think it is just one of operation modes than can be omitted. Otherwise those IC's do not care about AC or DC as long as coupling is properly designed. Simplified AC->DC coupling conversion attached. Inductor shall have comparably high impedance at PLC carrier frequency, in this case 132 KHz. So around 1000uH (~800 Ohms) will be fine for low power, thin cable. BTW RF preamplifiers often are powered "over coax" similar way.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6719
  • Country: nl
Re: Searching for bus!
« Reply #19 on: April 14, 2019, 03:07:05 pm »
The nodes need usually 3-5mA @ 3.3V at most of the case, and in some states where action happens, the current will go up to 100mA @3.3V.

The supply voltage can be anything between 4V and 36V, since the step-down converter will be designed to the requirements of the bus.

Now we can do some math ... if you don't use any fancy impedance switching like KNX-TP or my suggestion, the maximum per node series resistance in the power supply connection is 7 Ohm (4V supply, 3.3V necessary for the buck, at 100 mA). With 30 nodes that's ~0.2 Ohms in parallel, that's a pretty low impedance to push against for signalling, even with only 1V.

PS. actually I didn't think that through, as long as the buck regulators don't have input capacitors they are their own impedance limiters. So to raise the bus 1V you only need ~30*100 mA=3A worst case and around 10W worst case regardless of supply voltage (supply voltage near 3.3V, all nodes using 100 mA, the sending node needs to temporarily supply all the power on the bus). You still need to worry about collisions though, synching by the master followed by the I2C/CAN method would be best IMO.
« Last Edit: April 14, 2019, 05:50:04 pm by Marco »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Searching for bus!
« Reply #20 on: April 14, 2019, 06:11:18 pm »
With 30 nodes that's ~0.2 Ohms in parallel, that's a pretty low impedance to push against for signalling, even with only 1V.
Right. DC loop resistance of Cat5 (24 AWG) 40m pair run is... 7.52 Ohms ;)

It would be good idea to revise voltage range and peak consumption specs. Is it really necessary to run CPU core at high speed, high instant power consumption - if this is low duty cycle application, at least from data transmission point of view?

Quote
PS. actually I didn't think that through, as long as the buck regulators don't have input capacitors they are their own impedance limiters.

You must be joking. In such case conducted/radiated EMI will be through the roof.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6719
  • Country: nl
Re: Searching for bus!
« Reply #21 on: April 14, 2019, 06:14:27 pm »
They can have a 100 nF, just no electrolytics.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Searching for bus!
« Reply #22 on: April 14, 2019, 06:51:24 pm »
They can have a 100 nF, just no electrolytics.

Are you serious that then it can pass (conducted) EMC tests?

http://www.ti.com/lit/wp/slyy136/slyy136.pdf
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6719
  • Country: nl
Re: Searching for bus!
« Reply #23 on: April 14, 2019, 06:59:09 pm »
It's the best you can do, trying to push 30 nodes worth of substantial buffer capacitor up 1V each transmission of a 1 is going to eat a lot of extra power.
« Last Edit: April 14, 2019, 07:00:40 pm by Marco »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Searching for bus!
« Reply #24 on: April 14, 2019, 07:25:36 pm »
It's the best you can do, trying to push 30 nodes worth of substantial buffer capacitor up 1V each transmission of a 1 is going to eat a lot of extra power.

Ever heard of component named diode? :) [kidding] Whole network except one node during host data exchange shall be sleeping, not discharging supply capacitors. SMPS with disable pin/function shall be used so it can be shut down as well. To pass EMC tests (if any planned), there shall be not only electrolytic and ceramics capacitors but common mode choke as well.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf