CAN Sniffer on Altera DE2-115 Board

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi there,

I am trying to implement a CAN sniffer on an Altera DE2-115 evaluation boar
d with the Terrasic AD/DA data conversion card (High Speed Mezzanine Card (
HSMC) via SMA. I am using two A/D channels for CAN_H and CAN_L bus signals.

Before testing it with real CAN signals I want to make sure that the connec
tion is right in terms of voltage swing, differential termination and peak-
to-peak voltage. If I got it right I expect a voltage swing of about 1 volt
 on the CAN_H and CAN_L signal, whereas the input characteristics for the d
ata conversion card say something about 0.5V. But I am not sure if I unders
tood it correctly.

Could somebody please verify, unfortunately I am no expert in analog electr
onics. Any help is highly appreciated.

Regards, Ryo

Re: CAN Sniffer on Altera DE2-115 Board
On 2018-05-15 Ryo Kato wrote in comp.arch.embedded:
Quoted text here. Click to load it

Usually CAN signal level is 0/5V, so you should at least cover that.
To allow for some common mode differences, older tranceivers would accept
-7V to +12V signal levels. Newer chips accept even more, like this example
for 12V (car, noisy) systems that accepts +/-42V.
  https://www.nxp.com/docs/en/data-sheet/TJA1057.pdf

This could also be useful for you:
  http://www.ti.com/lit/an/slla270/slla270.pdf

So at least allow for -7/+12V voltages and +/-50V when you expect to use
your sniffer in noisy environments.


But why monitor the lines with two ADC's? Why not use a standard CAN
tranceiver and controller to receive all bus activity without generating
acks like all(?) CAN monitors?

Do you want to calculate the differential voltage from the ADC values and
then apply thresholds to convert to bits? You would need to sample a lot
faster than the bit rate (10X?, so 10MSPS for a 1Mbps CAN bus).


--  
Stef    (remove caps, dashes and .invalid from e-mail address to reply by mail)

pos += screamnext[pos]  /* does this goof up anywhere? */
We've slightly trimmed the long signature. Click to see the full one.
Re: CAN Sniffer on Altera DE2-115 Board
On Thu, 17 May 2018 17:09:29 +0200, Stef

Quoted text here. Click to load it

Since the differential voltage can be as low as a few hundred
millivolta, the ADC resolution should be in the order of tens of
millivolts.

Quoted text here. Click to load it

The -7 to +12 V common mode range is the minimum you should be able to
digitize property, but the ADC should tolerate a much larger swing,
but it should be enough to indicate "overflow".

Quoted text here. Click to load it

If you want to know how close the system noise margins are, you
definitively want to do analog measurements. Of course, one could even
use an (analogue) dual channel oscilloscope and put into A-B mode to
display the differential voltage.  

The oldest CAN controllers did not have Listen Only mode, but at least
SJA1000 days, the Listen Only mode is usually available, which is nice
for autobauding an existing network.

Quoted text here. Click to load it

The interesting things that an analog converter will reveal, is
over/undershots etc. similar analogue issues, long before those things
cause problems in the digital domain.

But as I said, a dual channel scope will do the same thing as the
proposed analyzer.


Site Timeline