Industrial Automation and Control using CAN Protocol

Industrial Automation and Control
Industrial Automation and Control

Nowadays industrial automation systems have become popular in many of the industries and play a crucial role in controlling several process-related operations. Due to the implementation of a wide variety of industrial networks with their geographical distribution over factory or industry, the floor data transferring and controlling capability has become more sophisticated and easy ranging from low-level to high-level control. These industrial networks are routed through various field buses that use various communication standards like CAN protocol, Profibus, Modbus, Device net, etc. So let us look on how CAN communication works for automating the industries and other automation based systems.


Introduction to Industrial Automation and Control

The below figure shows the architecture of industrial automation and control wherein three levels of control is performed to automate the whole system. These three levels are control and automation, process control, and higher-order control. The Control and Automation level consists of various field devices like sensors and actuators to monitor and control the process variables.

Industrial Automation Architecture
Industrial Automation Architecture

Process Control Level is a central controller responsible for controlling and maintaining several controlling devices like Programmable Logic Controllers (PLCs), and also the User Graphical Interfaces like SCADA and Human Machine Interface (HMI) are also included in this level. The Higher Order Control Level is an enterprise level that manages all business related operations.

By closely observing the above diagram and its each and every level and also in-between levels, the communication buses such as Profibus and industrial Ethernet are seen as connected to exchange the information. Therefore, the communication bus is the major component in industrial automation for reliable transfer of data among the controllers, computers and also from the field devices.

Control Area Network or CAN Protocol

Open Systems Interconnection (OSI) model
Open Systems Interconnection (OSI) model

Data communication is the transfer of data from one point to another. To support industrial communication, International Organization for Standardization has developed Open Systems Interconnection (OSI) model for providing data transfer between various nodes. This OSI protocol and framework depends on the manufacturer. The CAN protocol uses lower two layers i.e., physical and data link layers out of the seven layers of the OSI model.

A Controller Area Network, or CAN protocol is a multi-master serial communication bus, and it is a network of independent controllers. The current version of CAN has been in usage since 1990, and it was developed by Bosch and Intel. It broadcasts messages to the nodes presented in a network by offering a transmission speed ranging up to 1 Mbps. For an effective transmission, it follows reliable error-detection methods – and, for arbitration on message priority and collision detection, it uses carrier sense multiple access protocol. Due to these reliable data transfer characteristics, this protocol has been in use in buses, cars and other automobile systems, factory and industrial automation, mining applications, etc.

CAN Data Transmission

CAN protocol is not an address-based protocol, but message-oriented protocol, wherein the embedded message in CAN has the contents and priority of data being transferred. Up on the reception of data on the bus, each node decides whether to discard or to process the data – and then depending on the system, the network message is destined to single node or many other nodes. CAN communication allows a particular node to request the information from any other node by sending RTR (Remote Transmit Request).

CAN Protocol Data Transmission
CAN Protocol Data Transmission

It offers automatic arbitration-free transmission of data by transferring the highest-priority message and backing and waiting the lower-priority message. In this protocol, the dominant is a logical 0, and the recessive is a logical 1. When one node transmits a recessive bit and another one transmits a dominate bit, then the dominant bit wins. A priority-based arbitration scheme decides whether permission will be granted to continue transmission if two or more devices start transmitting at the same time.

CAN Message Frame

A CAN communication network can be configured different frame or message formats.

  1. Standard or Base Frame Format or CAN 2.0 A
  2. Extended Frame Format or CAN 2.0 B
Standard or Base Frame Format or CAN 2.0 A
Standard or Base Frame Format or CAN 2.0 A

The difference between these two formats is that the length of bits, i.e., the base frame supports 11-bits length for the identifier, whereas the extended frame supports 29-bits length for the identifier, which is made up of 18-bit extension and an 11-bit identifier. The IDE bit differs CAN extended frame format and the CAN base frame format wherein IDE is transmitted as dominant in an11-bit frame case and recessive in a 29-bit frame case. It is also possible to send or receive messages in base frame format by some CAN controllers that support extended-frame formats.

Extended Frame Format or CAN 2.0 B
Extended Frame Format or CAN 2.0 B

CAN protocol has four types of frames: data frame, remote frame, error frame and overload frame. Data frame contains transmission node data; remote frame requests specific identifier transmission; error frame detects any node errors; and, overload frame activates when the system injects delay between data or remote frame. CAN communication can link upto 2032 devices on a single network theoretically, but practically it is limited to 110 nodes due to the hardware transceivers. It supports cabling up to 250 meters with the baud rate of 250 Kbps; with a bit rate of 10 Kbps is the maximum length of 1 km, and the shortest with 1 Mbps being 40 meters.

Industrial Automation and Control using CAN Protocol

This project is implemented to control the industrial loads that are run by DC motor based on the temperature variations of the process. Various process control systems are depends on the temperature. Suppose, in case of a stirrer tank – after reaching a certain temperature – the DC motor must be turned on to rotate the stirrer. So this project achieves this with the use of CAN protocol which is highly efficient and reliable low-cost communication.

Two microcontrollers are used in this project, one for acquiring temperature data and the other for controlling the DC motor. CAN Controller MCP2515 and CAN transceiver MCP2551 are connected to both microcontrollers to implement CAN communication for exchanging the data.

Industrial Automation and Control using CAN Protocol
Industrial Automation and Control using CAN Protocol

Transmitting side microcontroller continuously monitors the temperatures with the use of LM35 temperature sensor by converting analog values to digital with ADC attached to it. These values are compared with the set values programmed in the microcontroller, and these values are violated when the microcontroller sends or transmits the data to the receiver side microcontroller by CAN controller and transceiver units.

The receiving side CAN communication receives the data and transfers it to the microcontroller that further processes the data and controls the DC motor by a motor-driver IC. It is also possible to change the direction of the motor with the driver IC controlled by the microcontroller.

Thus the CAN protocol enables the peer-to-peer communication by connecting different nodes in industrial environment. This type of communication can also be implemented in other automation systems like home or building, factory, etc. We hope that this article might have given you a better understanding on industrial automation with CAN communication. Please write to us for further information and queries.

Photo Credits:

  • Industrial Automation and Control by wlimg
  • Industrial Automation Architecture by siemens
  • Open Systems Interconnection (OSI) model by eet
  • CAN Protocol Data Transmission by can-cia
  • Standard or Base Frame Format or CAN 2.0 A by technologyuk
  • Extended Frame Format or CAN 2.0 B by bredband