On Developing High-Speed Heterogeneous and Composite ES Network through Multi-Master Interface

These days, many heterogeneous and composite embedded systems contain many subnets developed using different bus-based protocols, such as I2C, CAN, USB, and RS485. There is always a requirement to Interface and interconnect the heterogeneous ES networks to achieve and establish a composite network. The ES networks developed using different protocols differ in many ways, considering the speed of communication, Arbitration, Synchronization, and Timing. Many solutions are being offered using heterogeneous embedded systems, especially in implementing automation systems, without addressing integration and proper interfacing. In this paper, a Multi-Master based interfacing of a CAN and I2C networking through Ethernet-based interfacing has been presented especially to find the optimum speeds at which the networks must be operated for different data packet sizes. It has been shown in the paper that it is quite efficient and effective when a data packet of size 40 bytes is driven using an IC speed of 5120 bits, Ethernet speed of 20480 bits, and CAN speed of 500 bits. Keywords—Embedded systems; embedded networks; hybridization of embedded networks; hybridizations through multimaster communication

race models or undertaking hybridization of structural models. The idea of hybridization is increasingly common in the automotive area where everything must work consummately, disregarding un-sureness. Hybridization helps when the correspondence needs to occur in questionable circumstances. Engineering has been displayed that can be utilized to actualize applications requiring the idea of hybridization. Numerous Interface gives that must be considered and taken care of through a programming model that makes the framework hybridization-mindful [2].
Two gauges are utilized as often as possible. They incorporate field bus and CAN bus for executing industrybased applications; field bus benchmarks are not uniform and incredibly vary from industry to industry. Correspondence between the gadgets utilizing Fieldbus in that capacity is entangled. In industry, both the transport based systems administration frameworks are often utilized. This has prompted a prerequisite of converting one kind of correspondence to the next, which can be accomplished through convention transformation. Convention transformation can be planned and actualized at the equipment level [3].
CAN transport based correspondence can be utilized for systems administration with frameworks. The engineers need to comprehend the CAN convention, Interface, controller, and Physical associations before the applications can be created utilizing CAN-based correspondence. Actualizing CAN-based correspondence at the net root level is entangled and needs thorough testing. The advancement of utilizations utilizing CAN is made to be straight through the CAN module. The CAN is a convention suite that can be coordinated with any inserted framework Software. Sending and getting the information can be accomplished through the CAN module [4]. When CAN is to be utilized alongside other correspondence conventions, for example, I2C, protocol transformations can be actualized at work level rather than net root level. If another module that modified works I2C communication is grown, at that point, convention transformation can be accomplished at the work level.
A different gadget can be structured and built to do conventional change utilizing numerous Microcontroller based frameworks, fast double port RAM information sharing innovation, and continuous multi-entrusting framework C/OS-II. A convention converter that helps correspondence somewhere in the range of RS232C and RS485 has been built up to be actualized inside savvy instruments, information securing frameworks, etc. [5]. The gadget can be interfaced with a remote checking framework through Ethernet-based correspondence. Along these lines, sequential gadgets can be connected to the system control layer. This gadget built up along these lines has unwavering high quality and continuous execution and acknowledge information trade, information sharing, and data handling among various Microcontroller based frameworks Field bus convention is nonstandard and has been actualized in various forms. There is additionally an issue of interconnecting distinctive field buses. At the point when two systems are manufactured utilizing distinctive Fieldbus correspondence, conventional transformation is required. ARM controller can be used for accomplishing the change. The convention transformation is accomplished through the advancement of a protocol utilizing a standard information parcel. The strategy isn't constrained to coordinated transformation and is free of the transport area and convention utilized by the field buses [6].
A USB and I2C convention varies in numerous angles, considering how the correspondence is attempted. The information bundle groups, length of the system, number of gadgets that can be associated, number of ace, transport discretion, synchronization strategy, stream control, and so on vary greatly. A mapping between I2C and USB have been done both at the equipment and product level. The product structure that can be utilized for accomplishing the change has been displayed [7].
Modbus and Profibus are two correspondence frameworks utilized for accomplishing modern mechanization. Both specialized strategies are generally utilized in the modern control field. Anyway, these two means of transport can't be associated straightforwardly because of the presence of extraordinary fluctuation between them. An entryway is required for interfacing two unique means of transport through which convention transformation can be conveyed. A passage is created utilizing the AT89C52 Microcontroller. Profibus and Modbus are two progressively basic mechanical field transport; they were generally utilized in the modern control field. Since the two means of transport can't inter-connect with one another, a Profibus and Modbus convention conversion is required. SPC3 is incorporated with the Micro Controller to achieve Profibus and Modbus conversions [8].
Numerous kinds of sub-frameworks are to be created and actualized, utilizing distinctive correspondence frameworks. For example, s Flight control, banking, therapeutic, and other high affirmation frameworks should be executed most unequivocally since the correspondence framework utilizes distinctive signaling, sheathing, commotion separating, signal disconnection, and so forth. One should structure and build up the framework so that one sub-framework doesn't meddle with the other.
Following a data stream at the equipment level is one strategy that can be utilized to distinguish and channel the differences. The door level in-arrangement stream following (GLIFT) framework is built to provide a technique for testing data streams inside I2C and USB. Time-division various access (TDMA) has been utilized that can confine a gadget on the BUS from the streams [9].
Mechanical Ethernet innovation (EPA) and Modbus correspondence innovation (MODBUS) are now and again utilized correspondence frameworks to actualize modern procedures. No immediate communication in that capacity can be conveyed in the middle of these two frameworks as there is no immediate similarity between them. A corresponding passage is created for accomplishing the necessary Interface between these two innovations. A passage has been created utilizing an ARM-based smaller scale controller and COS continuous working system. Bidirectional correspondence can be accomplished through the utilization of the entryway. 321 | P a g e www.ijacsa.thesai.org The correspondence entryway can give a steady, secure, constant, and adaptable answer to power plants [10].
Two kinds of industry explicit correspondence frameworks are utilized in the power segments intended for National power dispatching and control the breeze factories. To achieve integration, the framework theories correspondence frameworks must be interfaced with one another. A method has been developed to accomplish conventional transformation that executes capacities like interconnectivity, convention information type, configuration change, and scaling, information approval, the board of neighborhood/remote directions, recreation of information parcels transmission, etc. solicitations, communication bundles investigation, and repetitive correspondence joins [11].
Field buses are utilized for trading information between several microcontrollers and field gadgets by affecting communication among them. Numerous adaptations of the field bus communication frameworks exist. Structuring a correspondence framework for impacting correspondence among the gadgets that keep diverse Fieldbus correspondence benchmarks is mind-boggling and, by and large, prompts convoluted usage of equipment and programming. An effective correspondence interface is a requirement for executing a solid framework utilizing restrained field bus correspondence norms. CAN transport is additionally being utilized nowadays for actualizing a significant number of mechanical procedures. There is a need to interconnect between CANBUS and MODBUS. The correspondence conventions are to be mapped considering various parts of correspondence, and afterward, an interface is required to be created. An interface that associates both the transport based correspondence frameworks has been introduced [12] [13].
The way networking of the embedded systems is carried on the kind of communication standard used I2C [14], USB [15], CAN [16] and RS485 [17] and also the kind of Microcontroller based systems used for networking.
Many issues related to networking have been discussed [18] [25] for hybridizing the networking of heterogeneous embedded networks. The interconnection between an I2C network and a CAN network can be achieved by developing a device that bridges both the networks. Speed Matching is one of the most important considerations that must be handled when it comes to the ES networks' hybridization [26]. Rajasekhar et al. have presented an efficient architecture that considers hybridization using Multi-master Interface [27], which is further extended in this paper to drive the architecture with the main considering driving through optimum speeds.

A. Application Development using CAN Interface
An ES Application is developed through a CAN network, which is meant for monitoring and controlling temperature and humidity within an Engine.
CAN-based networking is archived through one Master and two slaves. The slaves are implemented through Arduino-UNO, and the Master is implemented through STEM 32. All three systems are connected through MCP 2515 CAN Module. The Master is connected to a SWITCH through its native Ethernet port for onward networking with another network developed using a different protocol such as I2C.
One of the slaves is connected with the DHT 11 sensor situated near an automobile system engine. The sensor continuously monitors the temperature of the engine and sends the information to the CAN master. CAN Master will send the information to the I2C Master through the Ethernet interface. I2C Master drives a different network based on its native protocol; The I 2 C Master sends the data that it received from the CAN network to the I2C slave, a kind of actuator to cool through a FAN connected to the slave. The FAN is controlled through a relay system. Whenever the engine's temperature goes beyond a level, the FAN is switched on or otherwise switched off. The Functional requirements of CAN-based Application is shown in Table I.
The Networking Diagram for the Application is shown in Fig. 1.
CAN or Controller Area Network is a two-wired asynchronous, half-duplex fast sequential system-bus width of CAN is 217 bits. CAN is used for communication among devices in a closed distance, such as in a vehicle. CAN is based on CSMA-CD/ASM convention. CSMA guarantees that every hub must hang tight for a given period before sending any message. The crash location guarantees that the impact is kept away from choosing the messages dependent on their endorsed need. It gives a flagging rate from 125kbps to 1 Mbps. It accommodates 2048 diverse message identifiers. CAN bus is the multi-master protocol. When the bus is idle, any device can be attached to the CAN bus and starts messaging. The can bus versatile, so devices attached to the bus do not have addressing. Each device in the CAN bus receives every message transmitted over the bus, and it is up to the device to decide whether to use the message that it receives or simply ignore it when the message is no more related to its own.
CAN bus provide remote transmission request (RTR), meaning that one node on the bus can request information from the other nodes. A request for information is sent to a node instead of waiting for a node to send information continuously. Any device in CAN bus can identify the error that occurred on the bus while transmitting the data and generates the error frames. The node which identifies the error alerts all other nodes about the error. There are no limitations for attaching and detaching the CAN bus devices, so devices are easy to attach and detach. Depending on the bus delays time and electrical loads, we can only decide the number of devices attached to the bus. CAN protocol send messages in different types of data packets that include data frames, remote frames, error frames, and overload frames shown in Fig. 2, Fig. 3, Fig. 4, and Fig. 5. Data Frames are used to transmit data from Master to Slave and vice versa. Remote frames are used to seek permission from another node to transmit messages. Error frames are used for transmitting the errors that occur due to transmission, which can be classified as Bit errors, CRC errors, Form errors, Acknowledgement errors, and Stuffing errors. Overflow frames are used to create extra delays required for transmission of data or response.    CAN-based communication between the Master and slave can be undertaken using speeds ranging from 125kbs to 1Mbps following the protocol sequences. The sequence in which the data packets are transmitted depends on the type of Application implemented over the network. The most appropriate choice of speed is the most important issue to be dealt with for realizing effective communication to take place among the heterogeneous network. The choice, however, needs to take into consideration many other important parameters. 323 | P a g e www.ijacsa.thesai.org

B. Application Development using I2C Interface
Another I2C network is used as a subnetwork integrated into a composite network along with the CAN network. The ES Application developed through I2C Interface is related to measuring the distance of the objects Located behind a motor Vehicle and controlling the speed of a FAN fitted within the engine based on the engine's temperature, which is transmitted through the CAN network. The Application-specific functions implemented through I2C based networking is shown in Table II. I2C Network is built with a single master and two slaves. One slave is connected with an ultrasonic sensor to monitor the nearest object's distance while t h e car is backing up. The monitored distances are sent to CAN master through Ethernet. The Second slave is connected with a DC Motor for controlling FAN's speed, which is connected to an engine. The FAN controlling is done based on the Temperature and Humidity data received from the CAN master. Two different protocols are used within I 2 C, each for reading and writing data.
The networking Diagram for the I 2 C based Application is shown in Fig. 6. The following sequence of operations is carried when data transmitted by a slave is to be read by the Master.
1) The master device sets the Read/Write bit to '1' instead of '0', which signals the targeted slave device that the master device is expecting data from it.
2) The slave device sends the 8 bits corresponding to the data block, and the master device sets the ACK/NACK bit.
3) Once the master device receives the required data, it sends a NACK bit. Then the slave device stops sending data and releases the SDA line.
4) Suppose the master device reads data from a specific internal location of a slave device. It first sends the location data to the slave device using the steps in the previous scenario. It then starts the process of reading data with a repeated start condition.
The following sequence of operations takes place when a master device tries to send data to a particular slave device through the I 2 C bus: 1) The master device sends the start condition.
2) The master device sends the seven address bits, which corresponds to the slave device to be targeted.
3) The master device sets the Read/Write bit to '0', which signifies a write.
4) Now two scenarios are possible. 5) If no slave device matches with the address sent by the master device, the next ACK/NACK bit stays at '1' (default). This signals the master device that the slave device identification is unsuccessful. The master clock will end the current transaction by sending a Stop condition or a new Start condition.
6) If a slave device exists with the same address as the one specified by the master device, the slave device sets the ACK/NACK bit to '0', which signals the master device that a slave device is successfully targeted. 7) If a slave device is successfully targeted, the master device now sends 8 bits of data only considered and received 324 | P a g e www.ijacsa.thesai.org by the targeted slave device. This data means nothing to the remaining slave devices.
8) If the slave device successfully receives the data, it sets the ACK/NACK bit to '0', which signals the master device to continue.
9) The previous two steps are repeated until all the data is transferred.
10) After all the data is sent to the slave device, the master device sends the Stop condition, which signals all the slave devices that the current transaction has ended.

C. Data Frames
I2C data is transferred in messages. Messages are broken into frames of data. Each message has an address frame that contains the binary address of the slave and one or more data frames that contain the data being transmitted. The message also includes start and stop conditions, read/write bits, and ACK/NACK bits between each data frame. The format of the message used within an I2C system is shown in Fig. 7.
Start Condition is initiated by making the SDA line switched from a high voltage level to a low voltage level before the SCL line switches from high to low. The Stop condition is achieved through switching the SDA line from LOW voltage to HIGH voltage after SCL is switched from LOW to HIGH. The Bits 7-10 contain the address of the slave with which the Master wants to communicate. The Read/Write Bit specifies whether the Master is sending data to the slave (low voltage level) or requesting it (high voltage level). The ACK/NACK Bit specifies whether the Master requires Acknowledgment from the slave or otherwise. If an address frame or data frame was successfully received, an ACK bit is returned to the sender from the receiving device.

D. Comparison of Application Specific CAN and I2C Networks
I2C and CAN networks differ in many ways: speeds, protocols used for transmission and reception of the data, addressing the devices within the networks, the data frames used for transmission and reception of the data, error control implemented, etc. Making a device as a slave to both the networks is cumbersome. There can be many ways of interconnecting both the networks, including connectivity through a single Master, Connectivity through Multiple Masters, Connectivity through a Bridge, and by implementing a Universal Bus.

E. Interconnecting between CAN and I2C Networks through Multi-master Interface
The interconnection between the I2C network and CAN network is achieved by interfacing the MASTERS using an Ethernet Interface is shown in Fig. 8.
The Master on the I2C network has both the I2C and Ethernet Interface, and similarly, the Master on the CAN network has both the CAN and Ethernet Interface. Whenever data from an I2C slave is transmitted to a CAN salve, the data is first transmitted to the I2C Master using the I2C protocol. The data packets are de-assembled and then assembled into Ethernet packets. The Ethernet packets are then transmitted to the CAN master through peer to peer connection established through Ethernet. The CAN-master receives the Ethernet packets, and the packets are dissembled and assembled into CAN packets, which are then transmitted to the CAN slave. The process of transmission from a CAN slave to the I2C slave similarly takes place.
The entire communication process involves selecting the proper speeds considering I2C, CAN, and Ethernet communication systems. The communication is completed with an acceptable response time. The delay caused due to deassembling and assembling the packets must also be taken into account while calculating the response time.   Fig. 9. The most important issue is the arbitration among the I2C Master and CAN master on the kind of speeds used for effecting communications intra I2C, intra CAN, and between the masters using internet Interface. Speed matching is necessary so that the required response time is met. There should be time allowance for assembling and de-assembling the packets of different types. The software components contained within the slaves and the Masters shall carry designated functions as shown in the Architectural Diagram. The masters agree on speed based on the amount of data to be submitted, considering the type of packets and the packets' size to be transmitted, and considering the amount of delay time caused due to de-assembling and assembling processes. Once the speed agreements are achieved, the Master shall communicate the agreed speeds to the respective slaves to follow the speeds, especially setting the slave's internal timers. While data moves from one type of protocol to another, the data packet size increases or decreases. When an I2C Data packet is to be moved using the Ethernet protocol, the data packet size increases while the transmission speed increases; when a data packet is received through Ethernet into a CANbased system, the same is de-pocketed and assembles into a packet size of small packets, which can be handled through fewer transmission speeds. It is rather challenging to decide on the transmission speeds chosen when communication has to be effected using a specific I2C, Ethernet, and CAN speeds that reduce the transmission time. The choice of speeds is also dependent on the total raw data transmitted from Time to Time.
In the typical example stated in section 5.0, the temperature data needs to be moved from the I2C network into the CAN network through the Ethernet interface. Similarly, the distance data must be moved in the other way. It is sufficient to analyze from either end of I2C and CAN for computing the time taken to transmit from either end. For this reason, the data analysis from I2C end to CAN is presented in this paper.
Communication time computations have been carried considering the data size that includes 16 Bits, 32Bits, 40Bits and 48Bits, I2C speeds that Include 100kbps, 400kbps, 3482kbps, and 5120kbps. CAN speeds include 500kbps, 250kbps, 125kbps, 10Kbps, and the Ethernet speeds that include 10240kbps, 20480kbps, 30720kbps, and 5120 Kbps to find the combination of speeds that provide the least response time. Table III, Table IV, Table V, and Table VI show the computations regarding data sizes 16bits, 32Bits, 40Bits, and 48Bits, respectively. The response time computations are made considering time taken to transmit using I2C protocol, data receiving time using Ethernet protocol, time taken to depocketing I2C packets and Pocketing to Ethernet packets, time is taken to transmit using Ethernet protocol, time is taken for receiving the data on the master side using the Ethernet protocol, time taken to DE packet the Ethernet packet to CAN packet, and time taken to transmit the CAN Packets to the CAN slave.
The response time computations are shown in Table VII,  Table VIII, Table IX, and Table X for data sizes 16bits, 32Bits, 40Bits, and 48Bits for a different combination of speeds considering I2C, Ethernet, and CAN. It can be seen that the least response time (4.856002808 Micro Secs) is obtained when data size is 16 Bit when one considers I 2 C speed of 5120 bits, Ethernet speed of 51200bits, and CAN speed of 500bits. The least response time obtained is 5.241206 Micro Seconds when data size is 32Bits and when one considers I2C speed of 3482bits, Ethernet speed of 51200bits, and CAN speed of 500bits. The least response time obtained is 4.517013550 microseconds when the data Size 40 Bits considering I2C speed 5120bits, Ethernet Speed of 20480bits, and CAN speed of 500bits. The least response time obtained is 5.542037964 Microseconds when the data size is fixed are 48bits considering the I2C speed being 5120bits, Ethernet speed being 51200bits, and CAN speed 500bits.    The overall assessments of comparable speeds considering local minimums of different data sizes and their related speeds are shown in Table XI. It can be seen from Table XI and Fig. 10 that optimum response time can be achieved when I2C speed is 5120 Bits, Ethernet speed is fixed at 20480 Bits, and the CAN speed fixed at 40bits and that too when the data size is fixed at 40 Bytes. However, if there is a limitation on the data size, then the local minimum can be determined considering all the combinations of the I2C, Ethernet, and CAN speeds.

Response Time in Micro Seconds
Response Time in Micro Seconds 332 | P a g e www.ijacsa.thesai.org

VI. CONCLUSIONS
Interfacing different heterogeneous ES networks into a composite network are quite challenging. Many issues that include synchronizing, arbitration, timing, and speed control have to be tackled properly so that optimum acceptable response time is achieved, failing which the system's expected response time cannot be supported. Many mechanisms can be implemented for achieving the issues of hybridization that include introducing a bridge device, adapting a universal bus, a single master interfacing, and a Multi-Master interfacing. A detailed comparison of protocols shows the issues that must be considered for interacting and integrating heterogeneous communication systems.
In this paper, a Multi-Master interfacing interconnects an I2C network with a CAN network using an Ethernet interface. The detailed working of data communication considering the different combination of I2C, CAN, and Ethernet speeds have been presented, and the best combination of these speeds that gives the least response time has been presented.
Further research can be carried to find the speed combinations that must be considered when networking is to be done considering I2C+USB, I2C+RS485, CAN+USB, CAN+RS485, USB_RS485. Interfacing using a single master through a common bus is also one of the important approaches that can be considered.