Go Down

Topic: CAN bus library for J1939 - Solved #5 (Read 372 times) previous topic - next topic


Mar 23, 2019, 09:13 am Last Edit: Apr 01, 2019, 11:45 am by Mogaraghu
I have a requirement to be able to talk to a device which has inbuilt CAN Bus 2.0B and conforming to J1939. It is powered up with a voltage of 9-32V dc and has only the CAN-H and CAN-L pins.

Planning to buy a module on Amazon that uses the MCP2515+TJA1050 transceiver and use it with a Nano to be able to "talk" with this device.

I have been reading various posts here on the topic of CAN but could not latch on to the right library that should be used for the requirement as  mine.

And just as a matter of information, I have no plans and need to link up to a OBD of my car  :)  All well there and I don't want to mess with that !!

Any tips ?


And just as a matter of information, I have no plans and need to link up to a OBD of my car  :)  All well there and I don't want to mess with that !!

Any tips ?
As you may have found there are quite a few CAN libraries and examples with them for OBD-II communication.

if indeed you did not find any useful, what is the information that you wish to read/write from/to your car?

Hopefully with your reply to the above question, we may be able to point you to something...


Mar 24, 2019, 01:31 pm Last Edit: Mar 24, 2019, 01:32 pm by Mogaraghu

Possibly you did not read my full post or you missed the request. :)

I wanted to connect to a specific device and NOT to a OBD of a car !! The reason why I said that when I Googled CAN Bus + Arduino I was flooded with the OBD link up topics.

Anyway I located the Seeed library for Arduino here CAN Bus Shield and for now that seems to be OK for my purpose !!

Thanks for trying to help ...


Mar 28, 2019, 08:24 am Last Edit: Mar 28, 2019, 08:25 am by Mogaraghu
I have had some luck with the CAN bus module as shown below along with an UNO :

However when I link up the module with my CAN enabled device ( Its a proportional amplifier driver for hydraulic valves … full data sheet here : XMD-01)  I get transmitted Data only when I connect either CAN_LO or CAN-HI but not both !! Is this how teh TJA1050 transceiver work or I am having an issue ? There is a jumper on board to enable the 120 Ohms termination. No luck with this.

So what else could be an issue ?


Apr 01, 2019, 11:44 am Last Edit: Apr 01, 2019, 11:47 am by Mogaraghu
Ok the issue was that I was trying to read a Standard ID whereas the device which I was connected to was sending Extended ID.

Located one library which I located here that handles both types with equal elan and prints out the received messages. Works fine now.


Kudos to the author who wrote the above. The examples enclosed with the library are cover all use case scenarios.

Go Up