Week 15

Communication and networking

  • * For this week assignment, I have finished an One-to-manu communciaiton with UART. However, as most of you guys know, UART can only be used in one-to-one communication, it not fit for one-to-many communication. So how it works in my case?
    (This assignment I started to design it since 5 weeks ago, and it also a part of my master thesis.)

    1. UART interface

    UART is an interface has been very widely used in embedded system. It usually be used in connecting controller to different models like Bluetooth, GPS, or sensors and etc. It only has tow wires for connectiong, Tx and Rx. avatar

    2.One-to-many UART hardware connection

    All the slave Tx ports are connected to Rx port of master via one common wire and all the slave Rx ports are connected to Tx port of master via another common wire. The two wires can be called ’bus’ and all the messages will be transmitted through these two bus. avatar

    3. Hardware design

    The sytem for testing my algorithm are based in Arduino. And an external circuit board has been made. It includes 4 Keys, 4 LEDs, 1 Display, and one UART interface that is led out with 4-pin plugs.
    The board was designed by eagle.
    The designing file of eagle.
    avatar avatar
    And finally, after the milling and sodering to the board as we did last weeks. The circuit board was made, which be repeated for 4 times.... AS in there assignment, I will use one board to communicate with the other 3 boards.
    avatar

    4. Software design issues

    To achieve the goal of one-to-many communication, these issues must be solved. One thing I would like to show is the pack designing to have the message correctly sent to others. The pack fram designed like showed on the table. avatar It is too long to discuss more about the whole protocol in very detail. I design a experiment system and the code is here.
    The source code
    To use the code, Arduino IDE been used for compiling and programing. In the code file. We have 2 versions of codes, Master and Slave.
    avatar The experiment opertated as:
    The video shows the results of my communication algorithm. By using this algorithm, one board be regarded as the Master can talk to the other boards, which are slaves. And imformation from each board can be sent to the others..