EmbeddedRelated.com
Forums

why CAN bus has two lines (CAN_L and CAN_H)

Started by kasu nandu May 16, 2007
> Note to all, I hope the information I give is useful, as it is
> priceless to me...
>
> LOL!
> Ruben, I don't really try to step on toes--I don't know if you can
> see the problem, but your statements appear awefully misleading and
> somewhat incorrect to me, so I want to clarify...
>
> You talked about "running without ground", but what do you mean,

I mean connecting two transceivers with only CANH and CANL. Again - Can bus is
not a current loop, it needs a ground reference.

When I said running I was refering to running (as in using) the communication
line. Sorry if I have mislead somebody. English is not my native language but I
think most undetstood anyway.

> really? Technically, such an idea does not even exist. I suppose you
> meant using only one wire for a signal, and relying on a common power
> supply ground or such for the reference. In other words, not running
> two wires directly between the boards (signal and reference, which is
> often common ground). Well, do you understand what CANH and CANL are?
> They are the "differential" pair, which works the same as the two wire
> (signal and ground), only more helpful in long distances because it
> avoids ground loops. Note that there is only one signal level at any
> time on a CAN bus, though the MCU itself uses one pin for each
> direction of communication (CANRX,CANTX), which does NOT DIRECTLY
> CORRESPOND to CANL and CANH on the bus.
>
> You seemed to indicate that a CAN bus is not a current loop, but you
> should know that the current loop is more important than voltage. That
> is why there are strict recommendations for the termination resistance
> of each CAN node. The drivers depend on enough current flowing, to be
> reliable at long distances!

The termination resistor is not to create a voltage by the current created by
the transmitter (as in a current loop) but to terminate the signal from
bouncing back and creating a reflection, which can cause serious disturbances
at higher data rate. At lower data rate you can even get communication without
a terminating resistor. With a current loop you can't.

>
> Trust me, this technology is well used on the expensive automobiles;
> the manufacturers are not being naive about these issues ;-)
>

Cars have a very good common ground plane (the chassis) and relatively short
distances.

> There is an excellent purpose for using the common GND surrounding
> CANL/CANH wires on a cable. It is not for GND reference. It is to
> allow shielding of the cable, to avoid RF radiation or interference.
>
> Hope this helps enlighten all. Note that I'm not here to argue, just
> drop this information. Thanks for tuning in ;-)

Regards / Ruben
<http://rjjournal.zapto.org>

=============================Ruben Jsson
AB Liros Electronic
Box 9124, 200 39 Malm Sweden
TEL INT +46 40142078
FAX INT +46 40947388
r...@pp.sbbs.se
============================
--- In 6..., "theobee00" wrote:
> Ruben said the CAN bus is not a current loop, that is because such
> a configuration forms a transmission line with a defined cable
> impedance and a terminating resistor to match.
>
> That is also where the confusion stems from, the drivers would
> need to supply enough current to drive the termination resistor,
> i.e. an output to supply current, but it is not what is known as
> a current loop, these assume low freq. or DC levels.

Hmmm, does it even matter whether this bus is called "current loop" or
is just a loop of current?

I just did some testing; I see nothing showing I'm wrong about any of
this except maybe terminology. Robert's test also agrees, but also
shows that the independent Gnds could be 40 V apart with no trouble.
[Then again, I don't know how to make the two 40V apart if they are
isolated from each other.]

I don't think that Ruben is so far off... Just that it doesn't hold water.

Theo, are you saying that a "current loop" *is* what "forms a
transmission line with a defined cable impedance and a terminating
resistor to match", or are you saying that this CAN bus configuration
is? This stuff about terminating, and defined cable impedance, does
sound like this CAN bus. It's similar to SCSI. But maybe the
difference is that on the CAN bus, the terminator resistor at the node
is about 120 ohms, but the wire itself is ideally zero?

Maybe I don't know the textbook definition of "current loop", because
I assume it means a loop of current (see English language). Of course
by my definition, ALL wire transmissions are current loops more or
less (unless they carry something other than electricity). It is
interresting that a CAN bus could be implemented with optical (light
is dominant, dark is recessive bit), so I assume this discussion is
only about the 82C250 CAN bus driver chip.

Whether this is really called a "current loop" does not matter, given
the question whether CAN needs the Gnd. I really don't mean to get
into an argument of "terminology". My point was that I believe it
relies on differential voltage generated by current in the loop
between CANH and CANL, and I don't think it requires any current nor
voltage reference between CANH/CANL and the common Gnd of either of
the CAN nodes.

Try it. I just did a cool test. I Powered each of my CAN nodes off of
their own battery without a common ground between them. Using a DMM, I
read voltage between the grounds of the two systems. With no CAN
plugged in, it is unreadable (overvoltage, but keeps changing range).
With CANL/CANH connected between the two, Gnd settles to a difference
of 66 mV. To my delight, the CAN packets are still getting though with
no common ground between the two nodes, except that imposed by
connecting the CAN wires. That tells me it uses the differential
voltage (CANH referenced from CANL), as I've been saying! I think
everybody should test it themselves, so they don't have to rely only
on this strange theory stuff. I always say, in the real world,
"theories" are useless :)

Given the successful test, is there any reason I would not want to
leave Gnd disconneced on the CAN cable? Yes, maybe. Perhaps we should
connect the two grounds because a wandering Gnd on one end could send
current though CAN lines, increasing that 66 mV until some damage
occurrs. It probably depends on the environments, whether you need to
account for that.

> > There is an excellent purpose for using the common GND surrounding
> > CANL/CANH wires on a cable. It is not for GND reference. It is to
> > allow shielding of the cable, to avoid RF radiation or interference.
>
> Hmm, not quite, Ruben is quite correct, you -always- need a ground
> reference somewhere to stay in the operating range of the receivers,
> a different issue from balanced lines.

Well of course; do you not see my point, that CANL becomes the
"reference" to CANH? It works anyway, but how well it works depends on
the CAN driver chip's design. Should we be asking them?

> If you are using some form of isolation on the receiver you still
> need a zero reference, say the Ethernet cards I use have Itsy Bitsy
> transformers on their balanced inputs to provide isolation and a
> relatively high value resistor to some form of ground reference like
> case and power ground to avoid exceeding the voltage spec on the
> isolators..

Can't say that I've seen that on both coils of the tranformer. Only on
the side where it obviously needs to be referenced to the circuit (was
not on the side comming from the other node).

> I note a direct coupled system is not a good idea for systems that
> can have substantial differences in ground potential, ground loop
> currents in shields are not a good thing, maybe not an issue in cars
> with all potentials close to ground.

We have differential audio transmitting over 50 ft cable, and we only
connect the shield to Gnd on one end. Connecting it on both caused
problems.

I like this reference. Note that it avoids calling it "differential" I
suppose because it is not isolated:

http://www.warwick.ac.uk/devicenet/can_faq.htm
--- In 6..., Robert Boys wrote:
>
> Hello
>
> This is becoming quite the discussion. This is interesting as we are
> looking at some assumptions many people have that might not be entirely
> true.
>
> Today I connected up two Dearborn Group S3 analyzers (
> www.dgtech.com/~rboys/flyers/s3.pdf ).

Hi

Fistly please note I have never worked with CAN buses specifically, strictly theory from other systems.

However, there are some points that are always valid.

As has been mentioned several times already, transmission lines must always be terminated with their characteristic impedance to avoid reflections and standing waves in the cables, no arguements there other then that at lower frequencies you have a fair amount of leeway in the exact values or resistor types.

Earths have been discussed also, obviously you must have one somewhere in any DC coupled system, how you do that only impacts the noise immunity.

What remains is essentially a basic excersize in logic.

With a single terminating resistor acoss the transmission line either cable open circuiting would normally fail since no differential voltage will develop across the resistor, although I have never encountered such a setup, I suppose a sufficiently clever receiver could guess what it means when both lines move in unison.

Shorting either cable to high or low will develop a voltage across the terminating resistor (50% of the origional differential voltage, reduced noise immunity of course), but in half the cases the received logic will be inverted, it depends on the receivers HW/SW setup if it can cope with such a logic signal inversion.

This is essentially what you observed during your testing, I note your system didn't handle the logic inversion nor the lack of differential voltage.

If increased fault tolerance is required in a transmission system I would use at least two terminating resistors, at a minimum one on each transmission line, normally to ground.

Such a setup will insure that a differential voltage will develop in all cases where a single line fault occurs, i.e. when one line is shorted either to high or low or open circuited.

Hope I am not belabouring the obvious to you and I can't tell you if CAN systems are or can be setup to cope with the resulting logic inversion under some of these fault conditions, or even if any resistors are already present on the inputs of the receivers, I will leave that up to you guys to read the receiver spec.

Right now I have to run to set up the menu and start work for tomorrows BBQ;-)
Cheers,
Theo
Jefferson Smith wrote this message on Fri, May 25, 2007 at 22:03 -0000:
> I just did some testing; I see nothing showing I'm wrong about any of
> this except maybe terminology. Robert's test also agrees, but also
> shows that the independent Gnds could be 40 V apart with no trouble.
> [Then again, I don't know how to make the two 40V apart if they are
> isolated from each other.]

Take your two battery powered CAN devices, and then hook a 40V power
supply between the two grounds... That will make them 40V apart...

--
John-Mark Gurney Voice: +1 415 225 5579

"All that I will do, has been done, All that I have, has not."
Hi,

Differential signal mehanism(2 CAN lines) is basically
used to maintain the signal integrity,the same is the
case for DWCAN since we use it at High speeds(max
1Mbps)we need to cancel the noise which is more
prominent at high frequencies/speeds, so when we use 2
wire(CANL,CANH) noise will be equally induced in both
the lines so when we calculate the signal(logic)
levels by subtracting the voltage levels on the can
bus(CANH-CANL) it effectively cancels/nullifies out
the noise induced and thus maintains the signal
integrity.

Have a nice day..

Thanks,
Sreedhar.k
-- In 6..., "Jefferson Smith" wrote:
>
> Hmmm, does it even matter whether this bus is called "current loop" or
> is just a loop of current?

Yes, they are different things, they way you phrase it is coloured herring, the difference under discussion is between a current loop and a transmission line.

> I just did some testing; I see nothing showing I'm wrong about any of
> this except maybe terminology. Robert's test also agrees, but also
> shows that the independent Gnds could be 40 V apart with no trouble.
> [Then again, I don't know how to make the two 40V apart if they are
> isolated from each other.]

You mixing things up, on the one hand you have a transmission line intended for high frequencies, on the other you have to contend with DC coupled signals on an input, the grounds you mention can be at some different voltages because there is ample headroom in the receivers, in this case you mention 40V.
Put a transformer on the transmission line and the Earth differential can be any voltage you care to design for, for cars the fourty volt DC headroom provided should be enough.

> I don't think that Ruben is so far off... Just that it doesn't hold water.
>
> Theo, are you saying that a "current loop" *is* what "forms a
> transmission line with a defined cable impedance and a terminating
> resistor to match", or are you saying that this CAN bus configuration
>is? This stuff about terminating, and defined cable impedance, does
> sound like this CAN bus. It's similar to SCSI. But maybe the
> difference is that on the CAN bus, the terminator resistor at the node
> is about 120 ohms, but the wire itself is ideally zero?

Nope, there is a very basic difference between say a voltage transmission like RS232 and current loops, or the concept of transmission lines.

The former two don't have any defined values for terminating resistors or even need any.

Say RS 232 is defined by a voltage transition from plus to minus 15 V from memory, that is not very onerous on the receiver, with a bit of protection any old transistor or IC will detect that easily, in addition there flows no current in the cable so the only signal degradation is due to capacitance effects putting a limit on allowable distance at a given baud rate.

A current loop is defined in current terms, i.e. a 4-20mA loop is defined by that current range, no mention of value of receiving resistor, you put in ten ohm and the resulting voltage is defined by Mr Ohm, within its operating range the current will not vary as a result of the resistor, the cable resistance plays no role either, the output is designed to supply the desired current regardless of these.

In the case of some slower transmission lines where HF effects play no role they are often terminated into resistors, the purpose of these is the same as these used in 4-20mA loops, to convert a given current into a voltage that can be measured.

In such a case the actual value of the current is not relevant, as long as the desired voltage is developed across the resistor, these resistors are typically of higher values to limit drive currents and have no relevance to cable impedances.

A fast transmission line is a different kettle of chips, when the operating frequency increases the distributed cable inductance and capacitance will increasingly play a role, the cable itself becomes a "tuned" system so to speak, say Ethernet is such a system, at 10 MHz to 1 GHz the cable characteristics must be optimised and need a termination impedance to match

A system like RS232 is happy to drive into an open end like a Fet or Transistor posing essentially no load conditions at a few kBaud, but at higher frequencies it becomes increasingly important to close the cable end off to avoid reflections and standing waves, you talk about a tuned system.

This closing of is usually done with a resistor and the optimum value must be matched to the characteristic impedance of the cable to avoid phase shifts and reflections, the higher the frequency and the longer the distance the less leeway you have.

And no, there still are line losses to contend with and for such a system these are very well defined, probably not a great issue on CAN systems but for longer distances you find loss figures for these cables, usually expressed in dB/m

> Maybe I don't know the textbook definition of "current loop", because
> I assume it means a loop of current (see English language). Of course
> by my definition, ALL wire transmissions are current loops more or
> less (unless they carry something other than electricity). It is
> interresting that a CAN bus could be implemented with optical (light
> is dominant, dark is recessive bit), so I assume this discussion is
> only about the 82C250 CAN bus driver chip.

It is not so much the drivers, these can be considered as zero impedance, but the cable and receiver end is where the problems start, of course an optical transmission line is a different thing altogether, hardly DC coupled.
Not sure about the specific chip you mention, no doubt there are two million varieties available, your pick, I just give you the basics.

> Whether this is really called a "current loop" does not matter, given
> the question whether CAN needs the Gnd. I really don't mean to get
> into an argument of "terminology". My point was that I believe it
> relies on differential voltage generated by current in the loop
> between CANH and CANL, and I don't think it requires any current nor
> voltage reference between CANH/CANL and the common Gnd of either of
> the CAN nodes.

See my previous posts, the transmission line with its differential voltages and the DC/Ground conditions are two different items.

> Try it. I just did a cool test. I Powered each of my CAN nodes off of
> their own battery without a common ground between them. Using a DMM, I
> read voltage between the grounds of the two systems. With no CAN
> plugged in, it is unreadable (overvoltage, but keeps changing range).
> With CANL/CANH connected between the two, Gnd settles to a difference
> of 66 mV. To my delight, the CAN packets are still getting though with
> no common ground between the two nodes, except that imposed by
> connecting the CAN wires. That tells me it uses the differential
> voltage (CANH referenced from CANL), as I've been saying! I think
> everybody should test it themselves, so they don't have to rely only
>on this strange theory stuff. I always say, in the real world,
>"theories" are useless :)

He, he, theory does have its uses, you are arguing in circles somewhat, there is no if or but, you must have a zero or ground reference, this might not necessarily take the form of a bit of wire, it could be the car body or the shield etc.

What you describe here is where the discussion started, the term Ruben used was a "weak" earth, very descriptive I thought, it is what you just tested, theory sometimes coincides with the hacker:-)

Essentially when any single transmission line exceeds the high or low voltage range of the input protective devices they conduct and will take up current until the receiver floats somewhere in the transmitters voltage range, hence the term "weak" Earth Ruben used in the very first post.

An Earth you have when you don't have an Earth, needless to say I would recommend a solid bit of wire if the two systems have independent supplies, shield is fine.

> Given the successful test, is there any reason I would not want to
> leave Gnd disconneced on the CAN cable? Yes, maybe. Perhaps we should
> connect the two grounds because a wandering Gnd on one end could send
> current though CAN lines, increasing that 66 mV until some damage
> occurrs. It probably depends on the environments, whether you need to
> account for that.

See above

> > > There is an excellent purpose for using the common GND surrounding
> > > CANL/CANH wires on a cable. It is not for GND reference. It is to
> > > allow shielding of the cable, to avoid RF radiation or interference.
> >
> > Hmm, not quite, Ruben is quite correct, you -always- need a ground
> > reference somewhere to stay in the operating range of the receivers,
> > a different issue from balanced lines.
>
> Well of course; do you not see my point, that CANL becomes the
> "reference" to CANH? It works anyway, but how well it works depends on
> the CAN driver chip's design. Should we be asking them?

No need nor desire, from what I have heard the drivers are short circuit proof already and the inputs are protected and have a lot of headroom, in the crude case the drivers simply rattle the high and lo lines around, bouncing current to supply and ground until the protective devices float the receiver into the Voltage range. As I said before, not a desirable operating condition.

Needless to say there are also somewhat more sophisticated active systems that dynamically adjust the operating levels of the receiver into the middle of the transmitters transition range, a more robust solution, see spec of actual device used to find out if that's the case.

> > If you are using some form of isolation on the receiver you still
> > need a zero reference, say the Ethernet cards I use have Itsy Bitsy
> > transformers on their balanced inputs to provide isolation and a
> > relatively high value resistor to some form of ground reference like
> > case and power ground to avoid exceeding the voltage spec on the
> > isolators..
>
> Can't say that I've seen that on both coils of the tranformer. Only on
> the side where it obviously needs to be referenced to the circuit (was
> not on the side comming from the other node).

Of course not, it only needs a bleed resistor on the isolated side, of the receiver, the purpose is to bleed away any static build-up in the (isolated) receiver since this would result in insulation failure of the transformer, the bleed can be back to the sender or into its own environment Earth.

> > I note a direct coupled system is not a good idea for systems that
> > can have substantial differences in ground potential, ground loop
> > currents in shields are not a good thing, maybe not an issue in cars
> > with all potentials close to ground.
>
> We have differential audio transmitting over 50 ft cable, and we only
> connect the shield to Gnd on one end. Connecting it on both caused
> problems.

Indeed, an AC ground current will induce noise in the lines, you get "hum"

> I like this reference. Note that it avoids calling it "differential" I
> suppose because it is not isolated:

The term used here is balanced line, a different thing again, a balanced line is used purely for noise cancellation, at audio frequencies there are no transmission line effects of importance, but a good Audio system uses all three cancellation methods, it has a balanced twisted pair, the balance referring to the two wires being out of phase 180 degrees, at least one transformer coupling, usually at the receiver end, sometimes also at the sender, as well as a shielded cable, these somewhat more extreme measures are due to the large dynamic range of the signal, the noise floor for audio needs to be preferably 120dB or so below signal level.
(note that at audio frequencies no terminating resistors are needed, nor any special impedance defined cables)

Than you get in the extremes, the very sensitive instrumentation systems, where coupling transformers often have three separate shields and cabling two, one connected to Earth/Ground, and the inner shield connected to zero reference to shield the twisted pair from Earth induced noise.

And then of course for those extreme extreme cases there is an inner inner shield that is actually dynamically driven to be always smack bang in the middle of the signal balance range, fortunately digital signals are not that difficult.

I mentioned my speciality used to be analogue design?

Enough edumification, my pea soup needs attention, want recipe?

Take one hogs head, four trotters etc, European version of haggish:-)

Cheers,

Theo
> --- In 6..., "theobee00" wrote:
> > Ruben said the CAN bus is not a current loop, that is because such
> > a configuration forms a transmission line with a defined cable
> > impedance and a terminating resistor to match.
> >
> > That is also where the confusion stems from, the drivers would
> > need to supply enough current to drive the termination resistor,
> > i.e. an output to supply current, but it is not what is known as
> > a current loop, these assume low freq. or DC levels.
>
> Hmmm, does it even matter whether this bus is called "current loop" or
> is just a loop of current?

Because it isn't a current loop.

Current loop needs no common ground. Reference voltage is derived from the
current loop itself. Just two wires. In the receiver a voltage over a resistor
is derived from the current. The loop driver adjusts (regulates) the current
according to the (within certain limits) unknown load.

A differential transmission line, on the other hand, works with voltages.
Voltages referenced to a common ground. The driver does not adjust (regulate)
the voltages and currents depending on different loads. It is true that the
logic level on the bus is derived from the voltage difference between the two
lines BUT the voltage is not derived using the termination resistor, it is
coming directly from the transmitter circuit. The termination resistor is there
to "terminate" the line, impedance wise. Sort of to make a smoth ending for the
signal which would otherwise bounce and cause ripple on the line when the
voltage is swithed fast.

>
> I just did some testing; I see nothing showing I'm wrong about any of
> this except maybe terminology. Robert's test also agrees, but also
> shows that the independent Gnds could be 40 V apart with no trouble.
> [Then again, I don't know how to make the two 40V apart if they are
> isolated from each other.]

The problem is that your setup is what I call a "lab setup". In the real world
you have other electrical influences on the wires and a ground reference that
may be at different voltage levels, especially in a factory environment where
the factory ground structure isn't very good and you have high power machines.
If you don't connect the ground wire here and you have a long distance between
the nodes and the nodes are connected to the ground structure, the only
connection between the nodes are the communication wires. If there is a
difference in the grounds for some reason, say a power surge caused by a high
power machine, the current will flow from one ground to the other through the
communication wires then there could be more than 40V difference between the
CANH, CANL and the circuit ground. Even though the difference between CANH and
CANL is only a couple of volts. A ground wire here would let the temporary
surge current flow through the ground wire instead since it has a much lower
impedance to ground. This may in turn cause other problems (ground current
loops) but it doesn't destroy the circuits.

If you, on the other hand, have the nodes isolated from ground, you have a DC
insulation between your circuit and the ground structure. You still have a
capacitive coupling to the different grounds which also could cause HF currents
to flow between the nodes. This capacitive coupling is not to be negligated,
especially at higher frequencies. A shield connected to the ground structure
(not 0V) at both ends helps here. This may also cause current loops but the
connection in one end can be done through a capacitor to block the DC and low
frequency current flow. The HF is almost always a bigger problem than the low
frequency current loop though.

>
> I don't think that Ruben is so far off... Just that it doesn't hold water.
>
> Theo, are you saying that a "current loop" *is* what "forms a
> transmission line with a defined cable impedance and a terminating
> resistor to match", or are you saying that this CAN bus configuration
> is? This stuff about terminating, and defined cable impedance, does
> sound like this CAN bus. It's similar to SCSI. But maybe the
> difference is that on the CAN bus, the terminator resistor at the node
> is about 120 ohms, but the wire itself is ideally zero?
>
> Maybe I don't know the textbook definition of "current loop", because
> I assume it means a loop of current (see English language). Of course
> by my definition, ALL wire transmissions are current loops more or
> less (unless they carry something other than electricity). It is
> interresting that a CAN bus could be implemented with optical (light
> is dominant, dark is recessive bit), so I assume this discussion is
> only about the 82C250 CAN bus driver chip.
>
> Whether this is really called a "current loop" does not matter, given
> the question whether CAN needs the Gnd. I really don't mean to get
> into an argument of "terminology". My point was that I believe it
> relies on differential voltage generated by current in the loop
> between CANH and CANL, and I don't think it requires any current nor
> voltage reference between CANH/CANL and the common Gnd of either of
> the CAN nodes.
>
> Try it. I just did a cool test. I Powered each of my CAN nodes off of
> their own battery without a common ground between them. Using a DMM, I
> read voltage between the grounds of the two systems. With no CAN
> plugged in, it is unreadable (overvoltage, but keeps changing range).
> With CANL/CANH connected between the two, Gnd settles to a difference
> of 66 mV. To my delight, the CAN packets are still getting though with
> no common ground between the two nodes, except that imposed by
> connecting the CAN wires. That tells me it uses the differential
> voltage (CANH referenced from CANL), as I've been saying! I think
> everybody should test it themselves, so they don't have to rely only
> on this strange theory stuff. I always say, in the real world,
> "theories" are useless :)

In the real world there are a lot of theories that applies, all have to be
considered in a good design. Otherwise you will, sooner or later, have troubles
in the field. Troubles that can be very expensive to fix.

>
> Given the successful test, is there any reason I would not want to
> leave Gnd disconneced on the CAN cable? Yes, maybe. Perhaps we should
> connect the two grounds because a wandering Gnd on one end could send
> current though CAN lines, increasing that 66 mV until some damage
> occurrs. It probably depends on the environments, whether you need to
> account for that.
>
> > > There is an excellent purpose for using the common GND surrounding
> > > CANL/CANH wires on a cable. It is not for GND reference. It is to
> > > allow shielding of the cable, to avoid RF radiation or interference.
> >
> > Hmm, not quite, Ruben is quite correct, you -always- need a ground
> > reference somewhere to stay in the operating range of the receivers,
> > a different issue from balanced lines.

Also, shielding should always be connected to the ground structure (chassis)
which may or may not be 0V in your circuit.

>
> Well of course; do you not see my point, that CANL becomes the
> "reference" to CANH? It works anyway, but how well it works depends on
> the CAN driver chip's design. Should we be asking them?

But neither CANL nor CANH IS ground. They both have more or less impedance to
the circuit ground. Besides the reference that CANL becomes to CANH you also
have the ground reference between circuit 0V (ground) and CANL/CANH. There is
an upper positive and lower negative limit to the voltage between 0V and
CANL/CANH. This is called the maximum common mode voltage that the CANL/CANH
can withstand without breaking.

>
> > If you are using some form of isolation on the receiver you still
> > need a zero reference, say the Ethernet cards I use have Itsy Bitsy
> > transformers on their balanced inputs to provide isolation and a
> > relatively high value resistor to some form of ground reference like
> > case and power ground to avoid exceeding the voltage spec on the
> > isolators..
>
> Can't say that I've seen that on both coils of the tranformer. Only on
> the side where it obviously needs to be referenced to the circuit (was
> not on the side comming from the other node).
>
> > I note a direct coupled system is not a good idea for systems that
> > can have substantial differences in ground potential, ground loop
> > currents in shields are not a good thing, maybe not an issue in cars
> > with all potentials close to ground.
>
> We have differential audio transmitting over 50 ft cable, and we only
> connect the shield to Gnd on one end. Connecting it on both caused
> problems.

A shield connected at only one end will have very little effect on high
frequency disturbances and is not recommended. If the low frequency dc
connection (ground current loop) is causing problems (50/60Hz into audio
devices for example) the lower frequencies can be blocked with a capacitor in
the shield at one end. The impedance of the capacitor must be selected to be as
low as possible for the frequencies where the circuit is sensitive to the hf
noise in order to let these frequencies through the shield and directly to
ground instead of through the sensitive circuit. But this is a whole different
matter.

>
> I like this reference. Note that it avoids calling it "differential" I
> suppose because it is not isolated:
>
> http://www.warwick.ac.uk/devicenet/can_faq.htm
>

Regards / Ruben
<http://rjjournal.zapto.org>
=============================Ruben Jsson
AB Liros Electronic
Box 9124, 200 39 Malm Sweden
TEL INT +46 40142078
FAX INT +46 40947388
r...@pp.sbbs.se
============================
--- In 6..., "Ruben Jsson" wrote:

> > --- In 6..., "theobee00" wrote:
> > > Ruben said the CAN bus is not a current loop, that is because such
> > > a configuration forms a transmission line with a defined cable
> > > impedance and a terminating resistor to match.
> > >
> > > That is also where the confusion stems from, the drivers would
> > > need to supply enough current to drive the termination resistor,
> > > i.e. an output to supply current, but it is not what is known as
> > > a current loop, these assume low freq. or DC levels.

Hi Ruben,

Firstly my pea soup turned out OK, albeit a bit smoky, if anybody is in the neighbourhood feel free to come past at about one-ish:-)

Back to the CAN, had a free moment to have a look at the specs and yes, exactly as discussed.

It does specify an Earth connection as expected, IOW it is designed primarily as a cheap DC coupled system.

It also allows a great deal of flexibility in operating conditions, speeds from 10kHz to 1 MHz and surprisingly it allows for far greater distances than useful in a car, but even at the 1Mbit transmission speeds it can handle fourty meters, about enough for even our Australian road trains.

The other upshot of this is that the signals can be looked at either way, at 10KHz there are no transmission line effects, any old twisted pair will do and a resistor is there purely to assure zero differential allowing ganging up of multiple non driving devices.
However, since the spec allows up to 1 MHz there will be transmission line considerations, this is evidenced by the requirement of having two terminating resistors, one at each end to stop reflections at these speeds, obviously at 10kHz one resistor would do.

Of course it uses a balanced pair to carry the signal, mandatory for noise immunity, the twist here is that it is not balanced around ground but around a few volts, the likely reason being that it is a fairly old standard and avoids the in those days costly need for a negative supply or transformers, cheap, cheap was the spec.

(BTW, although probably incidental for the CAN system, it also guarantees one line is at about 2,5V at any time even under fault conditions, if needed you can sneak a few uA of the lines to power a CPU)

Fault tolerance is as expected, since for any such system as long as there is a differential voltage developed in the appropriate range communication is possible.
CAN specifies a short to either rail or an open circuit of one line should not stop operation.

>From evidence mentioned here some CAN receivers can't cope with the resulting logic signal inversion and fail this spec on CANH to ground, this can be confirmed by shorting CANL to positive, of course in such a system this should fail the spec as well.

Without further digging I cannot ascertain if this is resolvable in the software or is a design function of the specific hardware used, someone here might know.

Seeing the lack of transmission protocol standards and transmission speeds it is clear it is designed as a sheep with five legs, they had to please all the manufacturers, so it is eminently possible there is a note somewhere that the capability for logic inversion is optional.

Cheers,

Theo
--- In 6..., "theobee00" wrote:
> Fistly please note I have never worked with CAN buses specifically,
> strictly theory from other systems.
>
> However, there are some points that are always valid.
>
> As has been mentioned several times already, transmission lines must
> always be terminated with their characteristic impedance to avoid
> reflections and standing waves in the cables, no arguements there
> other then that at lower frequencies you have a fair amount of
> leeway in the exact values or resistor types.
>
> Earths have been discussed also, obviously you must have one
> somewhere in any DC coupled system, how you do that only impacts the
> noise immunity.
>
> What remains is essentially a basic excersize in logic.

Of course... everything in existance has a purpose, i.e. is part of a
completely logical explanation... Even the truth about the existance
of God is completely logical ;-)

Nobody forget though... this discussion has nothing to do with
reinventing electronics (i.e. Ohm's law). We are merely trying to find
the characteristics of the 82C250 CAN tranceiver. Either it relies on
the added Gnd wire, or it does not. Either it utilizes another Gnd
reference when CANL connection is lost, or it does not. Either it
utilizes the possible information between CANL -- Gnd if CANH
connection is lost, or it does not (apparently not).

I thought the bottom line was that yes, CAN bus works fine without the
extra Gnd wire, but should at least have CANH and CANL. A common Gnd
between the two nodes is also nice.

This all should be a question of what the driver chip handles, not
questioning Ohm's law.

Theo is right in general, and so is many of the comments in general.
The only reason they seem to conflict is because some thoughts are not
specific to this CAN implementation.
Sorry to change the topic slightly.

I have always seen the CAN bus depicted as a single line with terminating
resistors at each end. Can the bus be used in a star configuration?
(probably) If so, what does that do to the terminating resistors?

Mike