CAN

Introduction

CAN is a differential signaling electrical communication bus that is commonly used in the automotive sector. The bus features two differential signal wires and a somewhat (more details below) optional GND connection. The standard datarate is 1mbps, commonly used at 5mbps today and can go even higher though generally automotive avoids this for EMI reasons. CAN vs CAN-FD is a firmware thing, but CAN-FD allows for higher speeds.

Opening Questions

  • What is CAN? What does it stand for?

    • Controller Area network.

    • CAN supports multiple devices on one bus, only a single device can drive the bus at one time to a dominant state and there’s an arbitration sequence for who is talking. this is handled in firmware.

  • What is a differential pair? How should differential signals be routed on a PCB? What considerations must be made?

  • What are the connections for CAN?

    • CAN_H and CAN_L

  • What do the terms recessive and dominant refer to with CAN?

    • the CAN bus has two states

  • Why is CAN considered the i2c of differential signalling?

    • CAN is an open drain protocol which means that if no device on the bus is driving it to a dominant state then the bus will get pulled into a recessive state by termination resistors. For the bus to function at least one termination is required.

    • Similarly in I2C if no device is pulling the lines low then the pullup resistors will hold the lines high.

  • What does a CAN transceiver do?

    • it converts the differential signal with possible common mode offset from GND into a single ended signal at the correct potential for an onboard microcontroller commonly drawn as CAN_RX and CAN_TX though this is not to be confused with UART.

  • What is an ECU?

    • engine control unit

    • why is this here lol Kevin you’re trolling

  • What is a stub?

    • A branch off of the tree essentially.

    • stubs cause reflections and signal integrity issues

  • Star vs daisy chain CAN topology?

    • daisy chain is better because it minimizes sub length

  • What is the maximum length of a stub typically

    • depends on datarate

  • Why do CAN buses have a terminator resistors at each end? What issue does it help minimize?

    • placing terminations at each ends minimizes reflections at the ends due to impedance mismatch!

  • What device is used to convert CAN signals into signals that can be read by microcontrollers?

    • transciever …

  • What is a CAN debugger?

  • Why d CAN debuggers commonly use dsub?

How does CAN work?

CAN is a multi-controller protocol that uses differential signalling. Any CAN node in the system is able to send and receive messages. Messages have an ID, which define what node the message is intended for.

What is differential signalling?

  • Two wires: a positive and a negative. The signals on each wire are equal in amplitude but opposite in polarity. The difference in magnitude between the wires is what is read as data.

  • Some benefits:

    • Noise immunity: Since the signals are opposite, any external noise that affects both wires equally will be canceled out when the difference between the signals is measured at the receiver. This is because the noise will be the same on both wires, and when subtracted, it effectively cancels out.

    • Signal Integrity: The differential pair is less vulnerable to EMI issues because the loop area between the two wires is so small.

    • Reduced Crosstalk: There is little opportunity for crosstalk between adjacent differential pairs because the two signals of opposite polarity cancel each other out. (add detail here)

Why use CAN?

CAN is very robust and is useful for safety critical applications where reliability is needed, such as braking systems for cars. CAN ID also serves as a priority system, allowing the most important messages to be sent first.

It is also simple electrically, requiring only two wires (a differential pair). This is largely why is useful for WARG. Having less wires reduces cost, complexity, and weight.

Has built in error checking and stuff.

CAN frame:

 

image-20240605-223820.png

[add detail]

More

@Jerry Tian @Nolan Haines @Neel Patel can we please add more to this page as we are going to CAN arch i wanna be able to bring people up on it easier.

WARG Examples