CAN-FD: The Second Chapter to CAN Bus Networks
2024-08-28 | By Will Siffer
Some Background!
Maybe you just finished reading this great tutorial from the Maker.io staff about the CAN bus and were wondering what came after. Or maybe you found yourself preparing for an internship with a company that uses CAN FD in their day-to-day work. Either way, this guide will expose you to the similarities, differences, and use cases of CAN FD: CAN with Flexible Data.
What exactly is CAN FD?
Since you may already be exposed to what a CAN bus is, I will jump right into the meat of CAN FD (if not, read the article from the link here!)
There are many similarities between the CAN bus and CAN FD. CAN FD is still a Controller Area Network, and understanding their similarities will help build a solid foundation for the later parts of this blog. One of the main similarities is that they both use "arbitration" to determine which controller gets to send data on the network. As you learned in the previous introduction to CAN, each controller has a unique ID that leads on the bus before any data occurs. This allows for more critical messages to have priority on the bus over less important messages. A great example of this is in the car you drive; you would want any messages from the airbag controller to be transmitted to the other car computers before your HVAC system tells the computers that the ambient temperature outside is 65 degrees.
As you can see in the image above from NXP Community, device B's signal goes high while A's stays low. This signifies on the bus that device A has higher priority. In practice, since A pulls the bus low, B is unable to pull high. Device B will recognize that the bus is not at the state it attempted and terminate its transmission.
Another similarity between CAN and CAN FD is that their physical layers remain largely the same. As long as the controller's CAN transceiver is capable of CAN FD speeds, they both use the same hardware. This includes the twisted single pair of wires for CAN High and CAN Low, terminating resistors on the bus to make a resistance of 60 Ohms, and all modules are (for the most part) connected on the same bus*.
Tell me what I came here for! How is CAN FD different?
The thing is, if you just speed up a CAN bus to be as fast as CAN FD, you may lose the key arbitration necessary to keep everything running properly. How fast is CAN FD? Sometimes, the data rates are up to 5 times faster! Typical CAN runs at about 1MBit/s or less, and the fastest CAN FD data transmission can get as fast as 5MBit/s! The biggest key difference between CAN and CAN FD is the option for the data bitrate to be different than the message introduction. Sometimes, a controller may not need to pack extra data into a message, so it will be configured not to speed up the data transmission. The key here is all about efficiency, allowing for longer messages to take a shorter time and thus reducing the delay of the next message that could be safety critical.
As you see in the photo above, CAN FD isn't always faster. However, since it is allowed to transmit more data, it's gaining traction and popularity as more devices are getting smarter and require more data to be sent between controllers. Classic CAN would work, but it would be too slow or maybe even unusable in some applications! More data in a message means that the new car customers can have more features, and those features can be more integrated between vehicle systems.
Another key difference with CAN FD is the Cyclic Redundancy Check (CRC) is modified to improve communication reliability. With CAN FD, there are always 4 stuff bits between the CRC and the data, which allows for more consistency and improved reliability of the CRC and data transmission.
Why implement this new technology? Isn't it expensive to change an architecture?
Hopefully, you can answer that first question after reading the paragraphs above, but to put it simply, the average CAN FD bus can improve network bandwidth and increase efficiency. If you are interested in playing with CAN FD data, you can use this calculator here from CSS Electronics. It is a great illustrator for understanding just how much more efficient CAN FD can be.
Expensive? No! This is why it has such a high adoption rate in automotive and industrial applications. Because the physical layer is so similar, it can actually coexist within a vehicle or device that has a classic CAN. This means that legacy devices can still communicate with FD devices, and the newer FD devices can be configured to translate FD messages to a classical CAN bus.
There is so much more to learn about CAN and CAN FD, but this guide was just a great way for me to learn more about the topic and share what I learned in a more digestible format with you. If you learned something, give some of my other blogs a read. I post everything from 3D printing to motor control to even LoRa radio communication, so I am sure you will find something else interesting! Until next time, I hope you challenge yourself every day to learn something new.
*in 2024, as of writing this guide, some OEMs use more of a "Daisy Chain" approach. This means that each module is only ever connected to two other modules, creating a long chain of computers that pass information off between them. This allows for only pertinent messages to be sent to controllers that actually need them.
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.
Visit TechForum