Searching for bus! - Page 1
Forum section: electronics / general

author: snx
author_rank: Contributor
timestamp: April 12, 2019, 02:21:35 pm
content: 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 3metersThe 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 uartAdditional 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?

author: tsman
author_rank: Frequent Contributor
timestamp: April 12, 2019, 02:27:48 pm
content: CAN bus

author: newbrain
author_rank: Super Contributor
timestamp: April 12, 2019, 03:16:10 pm
content: Also, RS-485 as physical layer could be an option.

author: snx
author_rank: Contributor
timestamp: April 12, 2019, 05:51:32 pm
content: 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

author: Marco
author_rank: Super Contributor
timestamp: April 12, 2019, 10:47:18 pm
content: 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.

author: ogden
author_rank: Super Contributor
timestamp: April 12, 2019, 11:09:08 pm
content: Quote from: Marco on April 12, 2019, 10:47:18 pmRight. 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

author: NiHaoMike
author_rank: Super Contributor
timestamp: April 13, 2019, 01:21:43 am
content: What about use RF oscillators and receivers connected to UARTs?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 13, 2019, 02:04:09 am
content: Quote from: snx on April 12, 2019, 02:21:35 pmThat 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, thatbrieflyflips to being data. Diodes + caps + current limiters extract power for hold-over times.Usually extreme care in the timing means the bus-data-driversnevertry to drive into a 12V power cable, but the better ones can tolerate should it happen accidentally.Quote from: snx on April 12, 2019, 05:51:32 pmCAN 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.

author: Dielectric
author_rank: Regular Contributor
timestamp: April 13, 2019, 12:04:58 pm
content: If you don't need a lot of bandwidth, something like DCC might work:https://en.wikipedia.org/wiki/Digital_Command_Control

author: snx
author_rank: Contributor
timestamp: April 13, 2019, 04:15:50 pm
content: 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 Texashttp://www.ti.com/lit/ds/symlink/afe031.pdfAny infos about possibility of using this devices ?

author: Marco
author_rank: Super Contributor
timestamp: April 13, 2019, 05:13:45 pm
content: 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.

author: aldi
author_rank: Contributor
timestamp: April 13, 2019, 05:17:25 pm
content: Maybe KNX? Take a look at the STKNX from ST, pretty cheap at $3 in volume.

author: ogden
author_rank: Super Contributor
timestamp: April 13, 2019, 06:35:45 pm
content: Quote from: Marco on April 13, 2019, 05:13:45 pmIMHO both are overkill (aimed at AC mains electricity meters). TDA5051A is better match. There's CY8CPLC20 as well.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 13, 2019, 08:36:07 pm
content: Quote from: snx on April 13, 2019, 04:15:50 pmClearly, 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.

author: ogden
author_rank: Super Contributor
timestamp: April 14, 2019, 12:21:15 am
content: Quote from: PCB.Wiz on April 13, 2019, 08:36:07 pmAFE 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.QuoteHow 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.

author: Marco
author_rank: Super Contributor
timestamp: April 14, 2019, 02:18:13 am
content: 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.

author: ogden
author_rank: Super Contributor
timestamp: April 14, 2019, 08:41:28 am
content: Quote from: Marco on April 14, 2019, 02:18:13 amGood 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.

author: snx
author_rank: Contributor
timestamp: April 14, 2019, 11:34:41 am
content: 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 DCI 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".

author: ogden
author_rank: Super Contributor
timestamp: April 14, 2019, 02:04:14 pm
content: Quote from: snx on April 14, 2019, 11:34:41 amFact 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.

author: Marco
author_rank: Super Contributor
timestamp: April 14, 2019, 03:07:05 pm
content: Quote from: snx on April 14, 2019, 11:34:41 amNow 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.

author: ogden
author_rank: Super Contributor
timestamp: April 14, 2019, 06:11:18 pm
content: Quote from: Marco on April 14, 2019, 03:07:05 pmRight. DC loop resistance of Cat5 (24 AWG) 40m pair run is... 7.52 OhmsIt 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?QuoteYou must be joking. In such case conducted/radiated EMI will be through the roof.

author: Marco
author_rank: Super Contributor
timestamp: April 14, 2019, 06:14:27 pm
content: They can have a 100 nF, just no electrolytics.

author: ogden
author_rank: Super Contributor
timestamp: April 14, 2019, 06:51:24 pm
content: Quote from: Marco on April 14, 2019, 06:14:27 pmAre you serious that then it can pass (conducted) EMC tests?http://www.ti.com/lit/wp/slyy136/slyy136.pdf

author: Marco
author_rank: Super Contributor
timestamp: April 14, 2019, 06:59:09 pm
content: 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.

author: ogden
author_rank: Super Contributor
timestamp: April 14, 2019, 07:25:36 pm
content: Quote from: Marco on April 14, 2019, 06:59:09 pmEver heard of component named diode? 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.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 14, 2019, 11:52:46 pm
content: Quote from: snx on April 14, 2019, 11:34:41 amFor how long does it need 100mA ? Is that a responding node, or is there a chance all nodes can demand 100mA at the same time ?Can you ensure no slave is demanding 100mA during a narrow reply-window ?Quote from: snx on April 14, 2019, 11:34:41 amIf you use linear regulators, (or even current diodes, common for LEDs these days) you can modulate any swing you likeabovedropout for one direction. (PSU -> Slave)That leaves the other direction and that gets trickier.If you know the current profiles of the slaves, the may be room to current modulate a reply that can be decoded to ignore normal operating current changes.Otherwise, there are power-break-send-in-gaps designs, those works best with lowest power nodes, as the power needs a CAP reservoir during send.