Struggling with CAN - 11 bit IDs could be the problem?

I bought the R4 Minima so that I could use it in a project for my track car where I want to display certain data from the vehicle CAN onto an OLED screen, and also use it to drive an air-core gauge.

First problem I have is that the Adafruit OLED that I have bought works in SPI on my R3 but doesn't work on my R4... but I'll ignore that issue for now.

I have used an MCP2551 CAN transceiver which I have connected as per below -

image

...and used the CAN read sketch from this example -

Set my rate to 500k (which I know for fact is the rate for my car), connected it up to the CAN network and nothing is printing to the Serial Monitor.

I'm a beginner at best so I've just been searching everywhere online for anything that might give me a clue as to what could be going wrong. I don't know if perhaps I'm being naïve in thinking I could use that sketch to read the CAN stream (although with it being a standard protocol, I would have expected it to know what it's looking for?).

This thread here seems to suggest that at the moment CAN is only operating with 29 bit IDs... Is that correct? If so I wonder if that could be my problem as I know for certain that my car uses 11-bit IDs.

This below seems to suggest that 11-bit is being added? Am I understanding that correctly? Reading through it I don't understand half of what is being discussed....

Any help/advice would be massively appreciated.

Hi @knd_86

That is correct. The work was completed earlier today. However, there hasn't been a release of the "Arduino UNO R4 Boards" platform since that time so you'll have to wait until the next release comes out before the 11-bit support will be available to the users of the release version of the platform.

1 Like

Hi, I'm waiting for this feature as well. Is there a way I can sign up to get notified when the release is made? Thanks!

If you are using Arduino IDE, it will show a notification when the new release is available:

image

Hi, yes I just got the update to Renesas Uno 1.0.4 release this morning! I will test it asap.

Oh that's amazing to hear! Thank you for your response. Hopefully that'll solve my issue of not being able to see any messages in the Serial Monitor.

1 Like

It works! I have CAN messages flooding in from my car now just from using the CANRead sketch. I'm so happy.

I need to figure how to collect just the IDs I'm interested in now.

Thanks again!

1 Like

You are welcome. I'm glad it is working now. Thanks for taking the time to post an update with your findings.

Regards,
Per

1 Like

Just tagging this on the end here - not sure if it might be better to post this as a new question somewhere else, but I don't know where on the forum it should go?

In my CAN stream I have about 15 unique IDs but I am only interested in 2 or 3 of them.

Is it possible to filter what gets written to the temp buffer based on the IDs?

I assume that it would be significantly lighter work on the hardware to only write the stuff that is wanted to memory rather than every single message.

Yes same for me. Got it talking to CAN bus yesterday and doing all the stuff I was using the CAN hat for previously. Thanks ptillisch!

1 Like