A "simple" explanation of CAN bus.

Nic7320

Solera 24S on a 2011 NCV3 chassis
This video is a watered-down explanation of how CAN bus networks operate. Dave is a former Microsoft software engineer, so expect some technical jargon, but this is his attempt to make it more understandable by leaving out some less-important detail.

 
Last edited:

Nic7320

Solera 24S on a 2011 NCV3 chassis
One thing he doesn't talk about is CAN has two signal wires, but it also requires a signal ground. The signal ground is not the return path for the signal; it is necessary to keep the voltages on the two signal wires between the power supply (the receiver's internal power rail) and ground.

So CAN bus uses a signal ground to tie the transmitter and receiver grounds together, and that helps keep both signals plus any noise reside within this window [+V to signal ground] of allowable voltage swings.
 
Last edited:

Maslin

I've worked on a few vans
TLDW

I’d love to see a 5 min video giving the cliff notes understanding.
Ok 10 min tops.


~2.3V CAN low key on
~2.8V CAN high key on
~60 ohms resistance CAN high to CAN low key off

60 ohms is actually 30 ohms to ground on each side, that's the ground discussed above. Those are called termination resistors.

CAN blocks are generally easy to access and pull off individual connectors. Modules can be gateways (connecting multiple CAN networks), pass-throughs (just a place the wire happens to go), or CAN blocks themselves (SAM usually). All high speed CAN on anything Mercedes even remotely modern, there's FlexRay on the 907 chassis as well.

You will fix 99.9% of CAN issues with voltage and resistance. Getting into packets and stuff is beyond in the weeds.
 

calbiker

Well-known member
He could have left out the complexities of Ethernet. If you jump to @3:00, you don't miss anything.
I enjoyed the comparison. All those logic chips are now combined in one high density chip. So simple, just a ESP32 controller and a transceiver like SN65HVD230. Mind boggling how simple a complex operation got.

All those chips to this.
 
Last edited:

amigob

2010 H2L2 Sprinter CDI313 4x4, EU
So will a can shield with an MCP2515 work in a SPrinter. The brown canbus wires, in NVC3 ( right hand side the terminal block.
I tried multiple times. with only reading the bus, but after 10 min or it creates bus error, and a Christmas tree on the dash
I only try to read the the steering wheel buttons, and convert them to resistor values. So everything seems to work, but that doesn't last long.
 

marklg

Well-known member
So will a can shield with an MCP2515 work in a SPrinter. The brown canbus wires, in NVC3 ( right hand side the terminal block.
I tried multiple times. with only reading the bus, but after 10 min or it creates bus error, and a Christmas tree on the dash
I only try to read the the steering wheel buttons, and convert them to resistor values. So everything seems to work, but that doesn't last long.
What does your wiring connection look like. As @Maslin talked about, and my experience with any busses, wiring is critical. CAN is designed to work best on a shielded twisted pair, snaking past all nodes with the smallest stubs possible with a termination on each end. If you add a stub in the middle, you create reflections, which can create bus errors. Think RF, not DC.

8933.png In fact, I invented a different bus with high speed signaling. Even an inch long stub to a node can be a problem. For CAN, it may be several inches before it's a problem, but adding feet of cable, connected in the middle with poor twisting or none at all is bad.

8934.jpg

In addition, bus disturbances cause errors, become more common with worse wiring. It follows what is known as a hockey stick curve. At some point, making it only slightly worse hits the end of the blade and heads up the shaft, going bad fast.

Regards ,

Mark
 
Last edited:

Mr. Bills

Raconteur Emeritus
I saw the thread title, "Simple Explanation of CAN Bus" and immediately thought of my explanation- "If it's CAN bus, I can't work on it."

My knowledge of electricity is limited to what I needed to know as a child to set up an electric train.
 

calbiker

Well-known member
CAN is designed to work best on a shielded twisted pair, snaking past all nodes with the smallest stubs possible with a termination on each end. If you add a stub in the middle, you create reflections, which can create bus errors. Think RF, not DC.

Regards ,

Mark

You missed the important part. For signal integrity, the cable needs to have 120 ohm impedance. That takes me back to school and Smith charts.
 

calbiker

Well-known member
The cable itself? CAN wires are just wire, 0 ohms resistance.
The cable may have less than one ohm resistance, but it must have 120 ohm impedance. Resistance is a dc value, while 120 ohm impedance is the "resistance" at high frequencies like 500 kHz. Data packets travels on the buss at those frequencies.
 

marklg

Well-known member
You missed the important part. For signal integrity, the cable needs to have 120 ohm impedance. That takes me back to school and Smith charts.

The cable itself? CAN wires are just wire, 0 ohms resistance.
I didn't mention that , yes the cable characteristic impedance is critical. It's RF, forgot what you know about DC resistance.


I've designed bus interfaces down to the circuit board level. I own a vector network analyzer.


Regards

Mark
 

Nic7320

Solera 24S on a 2011 NCV3 chassis
The cable itself? CAN wires are just wire, 0 ohms resistance.
A quick lesson about cable impedance.

Cable impedance is the result of a cable's distributed capacitance along the cable and its distributed inductance along each conductor canceling each other out at AC frequencies. These are both AC phenomena and the resulting relationship is simply a measure of Volts to Amps, so cable impedance is measured in ohms.

The inductance and capacitive reactances are related to the conductor size and the distance they are from the return path (e.g. a wire conductor, cable shield or a ground plane). This is a property measured at AC frequencies that doesn't show up on a standard (DC) ohmmeter.

If cables didn't exhibit an AC resistance at each end, no transmitter could send a signal very far down a long cable. It would act like a large capacitance and little or nothing would go through. But since it acts like a resistance, it allows power to be transmitted to a load (or antenna) that closely matches the cable impedance.

DC resistance is different, since AC capacitance and inductance effects are not measured. Any transient behavior because of those effects has decayed away, and that is what your ohmmeter measures.

Interestingly, 50 ohm coax cable is a compromise. Minimum signal losses occur around 77 ohms, so cable TV uses 75 ohm coax cable. Maximum power transfer occurs around 43 ohms, and transmitters usually use 50 ohms, which gives reasonable transmission loss while still moving lots of power to the load. Why we ever used 300 ohm twinlead on TV antennas up to the 1970's is a mystery, but likely due to the antenna and impedance of free space.

CANBUS is 120 ohms, largely due to the wire size they decided on. They're not transmitting lots of power and not going very far, so this becomes more of a cost driven decision.

And don't worry, the test on this will be open book.
 
Last edited:

amigob

2010 H2L2 Sprinter CDI313 4x4, EU
No de device don't need to be terminated at 120 ohm. You can only have 2, 120 ohm end connections like it is in your picture Mark The orange blobs on the end of the cable. Adding another 120 ohm , will make the bus having an impedance of 40ohm and that is not what it should be, and most likely not work. The impedance must be 60 ohm as mentioned on the board in the video at 8.44.
I connect my device, at the terminal on the passenger side it is a strip of canbus connections for can bus hosts.

Like in this Mercedes ( how the 2 120 ohm Resitores are implement here I don't know
img_20200328_115419968_1a9a66fed9f68d0888a2a866c3776a2bdc1d8c4a.jpg


Why I ask about the MCP2515 in combination with MCP255 is because Calbiker explicitly chosen SN65HVD230 for his design
 

Maslin

I've worked on a few vans
A quick lesson about cable impedance.

Cable impedance is the result of a cable's distributed capacitance along the cable and its distributed inductance along the conductor canceling each other out. These are both AC phenomena and the resulting relationship of Volts to Amps is measured in ohms.

The inductance and capacitive reactances are related to the conductor size and the distance they are from the return path (e.g. a wire conductor, cable shield or a ground plane). This is a property measured at AC frequencies that doesn't show up on a standard (DC) ohmmeter.

If cables didn't exhibit an AC resistance at either end, no transmitter could send a signal very far down a long cable. It would act like a large capacitance and little or nothing would go through. But since it acts like a resistance, it allows power to be transmitted to a load (or antenna) that closely matches the cable impedance.

DC resistance is different, since AC capacitance and inductance effects are not measured. Any transient behavior because of those effects has decayed away, and that is what your ohmmeter measures.

Interestingly, 50 ohm cable is a compromise. Minimum signal losses occur around 77 ohms, so cable TV uses 75 ohm cable. Maximum power transfer occurs around 43 ohms, and transmitters usually use 50 ohms, which gives reasonable transmission loss while still moving lots of power to the load. Why we ever used 300 ohm twinlead on TV antennas up to the 1970's is a mystery.

CANBUS is 120 ohms, largely due to the wire size they decided on. They're not transmitting lots of power and not going very far, so this becomes more of a cost driven decision.

And don't worry, the test on this will be open book.


Several friends are EE's for major automotive brands and other fancy places. I'll ask them to explain :ROFLMAO:

This is Ben. I helped with his Eagle Scout project mapping radio towers 25 years ago.

 

Top Bottom