How to make Arduino + CAN-BUS as Adapter

Is it possible to make Arduino + CAN-BUS shield as adapter to PC ? Example: I have software "A", which needs CAN data (software gets data itself, and do everything itself). I connect CAN-HIGH, CAN-LOW to a CANBUS shield and with sketch I am able to connect and read the can data.

My question would be, how to transmit all that data to PC (to serial/com) that "A" software would be able to get that candata as well. In other words make Arduino and CANBUS shield to work only as adapter to PC ?

Thanks a lot !

1 Like

Most Arduino CAN libraries have a demo sketch that sends the received CAN messages to the PC USB serial port.

there are a number of Arduino based Canbus Monitors on github
there are USB-CAN adapters which can connect directly to a PC to read and transmit Canbus data - look on Ebay etc

1 Like

eimasdec:
Is it possible to make Arduino + CAN-BUS shield as adapter to PC ? Example: I have software "A", which needs CAN data (software gets data itself, and do everything itself). I connect CAN-HIGH, CAN-LOW to a CANBUS shield and with sketch I am able to connect and read the can data.

My question would be, how to transmit all that data to PC (to serial/com) that "A" software would be able to get that candata as well. In other words make Arduino and CANBUS shield to work only as adapter to PC ?

Thanks a lot !

if software "A" interprets CAN data, it MUST come with a hardware or recommended hardware for it.

Secondly if you want to do away with that hardware are you sure that software "A" can use Serial as communication interface? e.g in your software "A" interface panel do you see COM or Serial?

mikb55:
Most Arduino CAN libraries have a demo sketch that sends the received CAN messages to the PC USB serial port.

Atleast 1 example, please

horace:
there are a number of Arduino based Canbus Monitors on github
there are USB-CAN adapters which can connect directly to a PC to read and transmit Canbus data - look on Ebay etc

Thanks I will try

sherzaad:
if software "A" interprets CAN data, it MUST come with a hardware or recommended hardware for it.

Secondly if you want to do away with that hardware are you sure that software "A" can use Serial as communication interface? e.g in your software "A" interface panel do you see COM or Serial?

Lets say its compatible with hardware and/or adapter, main question is still how to transmit can data to PC

eimasdec:
Lets say its compatible with hardware and/or adapter, main question is still how to transmit can data to PC

you're being very mysterious!

if you already have a hardware, I would advise that you first findout how this data is packaged and sent to the PC! Just making a CAN bus interface with arduino does not guarantee that your software will interpret whatever serial data the arduino will TX correctly!

sherzaad:
you're being very mysterious!

if you already have a hardware, I would advise that you first findout how this data is packaged and sent to the PC! Just making a CAN bus interface with arduino does not guarantee that your software will interpret whatever serial data the arduino will TX correctly!

Going to explain to not to be mysterious :slight_smile:

There is John Deere Harvester 2014y. (Tractor) which has very slow computer embedded inside tractor which runs Windows XP.
There is CAN connection embedded in that computer (CAN HIGH and CAN LOW, 2 wires).

This is the board of the computer:

Also there is Timbermatic Application (Simple Windows application working under winnt/winxp/win7).
image

I have arduino + arduino can bus shield which I want just to make as adapter like this

(I get those can wires from veichle itself)

My point is to replace that old computer in harvester with a laptop (dont moralise please about vibrations, dust, etc. this is why im mysterious...).

In my opinion, If I connect "adapter" to pc with a Timbermatic application, that application should somehow retrieve CAN DATA and just work (yeah magically).
As i read more and more, and try more and more (with a simple car), I start to understand, that till I dont know how software receives that data (in what structure) I cant make any adapter even though Im getting that data, right ?

That computer interfaces CAN port as HID which is possible to forward to COM.

I think I made myself clear, if not please ask.
Also thanks for the help already.

well... thanks for explaining your project

I had a quick look at this application of yours and googled the hardware and it seems to me that is actually has a comport!

are you thinking what I'm thinking... does yours have one?

then all you need to do is to connect a rs232-to-usb converter to you pc and sniff the COM data... that's the easy part btw!

assuming that you get to that point then you need to understand how the COM data is put read by the pc AND (again) how this COM data was generated for the CAN data

that in itself if a huge task I should think!

I wish you luck! :slight_smile:

Given that you want to use a PC as a permanent part of the project it would be quicker and easier to use proven tools such as the hardware and software shown in this video

Aside from the diagnostic utilities it also gives you a socket like programming interface.