Connecting Zynq boards in deterministic way - networking

I'm trying to make a cluster with Zynq-7010 boards for a real-time application. One of them will be the master, and it will control eight client boards. The master board will also collect the data from clients. I tried to use 100Mbit ethernet connection to connect the nodes but it was not as fast as I need. In addition, it was not deterministic because of switch's indeterministic behavior. Could you give me some idea about how to connect them fast and deterministic way?

One way to speed it up is to use 1Gbit ethernet, which is supported by Zynq-7010, if you have an appropriate ethernet transceiver on the board.
If you have FMC connectors, you could use an FMC Ethernet board to enable the master to connect directly to 4 other boards to avoid the non-determinism of an ethernet switch.

Related

Replace direct RS485 to RS485 connection with Ethernet in the middle?

I have a RS-485 device connected via twisted pair to another RS-485 device.
I'd like to bridge the distance via Ethernet, like so:
RS485 > Ethernet > RS485
Is this possible with two RS485 to Ethernet converters?
[RS485 device] to [RS485-Ethernet] via cable to [Ethernet-RS485] to RS485
The RS-485 communication is bi-directional. As in, the master sends and asks for information. I thought of getting two USR-RS232-304 devices, which I'd like to use for this. Would these work for this purpose? What puzzles me is, one seems to be a server, the other client. Will this still allow for bi-directional comms on the RS-485 side?
I did read the manual, and while it describes the general setup of IP config and transmission parameters, I am not sure (or could not deduct from it), whether bidirectional RS485 would work or not.
Any diagrams I have seen show only one of these converters, with the other end being a virtual comport. The devices I have talking to each other are not computers, where I could load a virtual COM port; hence, my query.
Maybe someone has done exactly what I am after and can share.
Looking at https://www.pusr.com/download/M0/USR-TCP232-304-User-Manual_V1.0.3.01.pdf, it should work. I'd suggest speaking to their support staff directly. (this was once (circa 1992) referred to as two "half bridges", setting to 255.255.255.255 would be a "dumb bridge")

Raspberry communication with multiple Arduino's over long distance wire

Recently i was digging information about communication between RaspberryPi and multiple Arduino slaves over long distance wire (10-15 meters). My initial thought was to use I2C, but after doing some research i have found out that wire length is a problem since it does not capable to transit/receive data over such a distance. Maybe someone would have any suggestions?
I was thinking about another approach - communication over ethernet (using shields). I would place a switch between all the Arduino nodes and Raspberry with multi threaded TCP server on RPI. Does it sound reasonable?
P.S. Wireless communication methods are not allowed.
You can use one of many standards for communications, such as RS-485 or CAN-bus. Both of those allow for "long" distances, but the longer the wire, the slower the speed.
You will need transceivers for each device, but you can buy pre-made modules for quite cheap.

Connect several COM ports into one

I will have several devices with atmel microcontrollers which Im going to connect to PC using COM. Is there any way to connect several devices into one COM? (Let's assume COM can handle amounts of data I need to transmit and I can choose the way of sending data using COM)
Sure, chain the ATmegas together via serial, and use a single USB-serial device. Combine all the data you need to send, and send it out of the single serial port. In each ATmega, you can either relay all the data to the next one, or use a little more intelligent scheme and only forward data meant for other ATmegas.
The standard RS232 COM port does not allow to connect several devices to one port. Because parallel connection of several devices may change electrical signal characteristics such as voltage levels. You may build a chain of ATmegas as uint128_t suggested or change the physical interface type to RS485.
RX pins: you can connect more RX pins together.
TX pins: you can connect more TX pins together if you ensure that only one is active at any time. Others pins must be configured as input or high impedance. This can be done with a suitable protocol.
The parasitic capacitances of pins connected together sum up - this can eventually limit the transfer speed.

Arduino: Packet loss on Serial communication

I am trying connect multiple Arduino Mega Boards via their Serial pins to allow communication between the boards. I want to be able to connect an arbitrary amount of arduinos by daisy-chaning them and I want one board to be the master, taking control over the actions of the other boards. The master should be determined dynamically by the boards. I am aware that the daisy chaining method introduces delays to the communication due to the forwarding of packets, but so far I am planning on connection 4 boards at most. In the future this might increase to maybe 10 boards. My boards all have a separate power source, since they are connected to some other hardware which has its own power source.
My idea was to connect the boards in such a way, that the master would be determined by the wireing of the boards. I thought about having the "Serial" port as 'To-Master' serial port and the "Serial1" port as "To-Child" serial port. The boards send hello messages on the "To-Master" serial port and the master replies if it received such a message on the "To-Child" serial port. If no answer is received after some seconds, the board determines itself to be the master.
I wired the boards up by connecting the ground pins, and wiring RX1 of the master to TX0 of the child and TX1 of the master to RX0 of the child:
Basically my setup is working, since the boards do detect each other and exchange hello messages and replies. There is however a significant amount of packet loss or corruption which I would like to eliminate.
As a simple measure of packet verification, I begin each packet with a "magic number". The receiving board looks for this byte and only tries to read a packet after receiving this byte. Any other bytes received are simply discarded.
As it seems, it happens quite often that something is received on either serial port that does not start with the magic number and is therefore discarded. The timestamps of these events are however consistent with the timestamps of sending of the other board meaning that the packet was at least partially transmitted but somehow the magic byte got corrupted or discarded.
Is this a known problem with the arduinos serial ports?
Can it be related to my wiring?
Are there any measures I can take to ensure a save delivery of the packets?
Can it be a problem of the boards not reading the signal at the correct time (I used a baud rate of 9600)?
I also looked into I2C communication, but I did not find any resource or information if it is possible to dynamically choose the master for this type of communication. Also in the documentation it stated, that it is important that all devices share a common power source which is not possible in my scenario. However, the basic master-slave principle of this I2C conforms with my requirements, as I have a master that sends commands to all other boards. Could I2C be utilized in my case?
Thank you for your thoughts!
Here is a discussion about multi-master I2C topology of Arduinos, seems that it is supported (haven't tested it myself). - http://forum.arduino.cc/index.php/topic,13579.0.html
You can test SPI as well, here is a comparison between the two - http://components.about.com/od/Theory/a/Selecting-Between-I2c-And-Spi.htm.
Slave might be selected with generic GPIOs
I don't know any known implementation of multi-clients on top of Serial bus (usually it is intended for peer2peer communication only) - even though, your configuration seems reasonable, I would be considering other options.
BTW, from your comment about different power sources, I assume your boards are away from each-other. Have you considered very cheap ($2) RF modules, such as nRF24L01+ (http://maniacbug.wordpress.com/2011/11/02/getting-started-rf24/). THere is a library for networking those in multi-node network
Might be better off with I2C or SPI like people have suggested here.
However, to address your question directly, it is most likely wiring. I am assuming you are using cheap jumper wires to plug directly into the Arduino Headers. Noise on this connection is the most likely problem or garbled serial messages. Try implementing with twisted pair cables and connecting directly to the board.
SPI or I2C might have better error correction than your customer serial protocol. I would see the other answers for that.

How do I use Zigbee to communicate to a laptop?

What I have in mind is having a number of sensors (temperature, accelerometer, sound level meter) that are controlled by a micro controller. What I want to do is take this information and transmit it wireless to a laptop that will take this information and put it on to a web server using Zigbee. I don't know where to start.
Since you don't have any hardware as of yet, you might want to give the Arduino a try. The hardware is affordable, can be connected to your system via USB while being programmable in-system.
The basic board can be extended via so called "shields", which offer additional features. In your case, the XBee shield would be appropriate. Connecting your laptop to a XBee module is as simple as using Sparkfun's breakout board and a mini-USB cable.
The Arduino has a large community, so you will find a lot of resources, like books, online material, example code etc.
We also provide wireless modules that can be used for serial data transmission. They can be found at www.starmanelectric.com Our modules are very similar to the xbee, but more plug and play. They can be a great for going wireless for the first time. Our devices are designed to function like a "wireless cable" so if you're used to using wires then you'll be up and running in no time at all. We also have circuit examples for transmitting to a laptop serial port or USB. Any micro-controller will be fine for this application, as long as it has a serial port and a few ADCs to sample your data. Our modules also provide simple analog in/out which can run in parallel to the serial. If you want to compare to other systems, I would google "wireless serial modules"
Regards,
Michael
Starman Electric

Resources