CAN Protocol Based Industrial Parameter Monitoring System Using ARM

June 4, 2017 | Autor: Ijifr Journal | Categoria: Electronics Engineering
Share Embed


Descrição do Produto

Research Paper

Volume 3 Issue 8

April 2016

International Journal of Informative & Futuristic Research ISSN: 2347-1697 CAN Protocol Based Industrial Parameter Monitoring System Using ARM Paper ID

IJIFR/V3/ E8/ 034

Keywords

CAN Protocol, Network Based Industry Monitoring System

1st

2nd

Page No. 2865-2873 Subject Area

Electronics Engineering

Professor D. G. Chougule Department of Electronics Engineering T.K.I.E.T., Warananagar, India M.E. Student Kunal D. Patil Department of Electronics Engineering T.K.I.E.T., Warananagar, India

Abstract This paper describes the implementation of data communication of various parameters based on CAN protocol by using microcontroller in industry. The devices that are connected by a CAN network are typically sensors and control devices. A CAN message never reaches these devices directly, but instead a host processor and a CAN controller are needed between these devices and the bus. The sensors at various locations in industry sense it and give data to microcontroller. The microcontroller gives data to the CAN transceiver. CAN transceiver transmit as well as receives data to and from the microcontroller & displays the data by using the LCD and data will be send to the PC or monitor control unit.

1. INRODUCTION The Controller Area Network (CAN) is a Serial, Asynchronous, Multi-master communication protocol for connecting electronic control modules in Automotive and industrial applications. CAN have many features like: Low cost, Easy to implement, peer to peer Network with powerful Error Checking, Higher Transmission Rates 1MBitps[1]. CAN is a multi-master broadcast serial bus standard for connecting electronic control units (ECUs).Each node is able to send and receive messages, but not simultaneously: a message (consisting primarily of an ID usually chosen to identify the message-type/sender and up to eight message bytes) is transmitted serially onto the bus, one bit after another this signal pattern codes the message (in NRZ) and is sensed by all nodes.

Available online through - http://ijifr.com/searchjournal.aspx www.ijifr.com Published On: 18th April, 2016

2865

ISSN: 2347-1697

International Journal of Informative & Futuristic Research (IJIFR) Volume - 3, Issue -8, April 2016 Continuous 32nd Edition, Page No.:2865-2873 At the instrumentation level the network is based on the CAN protocol. CAN, or Controller Area Network, is an open network standard that was first used in automotive industry, but nowadays is accepted and used in a wide range of areas, such as industrial automation, building automation, agricultural machinery, among others[2][3]. This paper implements data communication based on CAN protocol by using microcontroller. The devices that are connected by a CAN network are typically sensors and control devices. A CAN message never reaches these devices directly, but instead a host processor and a CAN controller are needed between these devices and the bus. If the bus is free, any node may begin to transmit. If two or more nodes begin sending messages at the same time, the message with the more dominant ID (which has more dominant bits, i.e., bit 0) will overwrite other nodes' less dominant IDs, so that eventually (after this arbitration on the ID) only the dominant message remains and is received by all nodes. Bit rates up to 1 Mbit/s are possible at network lengths below 40 m. Decreasing the bit rate allows longer network distances (e.g. 125 Kbit/s at 500 m). In modern industrial production, monitoring of various parameters is necessary, which reflects the running status of equipment and changes of many physical characteristics. By monitoring these parameters staff and workers can make the right judgments and operation to ensure the most effective and economical industrial production.[4]][5].The CAN data link layer protocol is standardized in ISO 11898. This standard describes mainly the data link layer composed of the logical link control (LLC) sub layer and the media access control (MAC) sub layer and some aspects of the physical layer of the OSI reference model. All the other protocol layers are the network designer's choice. The industrial control system deals with all the above-mentioned problems and can effectively control them and letting the industry be in safe mode. 2. CAN CAN or Controller Area Network is an advanced serial bus system that efficiently supports distributed control systems. It was initially developed for the use in motor vehicles by Robert Bosch GmbH, Germany, in the late 1980s, also holding the CAN license. It is a multi-master, message broadcast system that specifies a maximum signalling rate of 1 megabit per second (bps). CAN is internationally standardized by the International Standardization Organization (ISO) and the Society of Automotive Engineers (SAE).The CAN protocol uses the Data Link Layer and the Physical Layer in the ISO - OSI model. There are also a number of higher level protocols available for CAN.CAN is most widely used in the automotive and industrial market segments. Typical applications for CAN are motor vehicles, utility vehicles, and industrial automation. Other applications for CAN are trains, medical equipment, building automation, household appliances and office automation. Due to the high volume production in the automotive and industrial markets, low cost protocol devices are available.

D. G. Chougule, Kunal D. Patil :: CAN Protocol Based Industrial Parameter Monitoring System Using ARM

2866

ISSN: 2347-1697

International Journal of Informative & Futuristic Research (IJIFR) Volume - 3, Issue -8, April 2016 Continuous 32nd Edition, Page No.:2865-2873 2.1 The CAN Standard CAN is an International Standardization Organization (ISO) defined serial communications bus originally developed for the automotive industry to replace the complex wiring harness with a two-wire bus. The specification calls for high immunity to electrical interference and the ability to self-diagnose and repair data errors. These features have led to CAN’s popularity in a variety of industries including building automation, medical, and manufacturing. The CAN communications protocol, ISO-11898: 2003, describes how information is passed between devices on a network and conforms to the Open Systems Interconnection (OSI) model that is defined in terms of layers. Actual communication between devices connected by the physical medium is defined by the physical layer of the model. The ISO 11898 architecture defines the lowest two layers of the seven layer OSI/ISO model as the data-link layer and physical layer in Figure 1 In Figure 1, the application layer establishes the communication link to an upper-level application specific protocol such as the vendor-independent CAN open protocol. This protocol is supported by the international users and manufacturers group, CAN in Automation (CiA). Many protocols are dedicated to particular applications like industrial automation, diesel engines, or aviation.

Figure1. The Layered ISO 11898 Standard Architecture

2.2 Standard CAN or Extended CAN The CAN communication protocol is a carrier-sense, multiple-access protocol with collision detection and arbitration on message priority (CSMA/CD+AMP). CSMA means that each node on a bus must wait for a prescribed period of inactivity before attempting to send a message. CD+AMP mean that collisions are resolved through a bit-wise arbitration, based on a pre-programmed priority of each message in the identifier field of a message. The higher priority identifier always wins bus access. That is, the last logic-high in the identifier keeps on transmitting because it is the highest priority. Since every node on a bus takes part in writing every bit "as it is being written," an arbitrating node knows if it

D. G. Chougule, Kunal D. Patil :: CAN Protocol Based Industrial Parameter Monitoring System Using ARM

2867

ISSN: 2347-1697

International Journal of Informative & Futuristic Research (IJIFR) Volume - 3, Issue -8, April 2016 Continuous 32nd Edition, Page No.:2865-2873 placed the logic-high bit on the bus. The ISO-11898:2003 Standard, with the standard 11bit identifier, provides for signalling rates from 125 kbps to 1 Mbps. The standard was later amended with the “extended” 29-bit identifier. The standard 11-bit identifier field in Figure 2 provides for 211, or 2048 different message identifiers, whereas the extended 29bit identifier in Figure 3 provides for 229, or 537 million identifiers. 2.3 The Bit Fields of Standard CAN and Extended CAN 2.3.1Standard CAN

Figure 2: Standard CAN: 11-Bit Identifier

The meaning of the bit fields of Figure 2 are: SOF–The single dominant start of frame (SOF) bit marks the start of a message, and is used to synchronize the nodes on a bus after being idle. Identifier-The Standard CAN 11-bit identifier establishes the priority of the message. The lower the binary value, the higher its priority. RTR–The single remote transmission request (RTR) bit is dominant when information is required from another node. All nodes receive the request, but the identifier determines the specified node. The responding data is also received by all nodes and used by any node interested. In this way, all data being used in a system is uniform. IDE–A dominant single identifier extension (IDE) bit means that a standard CAN identifier with no extension is being transmitted. r0– Reserved bit (for possible use by future standard amendment). DLC–The 4-bit data length code (DLC) contains the number of bytes of data being transmitted. Data–Up to 64 bits of application data may be transmitted. CRC–The 16-bit (15 bits plus delimiter) cyclic redundancy check (CRC) contains the checksum (number of bits transmitted) of the preceding application data for error detection. ACK–Every node receiving an accurate message overwrites this recessive bit in the original message with a dominate bit, indicating an error-free message has been sent. Should a receiving node detect an error and leave this bit recessive, it discards the message and the sending node repeats the message after re arbitration. In this way, each node acknowledges (ACK) the integrity of its data. ACK is 2 bits, one is the acknowledgment bit and the second is a delimiter. EOF–This end-of-frame (EOF), 7-bit field marks the end of a CAN frame (message) and disables bit-stuffing, indicating a stuffing error when dominant. When 5 bits of the same

D. G. Chougule, Kunal D. Patil :: CAN Protocol Based Industrial Parameter Monitoring System Using ARM

2868

ISSN: 2347-1697

International Journal of Informative & Futuristic Research (IJIFR) Volume - 3, Issue -8, April 2016 Continuous 32nd Edition, Page No.:2865-2873 logic level occur in succession during normal operation, a bit of the opposite logic level is stuffed into the data. IFS–This 7-bit interframe space (IFS) contains the time required by the controller to move a correctly received frame to its proper position in a message buffer area. 2.3.2 Extended CAN

Figure3. Extended CAN: 29-Bit Identifier

As shown in Figure 3, the Extended CAN message is the same as the Standard message with the addition of: SRR–The substitute remote request (SRR) bit replaces the RTR bit in the standard message location as a placeholder in the extended format. IDE–A recessive bit in the identifier extension (IDE) indicates that more identifier bits follow. The 18-bit extension follows IDE. r1– Following the RTR and r0 bits, an additional reserve bit has been included ahead of the DLC bit. 2.4 The CAN Bus The data link and physical signalling layers of Figure 1, which are normally transparent to a system operator, are included in any controller that implements the CAN protocol, such as TI's TMS320LF2812 3.3-V DSP with integrated CAN controller. Connection to the physical medium is then implemented through a line transceiver such as TI's SN65HVD230 3.3-V CAN transceiver to form a system node as shown in Figure 4.

Figure 4: Details of a CAN Bus

D. G. Chougule, Kunal D. Patil :: CAN Protocol Based Industrial Parameter Monitoring System Using ARM

2869

ISSN: 2347-1697

International Journal of Informative & Futuristic Research (IJIFR) Volume - 3, Issue -8, April 2016 Continuous 32nd Edition, Page No.:2865-2873 3. ARCHITECTURE OF THE NETWORK BASED SYSTEM

In this proposed system the sensors for various parameters in industry sense it and give data to microcontroller. The microcontroller gives data to the CAN transceiver. CAN transceiver transmit as well as receives data to and from the microcontroller? It displays the data by using the LCD and data will be send to the PC or monitor control unit. This proposed system basically consists of: I. CAN driver IC mcp2551, This CAN IC is interfaced with the microcontroller CAN support pins i.e. CAN-TX and CAN-RX. The MCP2551 is a high-speed CAN, faulttolerant device that serves as the interface between a CAN protocol controller and the physical bus. II. Following Sensors will be interfaced to the microcontroller to sense the parameters in industry.  Temperature, light, liquid level in a tank, fire, gas, humidity, vibrations.  Level sensor is calibrated to the liquid available in a tank. Level Sensor is a float-type liquid level Sensor, used to sense the liquid level in your storage tank.  Fire sensor is used to detect the fire if any.  Gas sensor we will use MQ-6, which has lower conductivity in clean air. When the target combustible gas exist, the sensor’s conductivity is higher along with the gas concentration rising.  Humidity sensor is an analog sensor and gives the output into form of analog signal. This signal is feed to ADC which will convert it into digital form. Once converted into digital form, the microcontroller can process the digital humidity signal as per the application. This sensor gives the value of change in humidity in the atmosphere as per the application.  An accelerometer is an electromechanical device that will measure acceleration forces. These forces may be static, like the constant force of gravity pulling at your feet, or they could be dynamic - caused by moving or vibrating the accelerometer. By measuring the amount of static acceleration due to gravity, we can find out the angle the device is tilted with respect to the earth. By sensing the amount of dynamic acceleration, we can analyze the way the device is moving.  Keypad is basically used to provide the input to the microcontroller.  LCD is used to visualize the output of the application. LCD can also use to check the output of different modules interfaced with the microcontroller. Thus LCD plays a vital role to see the output and to debug the system module wise in case of system failure in order to rectify the problem.  Buzzers are used in a system to indicate or to grab the attention regarding an emergency situation occurrence III. RS 232 is a serial communication cable used in the system. Here, the RS 232 provides the serial communication between the microcontroller and the outside world such as display, PC or Mobile etc. So it is a media used to communicate between microcontrollers and the PC. The RS232 serves the function to transfer the edited notice

D. G. Chougule, Kunal D. Patil :: CAN Protocol Based Industrial Parameter Monitoring System Using ARM

2870

ISSN: 2347-1697

International Journal of Informative & Futuristic Research (IJIFR) Volume - 3, Issue -8, April 2016 Continuous 32nd Edition, Page No.:2865-2873 (or data) from PC (VB software) to the microcontroller, for the further operation of the system. Block diagram: TEMP sensor LIGHT Sensor

MICROCONTROLLER

Relay MICROCONTROLLER

Fire Sensor

Accelerome ter sensor (for vibration Level sensor

GAS Sensor POWER SUPPLY POWER SUPPLY

MCP 2551

MCP 2551

MCP 2551

BUZZER LCD DISPLAY

MATRIX KEYPAD MICROCONTROLLER Humidity sensor POWER SUPPLY

PC (visual basic)

DEDICATED MOBILE

Figure 5: Block Diagram of the system 4. OBTAINED RESULTS

The measured values for various sensors at various locations in industry, where the CAN nodes were located, were acquired and transmitted from a node to the other through the CAN bus and transferred by the serial interface to the PC and visualizes with aid of the

D. G. Chougule, Kunal D. Patil :: CAN Protocol Based Industrial Parameter Monitoring System Using ARM

2871

ISSN: 2347-1697

International Journal of Informative & Futuristic Research (IJIFR) Volume - 3, Issue -8, April 2016 Continuous 32nd Edition, Page No.:2865-2873 application (visual basic). The same data will be sent to the mobile also through GSM. When the CAN is implemented in a room which consist numbers of sensors tapped on to the bus at various distances which is far away from the master. Some observations are carried out which as follows: i.) The data from those sensors which is far away from master will not come. For those sensors we have to decrease the bit rate for the data transmission to and from master. ii.) For the typical transmission speeds of each sensor the corresponding bus lengths differ by one another which formulated in table as follows: Table 1: Sensors and corresponding bus lengths

Sensor Sensor 1 Sensor 2 Sensor 3 Sensor 4 Sensor 5 Sensor 6 Sensor 7

Bus Length 25m 32m 37m 42m 47m 51m 55m

Figure 6: Snapshot of industrial automation application of PC

D. G. Chougule, Kunal D. Patil :: CAN Protocol Based Industrial Parameter Monitoring System Using ARM

2872

ISSN: 2347-1697

International Journal of Informative & Futuristic Research (IJIFR) Volume - 3, Issue -8, April 2016 Continuous 32nd Edition, Page No.:2865-2873

Figure 7: Snapshot of SMS sent to mobile

The measured values for different sensors in the different locations are transferred by serial interface to the PC and visualized with the application as shown in the figure 6 and the same SMS of the data is given to mobile also which is shown in figure 7. 5. CONCLUSION Because of the characteristics offered by the CAN communication protocol, the projected system has offered good conditions so that smart subsystems have communicated at various locations in industry. The communication among the nodes and between CAN controller and the microcontroller was quite efficient and robust, by providing reliability on the information in industry level. 6. REFERENCES [1] Prof.D.G.Chougule,Mr.Kunal D.Patil,”Network Architecture for SCADA Implementation”,International Journal of Advanced Research in Computer and Communication Engineering ,Vol.5,Issue 3,March 2016. [2] Jadsonlee da Silva Sa, Jaidilson Jo da Silva, Miguel GonçalvesWanzeller and José Sérgioda Rocha Neto ,‘‘Monitoring of Temperature Using Smart Sensors Based on CAN Architecture’’ Proceedings of the 15th International Conference on Electronics, Communications and Computers, (CONIELECOMP 2005), 0-7695-2283-1/05,pp. © 2005 IEEE. [3] Minu A PillaiSrideviVeerasingam and YaswanthSaiD ,‘‘CAN Based Smart Sensor Network for Indoor Air Quality Monitoring’’ ,978-1-4244-5540-9/10/,pp.456-460, 2010 IEEE [4] W. S. Song, S. H. Hong, and K.D. Song, “Performance analysis of BACnet-based fire detection/monitoring system in the high rise building”, Journal of the Architectural Institute of Korea , vol.18,no.1,pp.171-178,2002. [5] K.S.Lee,K.C,Lee,S.Lee,K.T.Oh, and S.M.Beak,”Network Configuration Technique for Home Appliances based on LnCP “, IEEE Trans.Consum.Electron.,vol.49,no.2, pp.367-374,2003.

D. G. Chougule, Kunal D. Patil :: CAN Protocol Based Industrial Parameter Monitoring System Using ARM

2873

Lihat lebih banyak...

Comentários

Copyright © 2017 DADOSPDF Inc.