Go Down

Topic: DIY CAN MCP2515/2551 Setup w/Nano - Nothing happening on bus (Read 190 times) previous topic - next topic

EmptySet

Hi,

I'm taking my first tentative steps into the world of CAN and figured starting with a simple proof-of-concept on Arduino would be a good idea.

I found this shield which has an easy to follow schematic: SeeedStudio Shield v2.0, schematic, arduino library
And I already had the MCP2515/2551 and a Nano lying around, so I thought to try building this circuit myself instead of going with the canned solution.

So I built it all up without much hassle. The biggest problem was ensuring the oscillator I fed into the MCP2515 worked, but after some investigation I now have a 16MHz 0-5V signal coming in and also mirrored on the MCP2515's CLKOUT pin, so that should be resolved.

Then I loaded the "send_Blink" sketch onto my Nano, opened up the serial monitor, and saw the following promising output:
Code: [Select]
Enter setting mode success
set rate success!!
Enter Normal Mode Success!!
CAN BUS Shield init ok!
In loop
In loop
In loop
In loop
In loop
In loop
In loop
...


From here I checked my CANH/CANL output (which I have terminated to each other with a 120-ohm resistor). I sampled from CANH to GND or CANL to GND (I think this would work, but I also tried CANH to CANL since I know the spec defines logic levels as them having 0 or 5V differential) ...Anyway, in any case I tried, I saw nothing on these pins, 0V.

So I went back one step and looked at what my MCP2515 was giving to the MCP2551. And it was giving... something, but I wasn't sure it was the correct kind of data. So I even went back one step further and checked my MOSI/MISO/SCK/CS going into the MCP2515.

Now here is where I'm stuck, since I don't know what kind of data these ICs expect. I'm not sure if my SPI input is bad (although it's just unmodified library code) or if my MCP2515's output is bad, or even if nothing up to that point is bad and my MCP2551 won't output a CAN signal because it's bad or wrongly configured.

So I've attached images of the relevant pins in this issue (except CANH/CANL since you can use your imagination for flat 0V signals!)

I noticed that the data is sent out in "bursts" thanks to the 1s delay in the code. I have two "zoomed_out" files which capture a whole burst, the other images capture a smaller part of a single burst. The file names refer to which MCP2515 pin I was probing on.

You'll also see that my circuit looks quite noisy... It is a breadboard and the root cause is the oscillator of course, but I can't simply remove that. How could I mitigate the noise it adds aand could the noise be significant enough to cease the MCP2551's operation?



EmptySet

Bump - is there any additional info I can provide to more clearly explain my problem here? I know it's a bit of an info-dump, but I had assumed this would be a well-known circuit I was working on here and there would be some general troubleshooting wisdom to use as a starting point.

Go Up