CAN OSI layers and voltage levels

CAN(Controller Area Network): CAN is a Automotive standard protocol. It is a serial asynchronous (In CAN the data transmission is not based on Clock (like in SPI) so CAN is asynchronous. Instead of Clock it is based on Time quanta) protocol. Bit rate is up to 1Mbps and length is up to 40m.  whenever speed is 500 kbps then length is 100m, 250kbps-200m…………up to 10kbps-6km.
If it is 1Mbps then 40m, 500Kbps-100m……………….10Kbps-6km why the reason is Due to RLC in the circuit L (Inductance) doesn’t allow sudden changes in the current and C (Capacitance) doesn’t allow the sudden changes in the voltages.
CAN is based on 3 layers Physical layer, Data link layer and Application layer. Physical layer is responsible for Bit encoding, Bit decoding and Bit transmission. Data link layer is responsible for Message transmission, reception and error handling.
In between we are bypassing these 4 layers. In between these layers in the CAN driver development process CAN_Init, CAN_read, CAN_Write API’s done.  CAN is limited up to 8 bytes data transmission. If we want to transmit more than 8 bytes then we go for the HLP(Higher layer protocols) like CANopen, Devicenet and ISO15765.
In ISO15765 we can transmit up to 4096bytes(4KB). The frame format of ISO15765 is single frame, first frame then flow control followed by consecutive frames.
The single frame can carry data up to 7bytes. If the data is more than 7 bytes the first frame can indicate the remaining data along with the carry of the some initial data. The flow control is response from the receiver acknowledging the first frame along with the indication of Block size and minimum separation time between the consecutive frames. The consecutive frame is a frame containing the subsequent data.

CAN is half duplex two wire interface. The both ends are shorted with 120ohm resistor because to oppose the signal reflection from both ends and also to match the impedance. Every CAN Transceiver is having internal resistance of 60 ohm. And the two ends are shorted with 120 ohm those 2 resistors are in parallel so ((120*120)/(120+120))=60 ohm. According to maximum power transform theorem the Source Impedance = Load Impedance.
CAN why it is 2-wire interface: for differential   voltage. CAN is two wire interface the data transmission is on 2 wires i.e., CAN_H and CAN_L. If the data is transmitting b/w two wires  some amount of noise is added in wire i.e.,CAN_H the same amount will be added on the other side with opposite.
In CAN_H the noise+ data +a
In CAN_L the noise+ data +b
The differential voltage ( +a)-( +b)= a-b
Plan data we will get that’s why CAN is 2-wire interface.

CAN physical layer voltages:

CAN dominant voltages are from 1.5v to 3.5v.
CAN recessive voltage 2.5v.

Why like this when it is in dominant 1.5-3.5 when recessive 2.5 and the 2wires are CAN_H and CAN_L are 2.5v when recessive. The reason is every CAN transceiver is having internal transistor the transistors are doesn’t allow the voltage/power transmissions when it is in recessive (i.e., 1).It allows only when dominant (i.e., 0). And the voltage difference between CAN_H and CAN_L is whenever >0.9 then only it identifies the bit transmission is dominant otherwise (i.e.,<0.9) it is recessive. 

No comments:

Post a Comment