Friday 9 November 2018

microcontroller - UART Data Transfer Across Modular Boards


I am trying to create a modular system that uses UART to broadcast the same data to each microcontroller that gets added to the system. It could have 3 or it could have 10 modules added to the system.



Each PCB module is separated by no more than 1 inch of space (i.e most of the trace length will be running on PCB, the 1 inch is just the jack to make the connection from one PCB to the other). The total length of the system would be about 6ft.


What signal protocol would you suggest that could easily be designed onto a PCB system that is modular? RS485 uses twisted pair, which would be difficult to achieve on a PCB from what I can tell. I was considering hooking up all the Rx's of the "slave" microcontrollers to the Tx of the "master" microcontroller. This would allow instantaneous transmission to all of the slave microcontrollers as needed. I do not intend to use UART to communicate back.


What things should I consider in the design? Could one microcontroller output handle the inputs of up to 10-15 microcontrollers? Will I need to add signal boosters?


It is important to clarify that these devices will be modular, so virtually identical. I can't have some components on boards 5-6 that aren't on boards 7-8 for example. The speed I hope to transmit at is ideally 1Mbps.



Answer




Could one microcontroller output handle the inputs of up to 10-15 microcontrollers?



The GPIO pins are CMOS, so they can handle many more than that, in terms of fan out. In fact, it is more than you can get from standard 1 unit load RS485 transceiver.


At 1Mbps however, the capacitance of the line comes into play, so a lot depends on the connectors you use.




RS485 uses twisted pair which would be difficult to achieve on a PCB from what I can tell



Running traces on PCB parallel to each other would pretty much have the same effect as twisting wires.



This would allow instantaneous transmission to all of the slave microcontrollers as needed.



Here comes the $100 question: what is "instantaneous" to you?


The simplest solution in your case would be to add a tiny schmitt buffer like SN74LVC1G17 at the output connector of each module. Then you can daisy chain your modules practically indefinitely.


The catch, however, in propagation delay, which for the chip above is about 3 ns. So, for the chain of 10 modules you are looking at 30 ns delay between first and last module. If this is instantaneous enough then just go ahead with UART and don't bother with transceivers or multiple wires.



Another catch is that your master module must be located at the beginning of the chain. If this is not convenient, you can put the buffer between Tx and pass-through line. It has 24 mA driving capability and only 4 ns propagation delay into 50 pF load. This should be sufficient for 6 ft line with 10 connectors.


BTW, differential buses have similar issue - you have to add termination resistors to each module but only activate them at the ends. Which means you have to keep an eye at each module placement anyway. Might as well keep an eye on one module instead of two.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...