As a result of greater bandwidth necessities within the automotive subject, the CAN (controller space networking) specification was prolonged for versatile information–charges with a brand new iteration often known as CAN FD.
CAN provides benefits equivalent to value, flexibility, and robustness, all of that are very useful to non–automotive functions in lots of fields. The market alternatives are even wider with the CAN FD extension. This text covers the basics of CAN and CAN FD and the totally different software implementations utilizing various bodily layers or greater layer protocols with CAN as the info hyperlink layer.
First, let’s contact on some great benefits of CAN over customary serial communication equivalent to RS232 or RS485. As a result of CAN’s greater communication pace with error detection, it provides wonderful robustness and decrease value.
Price and adaptability
A very powerful driver for the automobile business was to scale back the quantity of wiring within the automobile. As a result of twisted pair wiring, it’s comparatively simple to put the wire, and it’s much less heavy and costly. The termination resistors are essential to run CAN and CAN FD at greater speeds. The pliability is a good plus, as it is rather simple to increase the system with extra nodes.
Error detection and robustness
CAN and CAN FD incorporate very dependable error test mechanisms. Bit stuffing and monitoring work on layer one, whereas body test, acknowledgement, and cyclic redundancy test operate on layer two of the OSI mannequin.
Bit stuffing provides an alternating bit after 5 consecutive excessive or low bits. Six consecutive bits with the identical stage point out an error. Bit monitoring reads again each message that’s despatched. If there’s a distinction (besides within the arbitration or acknowledgement subject), an error is detected. An enormous benefit is that errors are detected in a really well timed method.
Cyclic redundancy checks are applied in another way on CAN versus CAN FD due to the totally different information lengths. Body errors (typically additionally referred to as format or kind errors) use predefined values which have to be the identical on the receiver aspect. Every message must be acknowledged. This three error test mechanism works properly on the message stage.
In abstract, CAN and CAN FD are very strong and dependable with a number of totally different error checks. No information is misplaced throughout the transmission of a message and message collisions are prevented. Every node waits for a interval of inactivity earlier than sending. In case two, messages are despatched on the identical time, the transmitter detects which message has a better precedence, and disables the message with decrease precedence. In comparison with Ethernet the place each messages are stopped and despatched later, on CAN the message with the very best precedence comes by way of.
Excessive–pace and low latency
CAN helps information charges as much as 1Mbps. With CAN FD the info charge may be elevated for the management and information space relying on the utmost clock of the CAN FD controller. The speed for the arbitration part stays at most 1Mbps.
The latency for CAN is lower than 145us whereas for CAN FD with 8Msps and 8Byte information, it’s lower than 58us.
Brief information frames have a bonus when it comes to latency. The whole bundle is transferred and decoded quicker and subsequently the response time can also be quicker. With greater transmission charges on CAN FD, this impact is even higher. In contrast with TCP/IP communication, which is designed for great amount of knowledge, the packages are comparatively massive and subsequently latency will increase. Which means CAN FD, relying on the quantity of knowledge, doubtlessly has shorter response occasions in comparison with TCP/IP communication with 10 or 100Mbit, and reveals higher whole actual–time efficiency.
Concerning the variety of nodes, there’s theoretically no restrict as every message may be despatched to a distinct node. In observe, every node causes sign reflections on the bus and transmission high quality depends on the CAN transceiver and the implementation on the bodily layer.
That is additionally the explanation for limitation when it comes to pace relating to lengthy distance. Normal values are at most 25 nodes on CAN and at most 8 nodes on CAN FD.
Utility examples outdoors of automotive
Why use CAN FD outdoors of automotive functions? Due to the nice benefits described above. CAN and CAN FD are extensively used throughout industries together with:
- Constructing Automation
- Elevator and elevate
- Entry management, gentle management, and safe door opener
- Automotive aftermarket
- Fleet monitoring, automobile monitoring
- Logging for predictive upkeep, telematics, insurance coverage, and blackbox
- Medical and healthcare tools
- Industrial drives
- Between host and chained actuators
An amazing use case of MCUs with two CAN FD controller items together with TrustZone and Safety is a management unit in constructing automation separating safe elements from non–safe elements. One CAN FD controller can be utilized for the safe aspect to regulate essential elements equivalent to door openers, sliding doorways, and ID card readers. The second CAN FD can be utilized for non–essential management elements in constructing automation, equivalent to gentle change buttons, bulbs, and doorways inside the constructing.
One other use case for twin CAN FD items is gateway performance equivalent to in massive constructing automation methods, massive cupboards, and communication extension modules. There are lots of totally different use instances for MCUs with built-in CAN FD controllers equivalent to actuators, sensors, and management.
CAN FD could be very appropriate in functions the place excessive security and reliability are required, equivalent to in robots, lifts, and transportation methods, in addition to in medical and healthcare methods. The reliability necessities essential in automotive functions are additionally very useful in these use instances.