CAN Bus vs USB differential signaling

Here is an academic question regarding the differences between CAN bus and USB differential _signals_. I'm not interested in the protocol differences-- just the signaling.

CAN bus was created around 1983 and uses a differential signal alternating between V+/2 and V+ for CAN H, and V+/2 and CAN L for the other end. The recessive bit returns back to V+/2.

USB, which came later, OTOH, pulls the signal D+ low, and D- high and otherwise returns to the idle state of their respective D+/D- idle levels.

My question is about the differential signal design:

Is there an advantage to the CAN bus approach with the recessive bit at V++/2, or is the USB differential signal with its wider differential voltage better for noise immunity or other reasons?

Another way to phrase the question might be:

if CAN were to be redesigned today with the lessons learned from USB (signalling), would they have still chosen the same V+/2 idle signal that they chose to use?

Just curious, Warren

Reply to
Warren
Loading thread data ...

So, interesting question, and it goes to the heart of what makes CAN what it is.

This may no longer be the case, but when I worked with CAN (ca 2000-ish), the standard did NOT specify the physical layer -- it just said that the physical layer had to support the recessive/active bit behavior. The specific physical layer of which you speak has its own ISO or SAE standard -- but you could use other phy layers and still call it CAN.

In short, the USB differential signal that uses the full voltage swing does have more noise immunity -- but it doesn't support the wired-and connection that's central to CAN.

Moreover, there's no reason you couldn't have the recessive bit be defined as line one at 0V and line 2 at V++, with the polarity reversed for an active bit -- folks just chose not to do that, presumably to make termination easier.

RS-485 and RS-422 have been around since the 60's or 70's, and at their base use signaling similar to USB. I'm sure that the originators of CAN were fully aware of both of those. So no, I don't think CAN would have been much different if it were conceived of today.

--
Tim Wescott 
Control systems, embedded software and circuit design 
 Click to see the full signature
Reply to
Tim Wescott

On Friday, April 28, 2017 at 1:17:00 PM UTC-7, Warren wrote: ...

Don't forget that USB is point to point and CAN is multi-master with arbitration exploiting the recessive/dominant capability to determine which of two colliding transmitters has the higher address.

kevin

Reply to
kevin93

Ethernet won the bus wars!

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

On Friday, April 28, 2017 at 2:28:23 PM UTC-7, John Larkin wrote: ...

...

And Ethernet is coming to a car near you - 100Mbps (or even 1Gbps) full duplex on a single pair!

Some cars already have it for the infotainment system, I don't think any have it for engine/body control yet.

kevin

Reply to
kevin93

Who knows? Recently had our 2005 Q45 in for service and the loaner was a new Q50... piece-a-crap... jerky braking and strange engine stumble while stopped at a traffic.

By happenstance, reading a car magazine in a doctor's waiting room, it's brake-by-wire... and takes the engine out of gear when you're almost stopped, thus the jerky stop.

Also stops fuel injection for a few rotations while waiting at a light.

Very disconcerting.

All in the name of squeezing out Obama's fleet average fuel economy.

Piece-a-crap, don't lease/buy... and it's only 2 Liters :-(

(Our Q45 is 4.5 Liter... still can smoke a Mustang ;-) ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
 Click to see the full signature
Reply to
Jim Thompson

I gather you're feeling better, since you're back to bragging about your ca r. ;)

Glad to see it. Any news on the pancreas thing?

Cheers

Phil Hobbs

Reply to
pcdhobbs

Pancreatic tumor, unknown if benign/malignant... molding for form-fitting "bed" to hold me immobile during radiation to be done Tuesday, then five weeks of radiation. (I also get tattoo X's for alignment purposes >:-}

My humor is coming back along with my appetite. This has been quite a debilitating experience... I've dropped 18 pounds since March 15... now holding at 152... Thompson's weight-loss diet >:-}

Haven't weighed that little since probably age 16.

For a while there I think I had mentally thrown in the towel... then I decided I'm going to enjoy every last minute. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
 Click to see the full signature
Reply to
Jim Thompson

Presumably, they are aggressively watching your blood sugar and insulin levels?

Bummer. Hopefully they don't screw up the targeting (a friend had heart damage when they mistargetted a cancer in her chest and "caught" her heart, in the process). Annoying when you have to rely on other peoples' skillsets! :<

Getting old (infirm) is the pits. When you finally have the "wisdom", "resources", "experience", etc. to *do* stuff, your BODY gets in the way!

A friend having surgery for stomach cancer, this week. Another lost top lobe of a lung to lung cancer surgery two weeks ago. Before that, another had a hysterectomy for ovarian cancer. Before that, another with a mastectomy for breast cancer. Before that...

[Christ! You'd think something was out to KILL us!! :< ]

Best of luck!

Reply to
Don Y

Thanks! Much appreciated! ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
 Click to see the full signature
Reply to
Jim Thompson

USB doesn't support the wired and connectivity because it is really a point to point interface at the physical level. There are just two devices sharing a pair of wires to send data back and forth. This eliminates many signal integrity issues with terminations at multiple points.

I don't know much about CAN so I can't say why it is designed at the physical layer the way it is, but anytime you connect more than two devices on a single channel it is much more complicated to make work at all layers.

--

Rick C
Reply to
rickman

CAN is designed to be real time. This is done by allowing no more than eight bytes per message, and with prioritized addressing: each transmitter watches its receive line as it chunks out an address; if it sees an active bit when it's sending a recessive bit, it silently backs off. IIRC zero is active, so the lowest-numbered address wins.

So if the highest-priority message gets queued up one bit-time too late to make it out, it has a finite and short wait before it gets sent. Ditto second-highest priority message (except that the maximum wait is a bit longer), etc.

--
Tim Wescott 
Control systems, embedded software and circuit design 
 Click to see the full signature
Reply to
Tim Wescott

tYou're not likely to ever find it in the engine/body controls but it is highly likely to find its way into ADAS systems, though.

Reply to
krw

Before dedicated CAN bus transceiver chips become available, ordinary RS-485 chips were used. The transmitter input was constantly connected to the dominant state and the actual data stream connected to the Driver Enable (DE) pin.

When the dominant state is to be transmitted, the DE is activated driving the transmitter hard into the dominant state. When the recessive state is to be transmitted, the transmitter is put into high impedance tri-state. It is then up to the "fail-safe" termination to create the recessive voltage level (those quoting marks are in the original RS-422/RS485 standard text :-). Of course, the pull-up and termination resistors could drive the tri-stated bus to any voltage, such as V+/Gnd or V+/2 on both lines. Which to use,depends of the receiver switching characteristics.

One way of looking at the CAN bus _system_ is to handle it as a wired-OR gate. Each CAN device has an open collector NPN transistor with a _common_ pull-up resistor to V+. Then also each CAN derive has a PNP open collector transistor and the whole bus has a shared collector resistor to Gnd. The wired-OR action on both (positive and negative) lines eliminates the risk of physically damaging the devices during a collision.

Connecting the open collector common pull up resistors to some other voltage can be used to limit the voltage swing. Since a twisted pair cable impedance is around 100 ohms, the termination resistor should be the same, Limiting the signal voltage swing will also limit the signal current through the termination resistor and hence reduce the total power dissipation. This is the case e.g. with LVDS.

Reply to
upsidedown

CAN has strictly better noise rejection and robustness over the USB pair.

USB could stand to take some lessons from CAN. :)

Indeed, CAN is better than RS-422/485, which is already pretty robust, while having comparable signaling rates (and build-your-own protocol -- it's just the physical layer; whereas, CAN takes care of a huge load of things at once).

That said, USB (Full Speed, which is as described -- full logic level output) is faster, and can be *much, much* faster (High Speed, etc.).

Noise is part of the reason USB is point-to-point, and all of the reason it must be 100% shielded. USB has no input range beyond the rails, and PHYs, and recommended ESD diodes, all have diodes to clamp to the rails.

You might think, well, can't we improve USB's CMRR at AC, by adding ferrite beads or CMCs? Alas, no -- USB itself is unbalanced, that is, it uses unbalanced symbols (J and K). Also, because it is source terminated, you can hardly afford any loading on the load side, so you don't have anything to create a voltage divider with the CMC. (And, needless to say, ferrite beads will swallow high speed signals whole, so no good there.)

RS-485 and CAN are very easy to filter, because they normally expect to have low impedances around. Both are fully differential, so you can always split the termination resistor or filter capacitor, and get common mode "center tap" that can be loaded with whatever impedance you like. (Recommended is a

+V/2 divider, and some R+C damped filtering, so the CMC + C doesn't ring.)

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
 Click to see the full signature
Reply to
Tim Williams

I believe it can work over longer distances as well. USB is limited to

5 meters. But then it runs at some pretty high rates...

As could a chicken from a duck. Two different animals. No point in comparing them really.

USB was designed for short cables connecting peripherals to computers. I think it does a very good job of it. I can't remember the last time I had a problem with noise in a USB cable.

--

Rick C
Reply to
rickman

Why ?

I would consider RS-422/485, USB, CANbus, Profibus DP similar in performance across long lines, all 5 V differential devices.. .

Original USB might have learned something from Profibus DP, which required special T-connectors with built in series inductors to run multidrop at 12 Mbit/s at 100 m lines.

Modern USB rates at 5-7 m looks OK.

One should always remember that the CAN collision domain size severely limited the network size !

In a CAN network, the two way propagation delay between any two stations on the network must be less than a fractional bit time. Considering any optoisolators on the line, the maximum bus length is about 10-40 m at 1000 kbit/s.

I have had problems running a few dozen nodes on a 100-200 m bus at

125-250 kbit/s CAN bus, sometimes forcing to reduce the line speed.

I like the CANbus peer-to-peer arbitration principle, but it _severely_ limits the bus length

Reply to
upsidedown

One should always remember that Modbus RTU, Profibus DP and USB are basically master/slave protocols with arbitration at the message _frame_ level, while in CANbus, the arbitration is done at a single bit level.

This of course limit the collision domain size.

Reply to
upsidedown

I believe that first CAN implementations used rs485 transceivers

Reply to
Lasse Langwadt Christensen

- It's unlikely you'd ever know it if you did. - If you did, you'd likely assume it's just a bad cable - You've probably not used it at the edge of its capability

Reply to
krw

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.