Task of the week

    What I have did

    Individual assignment :

  • Have designed and built the nodes and master boards.

  • Design, build and connect wired or wireless node(s) with network or bus addresses.

  • Have programmed it to on/off the LED.

  • Program it to do something.

  • Have connect them with each other by wired networking.

    Group assignment :

  • Have sent the message by pressing the buttons of 1 and 2 on keyboard on the master and node.

  • Send a message between two projects.



    Week-14 : -


    In this we have learn about networking and communication. We have also learn about different types of protocalls used for networking and communication, like TCP/IP (Transmission Control Protocol/Internet Protocol), UDP/IP (User Datagram Protocol/Internet Protocol), HTTP (HyperText Transfer Protocol) and FTP (File Transfer Protocol)..In this week we have mainlly focused upon I2C serial bus communication. During this assignment we where get stuck in the connections, programming..etc. After that we have studied lot many things related to networking protocols we have also refer Neil’s document on ‘Networking and communication’. We get the difference between synchronous and asynchronous transmission of data. It was very useful for us while setting up the communication between master and slave boards.

    Networking : -

    Networking is form when more than one computer connected together to form a network for communiction. is a A computer network is a group of computers that use a set of common communication protocols over digital interconnections for the purpose of sharing resources located on or provided by the network nodes. The interconnections between nodes are formed from a broad spectrum of telecommunication network technologies, based on physically wired, optical, and wireless radio-frequency methods that may be arranged in a variety of network topologies. The nodes of a computer network may be classified by many means as personal computers, servers, networking hardware, or general purpose hosts. They are identified by hostnames and network addresses. Hostnames serve as memorable labels for the nodes, rarely changed after initial assignment. Network addresses serve for locating and identifying the nodes by communication protocols such as the Internet Protocol.


Week1-2

    Communication : -

    Communication is the act of conveying meaningful information from one entity or group to another through the use of different signs, symbols, and semiotic rules. The channel of communication can be visual, auditory, tactile/haptic, olfactory, electromagnetic, or biochemical. Communication in the form of data transmission leads to transmission of digital data between two or more computers and computer network or data network is a telecommunication networks that allows computers to exchange the data.

    Serial Communication : -

    Serial communication a single communication link which is used to transfer the data from one end to another. Due to a single communication link serial communication is comparatively more cost effective than parallel communication.

Week1-2


    Parallel Communication : -

    On the other hand in parallel communication, multiple parallel links are used that transmits each bit of data simultaneously.

    Synchronous Transmission : -

    In Synchronous Transmission, data is sent in form of blocks or frames. This transmission is the full duplex type. Between sender and receiver the synchronization is compulsory. In Synchronous transmission, There is no gap present between data. It is more efficient and more reliable than asynchronous transmission to transfer the large amount of data.

Week1-2


    Asynchronous Transmission : -

    In asynchronous transmission, data is sent in form of byte or character. This transmission is the half duplex type transmission. In this transmission start bits and stop bits are added with data. It does not require synchronization.


Week1-2


    I2C Bus Communications : -

  • I2C is a serial protocol for a low-speed 2-wire interface.

  • Develop by Phillips in 1982 for the television manufacturing industry. It was a method to communicate different integrated circuit and television.

  • It is now used by every major semiconductor manufacturer.

  • I2C bus is suitable for use over short devices ~ 1 meter at the speed of 100 Kbaud.

  • The original I2C bus have clock speed of 100 KHz.

  • There is a I2C bus with fast mode up to 400 KHz.

  • There is also a high-speed mode up to 3.4 MHz and Ultra fast mode to 5 MHz.



    To take trial of I2C bus communication between two board, I have connect two arduino with each other in which one acts as master and other act as slave. In which I have connect A4 and A5 pin of one board to another board to set the communication between them. Where A4 is SDA and A5 is SCL pin both pins are require for serial communication between more than one board.



Week1-2

Week1-2

    I2C bus have several names and pronunciation. The full form of I2C is “Inter Integrated Circuit” bus. It is also called as “I-square-C” bus and “IIC” bus. The TWI bus is “Twin Wire Interface”, it is the subset of I2C bus it is virtually same but does not allow the clock starching. SMBus is developed by Intel in 1995 is a subset of I2C.




    Devices connected to I2C Bus are : -

  • There is a VDD line which is a power supply line.

  • This is generally have a 3.5 or 5 volt DC supply.

  • SDA line is the bydirectional data line.

  • The SDC line is the clock signal line.

  • There is a couple of resister which pulls the SDA and SDC line upto VDD level these are pullup resiteres.

  • The master device on the I2C bus can generate the clock and has no I2C address.

  • The first device on I2C bus is a master device. Along with master multiple slaves can be added to the bus. It is also possible to run the I2C bus with multiple master , only one device can be a master at any given time.


    Master : -

    Master always initiate the communications.


    Slave : -

    The slave devices use a unique 7-bit address (128 devices maximum). Many of the slave address are reserved by NXP which is the new name for Phillips semiconductors. Some I2C devices can be configured for multiple addresses this will allows the use of several devices of the same type on one I2C bus. There is a new 10-bit I2C address in scheme will allow more devices upto 1024 devices to be use on I2C bus.


Week1-2


    Steps for designing and programming of slave and master boards. : -

  • First I have designed the schematic and board of slave and master in ‘Eagle’ and have converted it into the ‘.png’ format as shown below.


Week1-2

  • Before switching from schematic to board first I have check the errors in the schematic. There were no errors but some warnings so I have made some changes in the schematics to disappear the warning.

Week1-2

  • Below is the board design of the slave where different components are connected.



  • First I have selected the trace design of board and have export it into the ‘.png’ format in eagle. Same process I have followed for cut file.




  • Milling and stuffing of components on the PCB of the board of node.

Week1-2

  • Below is the schematic for master board.


Week1-2


  • Here is the '.png' image of master board



  • Milling and stuffing of components on the PCB of the board of master.

Week1-2


    Stepswise procedure to setup communication between master and slave : -

    While uploading the code in the board (SLAVE & MASTER) we face many difficulties. We have uploaded more than one codes but communication does not get take place between master and bridge. Here I have done lots of mistakes related to hardware connections and also during uploading the codes. We I haven’t see the result on the serial monitor. After facing lots of difficulties finally the ‘LED’ on slave board glows. So I have written the steps below which will help us to make communication between node and master board. Here one thing is important that I have used an ‘Asynchronous’ networking code.

Week1-2


    Precautions to be taken while connecting two boards (master and slave) : -

  • We should make sure that while uploading program in the board ‘Rx and Tx’ are not connected in the circuit.

  • After uploading the code make sure that we have connected ‘Rx’ of FTDI with ‘Rx’ pin of the master board and ‘Tx’ pin to the ‘Tx’ pin. Same pattern is for making connections between master and node board.

  • We need to connect the programmer while programming into the master and node board separately. While setting up communication between master and node we doesn’t need programmer.

  • In our case we have use ‘Arduino-Uno’ as an FIDI. We have use four pins of ‘Arduino’ that are GND, Vcc (5volt), Rx and Tx. We should make sure that we have connected Vcc to 5Volt and not with 3.3 Volt.


    Code for node/slave : -


    I have shown the program for master and slaves or nod. After uploding the codes in master and slave board I have tested it on the serial moniter.While testing the readings on serial moniter we can not open the serial moniter for both slave and master programming. We have to run serial moniter separately for both slave and master.



	

                
//Created by : Tejswini Chaudhari
//Serial node 0
//Fri 28 06 2019

#include "SoftwareSerial.h"
#define node '1' // defined bridge board address 0
const int rx=PB4;
const int tx=PB3;
//int node=48;    // node number
//int x=0;
  
// the setup function runs once when you press reset or power the board
SoftwareSerial mySerial(rx, tx);

void setup() {
  // initialize digital pin 13 as an output.
   mySerial.begin(9600);
  pinMode(PB0, OUTPUT);
  digitalWrite(PB0, HIGH);
}

// the loop function runs over and over again forever
void loop() 
{
  if(mySerial.available() > 0)
  
  {
    //mySerial.print("here");
    int x=mySerial.read();
    delay(1000);
   // mySerial.print(x);
   
  if (x==node)
    {
    digitalWrite(PB0, LOW);   // turn the LED on (HIGH is the voltage level)
    delay(500);
    digitalWrite(PB0, HIGH);
    delay(500);
    
        }
  }
}



    Same code can be applicable to program master/bridge just we have to define node '0' in place of node '1' in the program given below.




    Download design files : -


    Learning outcomes : -

  • In this week we have studied different types of networking protocols.

  • I have studied the difference between synchronous and asynchronous transmission system.

  • To program different board and establish the communication within them.

  • We also learn the precautions to be taken while connecting the boards and while programming them.

Creative Commons License
Solar Automatic Shredder. by Tejswini Chaudhari is licensed under a Creative Commons Attribution-ShareAlike 4.0
International License