Is it only because of the fact that it is asynchronous and can be used for long distance message transfer. An example of where other protocols will fail would help. Thanks.
Historical reasons, for the most part. Automotive systems started using CAN because nothing else was good, and now they've all standardised on it. Having said that, CAN has one particular feature which makes it ideal for this class of applications.
CAN dates from around the same time as Ethernet (Ethernet was commercialised in 1980, CAN in 1983 IIRC), and solves the same problem: attaching a moderate number of devices to a single bus.
When two Ethernet devices want to transmit at the same time, they both back off for a random amount of time, and the time increases as the number of tries increases. Neither sender proceeds immediately. This is the famous CSMA/CD protocol.
As any network engineer knows, this has a bunch of unfortunate implications, one of which is that the effective maximum capacity of a shared Ethernet wire is around 30% of the theoretical capacity. (Obviously point-to-point full duplex Ethernet connections can get much closer, because there is no contention.)
With CAN, messages have a priority, and the priority is in the frame header. If two devices want to transmit at the same time, only the lower-priority message backs off. Not only does this increase the practical capacity of the bus, the designer gets something that's much closer to a real-time guarantee. That is valuable in the world of metal, speed, and danger.
The difference doesn't matter so much these days, since networks are much faster than they were in 1983, so even 30% utilisation is still a lot of bandwidth. But still, a near-guarantee is a near-guarantee.
A few reasons :
- CAN was developed by BOSCH, which have a lot of influence in automotive equipment (engine control, braking, body, gearbox control...). BOSCH ensured that CAN killed competitors like the VAN protocol. (CAN was patented, and BOSCH sells CAN controller IPs)
- CAN is much cheaper than Ethernet.
- There were no suitable industrial bus at the time, using physical layers like RS-485 : Modbus, Profibus...
Now several other busses are used in automotive applications :
- LIN : Slower, cheaper than CAN. For very simple devices.
- FlexRay : Faster than CAN, deterministic. For advanced real time functions like dynamic suspension.
- Ethernet : The future, particularly in a 2 wires implementation. For a few advanced applications, including steer-by-wire, video...
Anyway, CAN is here to stay as it offer a good balance between performance and cost of implementation.
I think below few are the valid reason for prefer CAN wrt other protocol.
- Cost - It has very low cost to implement 1 pair of twisted pair is fair enough.
- Asynchronous - Since its asynchronous communication.
- Arbitration/Collision avoidance - Having super control on arbitration and collision avoidance.