Arduino Cluster MKE
+ Calling All Arduino Makers, Milwaukee Arduino Cluster (Networked Together) Build!
2017 OCTOBER | by Gene Casanova
Senoir Systems Engineer
MKE Maker Space
- A Place For Arduino Learning & Making | And.. By Invitation, Become Part Of An Inner Circle Of Bleeding-Edge Development Opportunities | Open Minded Experimentation Into The Unknown, Unvisited, Unexplored, Untested, New Questions, New Radical Conceptions Beyond Reality And The Heard Schooled Mentality ("Dreams") - Gene Casanova
Build a controller to send synchronized data to all subsystems within a network; using serial communications, leaving the GPIO pins available for local tasks on each network-node.
Utilize the builtin UART, configured as a cascading daisy chain. The hardware-assisted UART in each MPU is linked toegther through one data line. The networking software, running on each MPU, should not impact performance of each indivual Arduino and it's dedicated task.
The MPU TX pin is linked to another MPU RX pin, and the TX pin of this MPU, is linked tot he next MPU, etc.. creating a daisychain communications network.
Each Arduino (node) needs the following electrical connections.
- 5+ VDC
- TTL TX (3 VDC)
- TTL RX (3 VDC)
Why Not Use The I2C Communications Interface Available On The Arduino?
Why Not Use The 'I2C' Communications Interface Available On The Arduin, with the "Wire" C library?
With ' I2C', each device does not have to receive and retransmit communciations in a network conenction.
With 'I2C', each Arduino responds only to a message sent to a spefic configured I2C network address.
The UART and the I2C use the same number of pins (2); TX/RX or SCL/SDA; therefore a concern.
Each device does not necessarily need to be programmed with an ID.
This dasiychain may not provide fast enough communications for certain applications.
Think about the data-flow-rate when 100 units are connected in this chain. With a protocol of 5 bytes per node, the host has to transmit 500 bytes. When on a shared bus like I2C, 500 bytes would be the total. With the daisychain, the first node has to send 495 bytes, then the second node has to send 490 bytes, and so on. In the end, sending 25250 bytes total!
Assuming 100% efficient reflection between nodes (no delay between receiving the packet and starting to retransmit it) at, 9600 baud, 8 data, 1 stop, no parity, this translates to about 26 seconds (25250 bytes / 960 bytes per second).
Mitigate this by starting to retransmit the packet as soon as the first few bytes are in; enough to calculate the new length. This would only add 100 to 200 byte times to total time because of all the parallel processing. The 500 byte packet will take something like 3/4 of a second to move through the daisychain.
This method creates alot of extra work on a node. On average, each node is transmitting 1/2 the data. In the example, this would be about 250 bytes. And, this is not evenly distributed since the first node always has to transmit the entire packet and the last node has to transmit nothing.
Use The Technology Wisely & Keep It Simple
Need More? Need Help? ........Software, Network, System & Data Center Builder & Developer | Development Services Available - Freelance Small Jobs; To Outsourced Long Term Service Provider Contract Labor Available.
CGI Computer Wares | EST 1979