Electronic – How to distinguish different identical sensors in a CAN bus network

automotivecansensor

Knowing about CAN bus protocol, there are parts I couldn't understand entirely. Consider a car, with lots of sensors, say throttle sensor, parking sensor, temperature sensors located at different parts of the car. I know how arbitration works between them but here is the thing: how does the relevant ecu that will process the temperature distinguish the two different sensors? Is it that the two sensors -though their job is the same, to measure the temperature- have different IDs compared to each other? (btw yes I know one node can send different messages with different IDs)

So, let's say there are two exact temperature sensors, one inside the car for the air conditioner(not so important) and one located near the engine(very important) and it is broken. Can't I replace the broken one with the other one?

Best Answer

The CAN protocol doesn't carry any information in a frame other than the address of the unit sending the message. However, it provides up to 8 bytes of user defined message area. So if you wish to unambiguously transmit a temperature reading you should do so in the data message area and append that reading with source information.

CAN is a peer-to-peer protocol and doesn't necessarily carry anything outside the message area that can be relied upon for recognition of any party on the bus.